42typedef struct node_s {
61typedef struct tree_s {
void FreeTree(tree_t *tree)
void FreePortal(portal_t *p)
void MarkVisibleSides(tree_t *tree, int start, int end)
void MakeFaces(node_t *headnode)
void EmitBrushes(void)
Writes the brush list to the bsp.
bspbrush_t * ChopBrushes(bspbrush_t *head)
Carves any intersecting solid brushes into the minimum number of non-intersecting brushes.
side_t brushsides[MAX_MAP_SIDES]
void RemovePortalFromNode(portal_t *portal, node_t *l)
Removes references to the given portal from the given node.
byte GetLevelFlagsFromBrush(const mapbrush_t *brush)
Extract the level flags (1-8) from the content flags of the given brush.
bspbrush_t * MakeBspBrushList(int startbrush, int endbrush, int level, const AABB &clip)
void EndBSPFile(const char *filename)
Finishes a new bsp and writes to disk.
void EndModel(void)
Finish a model's processing.
int GetEdge(int v1, int v2, const face_t *f)
void MakeTreePortals(tree_t *tree)
void BeginBSPFile(void)
Starts a new bsp file.
void CloseTracingNodes(void)
void FixTjuncs(node_t *headnode)
int MapBrushesBounds(const int startbrush, const int endbrush, const int level, const AABB &clipBox, AABB &bBox)
sets mins and maxs to the smallest sizes that can contain all brushes from startbrush to endbrush tha...
tree_t * BuildTree(bspbrush_t *brushlist, const vec3_t mins, const vec3_t maxs)
The incoming list will be freed before exiting.
brush_texture_t side_brushtextures[MAX_MAP_SIDES]
plane_t mapplanes[MAX_MAP_PLANES]
void PruneNodes(node_t *node)
void WriteMapFile(const char *filename)
uint16_t FindOrCreateFloatPlane(vec3_t normal, vec_t dist)
tree_t * AllocTree(void)
Allocates a tree and initializes it.
mapbrush_t mapbrushes[MAX_MAP_BRUSHES]
int WriteBSP(node_t *headnode)
copies working data for a bsp tree into the structures used to create the bsp file.
uint32_t VisibleContents(uint32_t contents)
Returns the single content bit of the strongest visible content present.
void ProcessModels(const char *filename)
void LoadMapFile(const char *filename)
void EmitPlanes(void)
Emits planes to the bsp file.
void MakeTracingNodes(int levels)
Use the bsp node structure to reconstruct efficient tracing structures that are used for fast visibil...
void BeginModel(int entityNum)
Sets up a new brush model.
void SetModelNumbers(void)
Set the model numbers for SOLID_BSP or SOLID_TRIGGER entities like func_door or func_breakable.
void DoRouting(void)
Calculates the routing of a map.
struct portal_s * portals
struct node_s * children[2]
struct node_s outside_node
static mapTiles_t mapTiles