85 if (
curTile->leafbrushes[
i] == brushnum)
103 if (
f->numpoints < 3) {
106 if (
f->merged ||
f->split[0] ||
f->split[1]) {
116 df->
side =
f->planenum & 1;
122 for (
i = 0;
i <
f->numpoints;
i++) {
123 const int e =
GetEdge(
f->vertexnums[
i],
f->vertexnums[(
i + 1) %
f->numpoints],
f);
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++) {
int GetEdge(int v1, int v2, const face_t *f)
plane_t mapplanes[MAX_MAP_PLANES]
uint16_t FindOrCreateFloatPlane(vec3_t normal, vec_t dist)
mapbrush_t mapbrushes[MAX_MAP_BRUSHES]
const char * UnparseEntities(void)
Generates the curTile->entdata string from all the entities.
void SetKeyValue(entity_t *ent, const char *key, const char *value)
entity_t entities[MAX_MAP_ENTITIES]
long WriteBSPFile(const char *filename)
Swaps the bsp file in place, so it should not be referenced again.
void setNegativeVolume()
Sets mins and maxs to their starting points before using addPoint.
void set(const AABB &other)
Copies the values from the given aabb.
void add(const vec3_t point)
If the point is outside the box, expand the box to accommodate it.
#define MAX_MAP_SURFEDGES
#define MAX_MAP_BRUSHSIDES
#define MAX_MAP_LEAFBRUSHES
void Sys_Error(const char *error,...)
bool Com_sprintf(char *dest, size_t size, const char *fmt,...)
copies formatted string with buffer-size checking
struct mapbrush_s * original
uint32_t brushContentFlags
uint32_t brushContentFlags
convex region of space in the BSP tree
int lightofs[LIGHTMAP_MAX]
struct side_s * original_sides
struct node_s * children[2]
static mapTiles_t mapTiles
#define VectorCopy(src, dest)
void EmitBrushes(void)
Writes the brush list to the bsp.
void EndBSPFile(const char *filename)
Finishes a new bsp and writes to disk.
void EndModel(void)
Finish a model's processing.
void BeginBSPFile(void)
Starts a new bsp file.
static int EmitDrawNode_r(node_t *node)
Writes the draw nodes.
static void EmitFace(const face_t *f)
int WriteBSP(node_t *headnode)
copies working data for a bsp tree into the structures used to create the bsp file.
static void EmitLeaf(const node_t *node)
Emits a leafnode to the bsp file.
void EmitPlanes(void)
Emits planes to the bsp file.
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.