6 #include "../common/filesys.h" 20 typedef struct cBspPlane_s {
26 typedef struct cBspModel_s {
37 typedef struct cBspSurface_s {
42 typedef struct cBspNode_s {
48 typedef struct cBspBrushSide_s {
53 typedef struct cBspLeaf_s {
59 typedef struct cBspBrush_s {
69 typedef struct tnode_s {
77 typedef struct chead_s {
196 typedef struct routing_s {
202 inline void setStepup (
const int x,
const int y,
const int z,
const int dir,
const int val) {
203 _stepup[z][y][x][dir] = val;
205 inline byte getStepup (
const int x,
const int y,
const int z,
const int dir)
const {
206 return _stepup[z][y][x][dir];
209 inline void setConn (
const int x,
const int y,
const int z,
const int dir,
const int val) {
210 _route[z][y][x][dir] = val;
212 inline byte getConn (
const int x,
const int y,
const int z,
const int dir)
const {
213 return _route[z][y][x][dir];
216 inline void setCeiling (
const int x,
const int y,
const int z,
const int val) {
217 _ceil[z][y][x] = val;
220 return _ceil[z][y][x];
223 return getCeiling(pos[0], pos[1], pos[2]);
226 inline void setFloor (
const int x,
const int y,
const int z,
const int val) {
227 _floor[z][y][x] = val;
229 inline signed char getFloor (
const int x,
const int y,
const int z)
const {
230 return _floor[z][y][x];
233 return getFloor(pos[0], pos[1], pos[2]);
244 #define PATHFINDING_BIG_STEPUP 0x80 246 #define PATHFINDING_BIG_STEPDOWN 0x40 259 inline void setFloor (
const int actorSize,
const int x,
const int y,
const int z,
const int val) {
275 inline byte getCeiling (
const int actorSize,
const int x,
const int y,
const int z)
const {
282 for (
i = lowZ;
i <= highZ;
i++) {
288 inline void setConn (
const int actorSize,
const int x,
const int y,
const int z,
const int dir,
const int val) {
291 inline byte getConn (
const int actorSize,
const int x,
const int y,
const int z,
const int dir)
const {
295 return routes[actorSize - 1].
getConn(pos[0], pos[1], pos[2], dir);
298 inline void setStepup (
const int actorSize,
const int x,
const int y,
const int z,
const int dir,
const int val) {
301 inline byte getStepup (
const int actorSize,
const int x,
const int y,
const int z,
const int dir)
const {
305 inline byte getStepupHeight (
const int actorSize,
const int x,
const int y,
const int z,
const int dir)
const {
319 setFloor(actorSize, x, y, z, other.
getFloor(actorSize, x - sX, y - sY, z - sZ));
323 setConn(actorSize, x, y, z, dir, other.
getConn(actorSize, x - sX, y - sY, z - sZ, dir));
324 setStepup(actorSize, x, y, z, dir, other.
getStepup(actorSize, x - sX, y - sY, z - sZ, dir));
329 typedef struct mapData_s {
388 typedef struct texinfo_s {
Data for line tracing (?)
#define PATHFINDING_BIG_STEPDOWN
byte isStepDownLevel(const actorSizeEnum_t actorSize, const pos3_t pos, const int dir) const
void copyPosData(const Routing &other, actorSizeEnum_t actorSize, const int x, const int y, const int z, const int sX, const int sY, const int sZ)
Pathfinding routing structure and tile layout.
void setFilled(const actorSizeEnum_t actorSize, const int x, const int y, const int lowZ, const int highZ)
routing_t routes[ACTOR_MAX_SIZE]
side_t brushsides[MAX_MAP_SIDES]
byte getConn(const int x, const int y, const int z, const int dir) const
byte isStepUpLevel(const actorSizeEnum_t actorSize, const pos3_t pos, const int dir) const
unsigned short numleafbrushes
void setFloor(const int actorSize, const int x, const int y, const int z, const int val)
signed char getFloor(const pos3_t pos) const
signed char getFloor(const int x, const int y, const int z) const
unsigned short * leafbrushes
#define CELL_HEIGHT
A cell's height in QUANT sized units.
Stores the data of a map tile, mostly the BSP stuff.
byte getCeiling(const int x, const int y, const int z) const
#define MAX_MAP_BRUSHSIDES
#define PATHFINDING_WIDTH
absolute max
void setFloor(const int x, const int y, const int z, const int val)
byte getCeiling(const pos3_t pos) const
#define MAX_MAP_ENTSTRING
void setStepup(const int actorSize, const int x, const int y, const int z, const int dir, const int val)
void setStepup(const int x, const int y, const int z, const int dir, const int val)
byte getCeiling(const int actorSize, const pos3_t pos) const
signed char getFloor(const actorSizeEnum_t actorSize, const int x, const int y, const int z) const
Defined CONSTANTS (Macros are elsewhere)
intptr_t thead[LEVEL_MAX]
#define PosToVec(p, v)
Pos boundary size is +/- 128 - to get into the positive area we add the possible max negative value a...
uint32_t brushContentFlags
void setCeiling(const int x, const int y, const int z, const int val)
void setConn(const int actorSize, const int x, const int y, const int z, const int dir, const int val)
convex region of space in the BSP tree
void getTileBox(AABB &box)
Calculate the bounding box for the tile (in mapunits)
#define PATHFINDING_HEIGHT
15 max, adjusting above 8 will require a rewrite to the DV code
#define VectorAdd(a, b, dest)
byte getStepup(const int actorSize, const int x, const int y, const int z, const int dir) const
byte getCeiling(const int actorSize, const int x, const int y, const int z) const
#define PATHFINDING_BIG_STEPUP
The home of the routing tables.
void setConn(const int x, const int y, const int z, const int dir, const int val)
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
#define MAX_MAP_SURFEDGES
int theadlevel[LEVEL_MAX]
byte getConn(const actorSizeEnum_t actorSize, const pos3_t pos, const int dir) const
uint32_t brushContentFlags
unsigned short firstleafbrush
cBspHead_t cheads[MAX_MAP_NODES]
#define MAX_MAP_LEAFBRUSHES
cBspBrushSide_t * brushsides
byte getStepup(const int x, const int y, const int z, const int dir) const
void setCeiling(const actorSizeEnum_t actorSize, const int x, const int y, const int z, const int val)
signed char getFloor(const actorSizeEnum_t actorSize, const pos3_t pos) const
QGL_EXTERN int GLboolean GLfloat * v
byte getStepupHeight(const int actorSize, const int x, const int y, const int z, const int dir) const
return the value without the flags for z-level change
#define VectorSubtract(a, b, dest)
byte getConn(const int actorSize, const int x, const int y, const int z, const int dir) const