139 const char* side[2] = {
"front",
"back"};
174 for (
int i = 0;
i < 2;
i++) {
211 return emittedHeadnode;
255 for (
int j = 0; j < b->
numsides; j++) {
267 for (
int x = 0; x < 3; x++)
268 for (
int s = -1; s <= 1; s += 2) {
272 normal[x] = (float)s;
371 for (
int j = start; j < end; j++) {
#define VectorCopy(src, dest)
void setNegativeVolume()
Sets mins and maxs to their starting points before using addPoint.
void Sys_Error(const char *error,...)
void SetModelNumbers(void)
Set the model numbers for SOLID_BSP or SOLID_TRIGGER entities like func_door or func_breakable.
static void EmitFace(const face_t *f)
uint16_t FindOrCreateFloatPlane(vec3_t normal, vec_t dist)
bool Com_sprintf(char *dest, size_t size, const char *fmt,...)
copies formatted string with buffer-size checking
dBspModel_t models[MAX_MAP_MODELS]
dBspNode_t nodes[MAX_MAP_NODES]
void BeginModel(int entityNum)
Sets up a new brush model.
void BeginBSPFile(void)
Starts a new bsp file.
void set(const AABB &other)
Copies the values from the given aabb.
entity_t entities[MAX_MAP_ENTITIES]
convex region of space in the BSP tree
mapbrush_t mapbrushes[MAX_MAP_BRUSHES]
static int EmitDrawNode_r(node_t *node)
Writes the draw nodes.
dBspBrushSide_t brushsides[MAX_MAP_BRUSHSIDES]
cBspBrush_t brushes[MAX_MAP_BRUSHES]
#define MAX_MAP_BRUSHSIDES
void SetKeyValue(entity_t *ent, const char *key, const char *value)
void add(const vec3_t point)
If the point is outside the box, expand the box to accommodate it.
dBspSurface_t faces[MAX_MAP_FACES]
struct node_s * children[2]
dBspPlane_t planes[MAX_MAP_PLANES]
struct side_s * original_sides
plane_t mapplanes[MAX_MAP_PLANES]
uint32_t brushContentFlags
dBspLeaf_t leafs[MAX_MAP_LEAFS]
int WriteBSP(node_t *headnode)
copies working data for a bsp tree into the structures used to create the bsp file.
void EndBSPFile(const char *filename)
Finishes a new bsp and writes to disk.
void EndModel(void)
Finish a model's processing.
const char * UnparseEntities(void)
Generates the curTile->entdata string from all the entities.
unsigned short leafbrushes[MAX_MAP_LEAFBRUSHES]
TR_TILE_TYPE mapTiles[MAX_MAPTILES]
struct mapbrush_s * original
#define MAX_MAP_SURFEDGES
int surfedges[MAX_MAP_SURFEDGES]
static void EmitLeaf(const node_t *node)
Emits a leafnode to the bsp file.
long WriteBSPFile(const char *filename)
Swaps the bsp file in place, so it should not be referenced again.
int lightofs[LIGHTMAP_MAX]
int GetEdge(int v1, int v2, const face_t *f)
uint32_t brushContentFlags
#define MAX_MAP_LEAFBRUSHES
void EmitBrushes(void)
Writes the brush list to the bsp.
dBspBrush_t dbrushes[MAX_MAP_BRUSHES]
static mapTiles_t mapTiles
void EmitPlanes(void)
Emits planes to the bsp file.