|
UFO: Alien Invasion
|
#include "bsp.h"
Go to the source code of this file.
Functions | |
| void | EmitPlanes (void) |
| Emits planes to the bsp file. | |
| static void | EmitLeaf (const node_t *node) |
| Emits a leafnode to the bsp file. | |
| static void | EmitFace (const face_t *f) |
| static int | EmitDrawNode_r (node_t *node) |
| Writes the draw nodes. | |
| int | WriteBSP (node_t *headnode) |
| copies working data for a bsp tree into the structures used to create the bsp file. | |
| void | SetModelNumbers (void) |
| Set the model numbers for SOLID_BSP or SOLID_TRIGGER entities like func_door or func_breakable. | |
| void | EmitBrushes (void) |
| Writes the brush list to the bsp. | |
| void | BeginBSPFile (void) |
| Starts a new bsp file. | |
| void | EndBSPFile (const char *filename) |
| Finishes a new bsp and writes to disk. | |
| void | BeginModel (int entityNum) |
| Sets up a new brush model. | |
| void | EndModel (void) |
| Finish a model's processing. | |
Variables | |
| static int | c_nofaces |
| static int | c_facenodes |
| int | firstmodeledge |
Starts a new bsp file.
Definition at line 303 of file writebsp.cpp.
References CONTENTS_SOLID, curTile, and mapTiles.
Referenced by ProcessModels().
Sets up a new brush model.
Definition at line 353 of file writebsp.cpp.
References AABB::add(), curTile, dBspModel_t::dbmBox, entities, entityNum, entity_t::firstbrush, dBspModel_t::firstface, firstmodeledge, mapbrushes, MAX_MAP_MODELS, mapbrush_t::mbBox, entity_t::numbrushes, mapbrush_t::numsides, AABB::set(), AABB::setNegativeVolume(), and Sys_Error().
Referenced by ConstructLevelNodes_r(), and ProcessSubModel().
Writes the brush list to the bsp.
Definition at line 236 of file writebsp.cpp.
References cBspBrush_t::brushContentFlags, dBspBrush_t::brushContentFlags, cBspBrush_t::checkcount, mapbrush_t::contentFlags, curTile, FindOrCreateFloatPlane(), cBspBrush_t::firstbrushside, dBspBrush_t::firstbrushside, i, mapbrushes, MAX_MAP_BRUSHSIDES, AABB::maxs, mapbrush_t::mbBox, AABB::mins, nummapbrushes, cBspBrush_t::numsides, dBspBrush_t::numsides, mapbrush_t::numsides, OBJZERO, mapbrush_t::original_sides, dBspBrushSide_t::planenum, Sys_Error(), dBspBrushSide_t::texinfo, vec3_origin, and VectorCopy.
Referenced by DoRouting(), and EndBSPFile().
Writes the draw nodes.
Definition at line 137 of file writebsp.cpp.
References c_facenodes, c_nofaces, dBspNode_t::children, node_t::children, curTile, EmitDrawNode_r(), EmitFace(), EmitLeaf(), f, node_t::faces, dBspNode_t::firstface, i, MAX_MAP_NODES, AABB::maxs, dBspNode_t::maxs, AABB::mins, dBspNode_t::mins, node_t::nBox, dBspNode_t::numfaces, dBspNode_t::planenum, node_t::planenum, PLANENUM_LEAF, Sys_Error(), UFO_SIZE_T, VectorCopy, VERB_DUMP, and Verb_Printf().
Referenced by EmitDrawNode_r(), and WriteBSP().
Definition at line 101 of file writebsp.cpp.
References curTile, f, dBspSurface_t::firstedge, GetEdge(), i, LIGHTMAP_MAX, dBspSurface_t::lightofs, MAX_MAP_FACES, MAX_MAP_SURFEDGES, dBspSurface_t::numedges, dBspSurface_t::planenum, dBspSurface_t::side, Sys_Error(), and dBspSurface_t::texinfo.
Referenced by EmitDrawNode_r().
Emits a leafnode to the bsp file.
Definition at line 57 of file writebsp.cpp.
References dBspLeaf_t::area, node_t::area, node_t::brushlist, dBspLeaf_t::contentFlags, node_t::contentFlags, curTile, dBspLeaf_t::firstleafbrush, i, mapbrushes, MAX_MAP_LEAFBRUSHES, MAX_MAP_LEAFS, AABB::maxs, dBspLeaf_t::maxs, AABB::mins, dBspLeaf_t::mins, node_t::nBox, bspbrush_t::next, dBspLeaf_t::numleafbrushes, bspbrush_t::original, Sys_Error(), VectorCopy, VERB_DUMP, and Verb_Printf().
Referenced by EmitDrawNode_r().
Emits planes to the bsp file.
Definition at line 41 of file writebsp.cpp.
References curTile, dBspPlane_t::dist, plane_t::dist, i, mapplanes, dBspPlane_t::normal, plane_t::normal, nummapplanes, dBspPlane_t::type, plane_t::type, and VectorCopy.
Referenced by DoRouting(), and EndBSPFile().
| void EndBSPFile | ( | const char * | filename | ) |
Finishes a new bsp and writes to disk.
Definition at line 336 of file writebsp.cpp.
References EmitBrushes(), EmitPlanes(), UnparseEntities(), VERB_LESS, Verb_Printf(), and WriteBSPFile().
Referenced by ProcessModels().
Finish a model's processing.
Definition at line 387 of file writebsp.cpp.
References curTile, dBspModel_t::firstface, and dBspModel_t::numfaces.
Referenced by ProcessSubModel().
Set the model numbers for SOLID_BSP or SOLID_TRIGGER entities like func_door or func_breakable.
Definition at line 217 of file writebsp.cpp.
References Com_sprintf(), entities, i, num_entities, and SetKeyValue().
Referenced by main().
copies working data for a bsp tree into the structures used to create the bsp file.
| [in] | headnode | the top-most node in this bsp tree |
Definition at line 195 of file writebsp.cpp.
References c_facenodes, c_nofaces, curTile, EmitDrawNode_r(), oldfaces, VERB_EXTRA, and Verb_Printf().
Referenced by ConstructLevelNodes_r(), and ProcessSubModel().
|
static |
Definition at line 28 of file writebsp.cpp.
Referenced by EmitDrawNode_r(), and WriteBSP().
|
static |
Definition at line 27 of file writebsp.cpp.
Referenced by EmitDrawNode_r(), and WriteBSP().
|
extern |
Definition at line 41 of file faces.cpp.
Referenced by BeginModel(), and GetEdge().