62b58e9890
Rename symbol OGL to DXX_USE_OGL to show that it is a DXX symbol, not one inherited from a library. Move it to dxxsconf.h to shorten the command line. This is a mostly automated transform, but the changes to SConstruct were manual. git grep -lzw OGL -- '*.h' '*.cpp' | xargs -0 sed -i -e 's/\(\s*#\s*if\)def\s*OGL/\1 DXX_USE_OGL/' -e 's/\(\s*#\s*if\)ndef OGL/\1 !DXX_USE_OGL/' -e 's/\(\s*#\s*if !\?\)defined(OGL)/\1DXX_USE_OGL/'
45 lines
1 KiB
C++
45 lines
1 KiB
C++
/*
|
|
* This file is part of the DXX-Rebirth project <http://www.dxx-rebirth.com/>.
|
|
* It is copyright by its individual contributors, as recorded in the
|
|
* project's Git history. See COPYING.txt at the top level for license
|
|
* terms and a link to the Git history.
|
|
*/
|
|
/*
|
|
*
|
|
* Header for clipper.c
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
#include <cstdint>
|
|
|
|
struct g3s_codes;
|
|
struct g3s_point;
|
|
|
|
#if !DXX_USE_OGL
|
|
#include "3d.h"
|
|
#include "globvars.h"
|
|
#include "compiler-array.h"
|
|
|
|
namespace dcx {
|
|
|
|
struct polygon_clip_points : array<g3s_point *, MAX_POINTS_IN_POLY> {};
|
|
struct temporary_points_t
|
|
{
|
|
uint_fast32_t free_point_num;
|
|
array<g3s_point, MAX_POINTS_IN_POLY> temp_points;
|
|
array<g3s_point *, MAX_POINTS_IN_POLY> free_points;
|
|
temporary_points_t();
|
|
void free_temp_point(g3s_point *cp);
|
|
};
|
|
|
|
const polygon_clip_points &clip_polygon(polygon_clip_points &src,polygon_clip_points &dest,int *nv,g3s_codes *cc,temporary_points_t &);
|
|
void clip_line(g3s_point *&p0,g3s_point *&p1,uint_fast8_t codes_or,temporary_points_t &);
|
|
|
|
}
|
|
#endif
|
|
|
|
#endif
|