typedefs.h File Reference

#include "defines.h"
#include "mathlib.h"
#include "../common/filesys.h"
#include "../common/filesys.h"
Include dependency graph for typedefs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cBspPlane_s
 plane_t structure More...
struct  cBspModel_s
struct  cBspSurface_s
struct  cBspNode_s
struct  cBspBrushSide_s
struct  cBspLeaf_s
struct  cBspBrush_s
struct  tnode_s
 Data for line tracing (?). More...
struct  chead_s
struct  mapTile_t
 Stores the data of a map tile. More...
struct  routing_s
 Pathfinding routing structure and tile layout. More...
struct  mapData_s
struct  pathing_s
struct  dBspModel_t
struct  dBspVertex_t
struct  dBspNormal_t
struct  dBspPlane_t
struct  dBspNode_t
struct  texinfo_s
struct  dBspEdge_t
struct  dBspSurface_t
struct  dBspLeaf_t
 convex region of space in the BSP tree More...
struct  dBspBrushSide_t
struct  dBspBrush_t
struct  dMapTile_t

Typedefs

typedef int ipos_t
typedef ipos_t ipos3_t [3]
typedef struct cBspPlane_s cBspPlane_t
 plane_t structure
typedef struct cBspModel_s cBspModel_t
typedef struct cBspSurface_s cBspSurface_t
typedef struct cBspNode_s cBspNode_t
typedef struct cBspBrushSide_s cBspBrushSide_t
typedef struct cBspLeaf_s cBspLeaf_t
typedef struct cBspBrush_s cBspBrush_t
typedef struct tnode_s tnode_t
 Data for line tracing (?).
typedef struct chead_s cBspHead_t
typedef struct routing_s routing_t
 Pathfinding routing structure and tile layout.
typedef struct mapData_s mapData_t
typedef struct pathing_s pathing_t
typedef struct texinfo_s dBspTexinfo_t

Typedef Documentation

typedef struct cBspBrush_s cBspBrush_t
typedef struct chead_s cBspHead_t
typedef struct cBspLeaf_s cBspLeaf_t
typedef struct cBspModel_s cBspModel_t
typedef struct cBspNode_s cBspNode_t
typedef struct cBspPlane_s cBspPlane_t

plane_t structure

typedef struct cBspSurface_s cBspSurface_t
See also:
dBspTexinfo_t
typedef struct texinfo_s dBspTexinfo_t
See also:
cBspSurface_t
typedef ipos_t ipos3_t[3]

Definition at line 15 of file typedefs.h.

typedef int ipos_t

Definition at line 14 of file typedefs.h.

typedef struct mapData_s mapData_t
typedef struct pathing_s pathing_t
typedef struct routing_s routing_t

Pathfinding routing structure and tile layout.

Note:
Comments strongly WIP!

ROUTE Information stored in "route"

connections (see Grid_MoveCheck) mask description 0x10 0001 0000 connection to +x (height ignored?) 0x20 0010 0000 connection to -x (height ignored?) 0x40 0100 0000 connection to +y (height ignored?) 0x80 1000 0000 connection to -y (height ignored?)

See "h = map->route[z][y][x] & 0x0F;" and "if (map->route[az][ay][ax] & 0x0F) > h)" in CM_UpdateConnection 0x0F 0000 1111 some height info?

FALL Information about how much you'll fall down from x,y position? I THINK as long as a bit is set you will fall down ... See "while (map->fall[ny][nx] & (1 << z)) z--;" in Grid_MoveMark

STEP

0000 0000 Access with "step[y][x] & (1 << z)" Guess: Each bit if set to 0 if a unit can step on it (e.g. ground or chair) or it's 1 if there is a wall or similar (i.e. it's blocked). GERD THINKS it shows stairs and step-on stuff Search for "sh = (map->step[y][x] & (1 << z)) ? sh_big : sh_low;" and similar. "sh" seems to mean "step height"

AREA The needed TUs to walk to a given position. (See Grid_MoveLength)

AREASTORED The stored mask (the cached move) of the routing data. (See Grid_MoveLength)

TILE LAYOUT AND PATHING Maps are comprised of tiles. Each tile has a number of levels corresponding to entities in game. All static entities in the tile are located in levels 0-255, with the main world located in 0. Levels 256-258 are reserved, see LEVEL_* constants in src/shared/shared.h. Non-static entities (ET_BREAKABLE and ET_ROTATING, ET_DOOR, etc.) are contained in levels 259 and above. These entities' models are named *##, beginning from 1, and each corresponds to level LEVEL_MAX - 1 + ##.

The code that handles the pathing has separate checks for the static and non-static levels in a tile. The static levels have their bounds precalculated by CM_MakeTracingNodes and stored in tile->theads. The other levels are checked in the fly when Grid_CheckUnit is called.

typedef struct tnode_s tnode_t

Data for line tracing (?).


Generated by  doxygen 1.6.2