31static int oldmodels,
oldleafs,
oldleafbrushes,
oldplanes,
oldvertexes,
oldnormals,
oldnodes,
oldtexinfo,
oldfaces,
oldedges,
oldsurfedges;
71 for (
int i = 0;
i < 3;
i++) {
118#define SPLIT_AT_POW2 6
119#define SPLIT_COORDS 2
146 Verb_Printf(
VERB_DUMP,
"(%i): %i %i: (%i %i) (%i %i) -> (%i %i) (%i %i)\n", levelnum, tmaxs[0] - tmins[0], tmaxs[1] - tmins[1],
147 (
int)partBox.
mins[0], (
int)partBox.
mins[1], (
int)partBox.
maxs[0], (
int)partBox.
maxs[1],
148 (
int)bBox.
mins[0], (
int)bBox.
mins[1], (
int)bBox.
maxs[0], (
int)bBox.
maxs[1]);
151 if (tmaxs[1] - tmins[1] >= 2 || tmaxs[0] - tmins[0] >= 2) {
157 if (tmaxs[1] - tmins[1] > tmaxs[0] - tmins[0])
162 AABB newPartBox(bBox);
164 splitAt = (tmins[n] + ((tmaxs[n] - tmins[n]) >> 1)) <<
SPLIT_AT_POW2;
165 newPartBox.
maxs[n] = splitAt;
171 newPartBox.
mins[n] = splitAt;
245 mins[0] = (
config.block_xl) * 512.0 + 1.0;
246 mins[1] = (
config.block_yl) * 512.0 + 1.0;
249 maxs[0] = (
config.block_xh + 1.0) * 512.0 - 1.0;
250 maxs[1] = (
config.block_yh + 1.0) * 512.0 - 1.0f;
252 const AABB partBox(mins, maxs);
257 dm = &
curTile->models[levelnum];
void FreeTree(tree_t *tree)
void MarkVisibleSides(tree_t *tree, int start, int end)
void MakeFaces(node_t *headnode)
bspbrush_t * ChopBrushes(bspbrush_t *head)
Carves any intersecting solid brushes into the minimum number of non-intersecting brushes.
bspbrush_t * MakeBspBrushList(int startbrush, int endbrush, int level, const AABB &clip)
void MakeTreePortals(tree_t *tree)
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.
void PruneNodes(node_t *node)
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.
void BeginModel(int entityNum)
Sets up a new brush model.
void setMaxs(const vec3_t maxi)
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.
void expand(const float byVal)
expand the box in all directions, but clip them to the maximum boundaries
#define MAX_WORLD_WIDTH
-MAX_WORLD_WIDTH up tp +MAX_WORLD_WIDTH
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
void ProcessLevel(unsigned int levelnum)
process brushes with that level mask
static int32_t BuildNodeChildren(const int n[3])
static int oldleafbrushes
void ProcessLevelEntityNumber(int entityNumber)
static int32_t ConstructLevelNodes_r(const int levelnum, const AABB &partBox, int entityNum)
#define VectorCopy(src, dest)