6 #include "../common/filesys.h"
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];
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) {
260 routes[actorSize - 1].
setFloor(x, y, z, val);
263 return routes[actorSize - 1].
getFloor(pos);
266 return routes[actorSize - 1].
getFloor(x, y, z);
270 routes[actorSize - 1].
setCeiling(x, y, z, val);
275 inline byte getCeiling (
const int actorSize,
const int x,
const int y,
const int z)
const {
276 return routes[actorSize - 1].
getCeiling(x, y, z);
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) {
289 routes[actorSize - 1].
setConn(x, y, z, dir, val);
291 inline byte getConn (
const int actorSize,
const int x,
const int y,
const int z,
const int dir)
const {
292 return routes[actorSize - 1].
getConn(x, y, z, dir);
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) {
299 routes[actorSize - 1].
setStepup(x, y, z, dir, val);
301 inline byte getStepup (
const int actorSize,
const int x,
const int y,
const int z,
const int dir)
const {
302 return routes[actorSize - 1].
getStepup(x, y, z, dir);
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));
byte getCeiling(const int actorSize, const int x, const int y, const int z) const
#define PATHFINDING_BIG_STEPDOWN
void setFloor(const int x, const int y, const int z, const int val)
void setCeiling(const actorSizeEnum_t actorSize, const int x, const int y, const int z, const int val)
void getTileBox(AABB &box)
Calculate the bounding box for the tile (in mapunits)
byte getConn(const int x, const int y, const int z, const int dir) const
void setFloor(const int actorSize, const int x, const int y, const int z, const int val)
struct routing_s routing_t
Pathfinding routing structure and tile layout.
byte getStepup(const int actorSize, const int x, const int y, const int z, const int dir) const
byte _stepup[PATHFINDING_HEIGHT][PATHFINDING_WIDTH][PATHFINDING_WIDTH][CORE_DIRECTIONS]
side_t brushsides[MAX_MAP_SIDES]
void setFilled(const actorSizeEnum_t actorSize, const int x, const int y, const int lowZ, const int highZ)
byte _route[PATHFINDING_HEIGHT][PATHFINDING_WIDTH][PATHFINDING_WIDTH][CORE_DIRECTIONS]
signed char getFloor(const actorSizeEnum_t actorSize, const int x, const int y, const int z) const
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
struct cBspPlane_s cBspPlane_t
plane_t structure
struct chead_s cBspHead_t
void setCeiling(const int x, const int y, const int z, const int val)
Data for line tracing (?)
byte isStepUpLevel(const actorSizeEnum_t actorSize, const pos3_t pos, const int dir) const
signed char _floor[PATHFINDING_HEIGHT][PATHFINDING_WIDTH][PATHFINDING_WIDTH]
convex region of space in the BSP tree
void setStepup(const int actorSize, const int x, const int y, const int z, const int dir, const int val)
unsigned short firstleafbrush
struct cBspBrushSide_s cBspBrushSide_t
struct cBspNode_s cBspNode_t
byte getConn(const actorSizeEnum_t actorSize, const pos3_t pos, const int dir) const
intptr_t thead[LEVEL_MAX]
#define CELL_HEIGHT
A cell's height in QUANT sized units.
Stores the data of a map tile, mostly the BSP stuff.
struct cBspSurface_s cBspSurface_t
byte reroute[ACTOR_MAX_SIZE][PATHFINDING_WIDTH][PATHFINDING_WIDTH]
Used to track where rerouting needs to occur.
#define MAX_MAP_BRUSHSIDES
#define PATHFINDING_WIDTH
absolute max
byte isStepDownLevel(const actorSizeEnum_t actorSize, const pos3_t pos, const int dir) const
void setConn(const int x, const int y, const int z, const int dir, const int val)
#define MAX_MAP_ENTSTRING
signed char getFloor(const int x, const int y, const int z) const
byte getCeiling(const int x, const int y, const int z) const
Defined CONSTANTS (Macros are elsewhere)
cBspHead_t cheads[MAX_MAP_NODES]
signed char getFloor(const actorSizeEnum_t actorSize, const pos3_t pos) const
#define PosToVec(p, v)
Pos boundary size is +/- 128 - to get into the positive area we add the possible max negative value a...
routing_t routes[ACTOR_MAX_SIZE]
byte getStepup(const int x, const int y, const int z, const int dir) const
byte getCeiling(const int actorSize, const pos3_t pos) const
uint32_t brushContentFlags
struct cBspBrush_s cBspBrush_t
struct mapData_s mapData_t
byte _ceil[PATHFINDING_HEIGHT][PATHFINDING_WIDTH][PATHFINDING_WIDTH]
#define PATHFINDING_HEIGHT
15 max, adjusting above 8 will require a rewrite to the DV code
#define VectorAdd(a, b, dest)
struct texinfo_s dBspTexinfo_t
#define PATHFINDING_BIG_STEPUP
The home of the routing tables.
struct cBspModel_s cBspModel_t
void setConn(const int actorSize, const int x, const int y, const int z, const int dir, const int val)
#define MAX_MAP_SURFEDGES
cBspBrushSide_t * brushsides
char mapEntityString[MAX_MAP_ENTSTRING]
byte getCeiling(const pos3_t pos) const
unsigned short * leafbrushes
uint32_t brushContentFlags
#define MAX_MAP_LEAFBRUSHES
signed char getFloor(const pos3_t pos) const
int theadlevel[LEVEL_MAX]
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.
struct tnode_s tnode_t
Data for line tracing (?)
QGL_EXTERN int GLboolean GLfloat * v
#define VectorSubtract(a, b, dest)
byte getConn(const int actorSize, const int x, const int y, const int z, const int dir) const
unsigned short numleafbrushes
struct cBspLeaf_s cBspLeaf_t
void setStepup(const int x, const int y, const int z, const int dir, const int val)