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