UFO: Alien Invasion
Loading...
Searching...
No Matches
levels.cpp File Reference
#include "levels.h"
#include "bsp.h"
Include dependency graph for levels.cpp:

Go to the source code of this file.

Macros

#define SPLIT_AT_POW2   6
#define SPLIT_COORDS   2

Functions

void PushInfo (void)
void PopInfo (void)
static int32_t BuildNodeChildren (const int n[3])
static int32_t ConstructLevelNodes_r (const int levelnum, const AABB &partBox, int entityNum)
void ProcessLevelEntityNumber (int entityNumber)
void ProcessLevel (unsigned int levelnum)
 process brushes with that level mask

Variables

int brush_start
int brush_end
static int oldmodels
static int oldleafs
static int oldleafbrushes
static int oldplanes
static int oldvertexes
static int oldnormals
static int oldnodes
static int oldtexinfo
static int oldfaces
static int oldedges
static int oldsurfedges
static int entityNum

Macro Definition Documentation

◆ SPLIT_AT_POW2

#define SPLIT_AT_POW2   6

Definition at line 118 of file levels.cpp.

Referenced by ConstructLevelNodes_r().

◆ SPLIT_COORDS

#define SPLIT_COORDS   2

Definition at line 119 of file levels.cpp.

Referenced by ConstructLevelNodes_r().

Function Documentation

◆ BuildNodeChildren()

◆ ConstructLevelNodes_r()

int32_t ConstructLevelNodes_r ( const int levelnum,
const AABB & partBox,
int entityNum )
static

◆ PopInfo()

void PopInfo ( void )

◆ ProcessLevel()

void ProcessLevel ( unsigned int levelnum)

process brushes with that level mask

Parameters
[in]levelnumis the level mask
Note
levelnum 256: weaponclip-level 257: actorclip-level 258: stepon-level 259: tracing structure
See also
ProcessWorldModel
ConstructLevelNodes_r
Note
Should be reentrant as each thread has a unique levelnum at any given time
Todo
Check what happens if two threads do the memcpy

Definition at line 238 of file levels.cpp.

References config, ConstructLevelNodes_r(), curTile, entityNum, dBspModel_t::firstface, dBspModel_t::headnode, mapbrushes, MAX_WORLD_WIDTH, dBspModel_t::numfaces, nummapbrushes, OBJZERO, VERB_EXTRA, and Verb_Printf().

Referenced by ProcessWorldModel().

◆ ProcessLevelEntityNumber()

void ProcessLevelEntityNumber ( int entityNumber)

Definition at line 222 of file levels.cpp.

References entityNum.

Referenced by ProcessWorldModel().

◆ PushInfo()

void PushInfo ( void )

Variable Documentation

◆ brush_end

int brush_end

Definition at line 29 of file levels.cpp.

◆ brush_start

int brush_start

Definition at line 29 of file levels.cpp.

Referenced by ConstructLevelNodes_r(), and ProcessWorldModel().

◆ entityNum

int entityNum
static
Todo
userdata for ProcessLevel thread

Definition at line 220 of file levels.cpp.

Referenced by BeginModel(), ConstructLevelNodes_r(), ProcessLevel(), ProcessLevelEntityNumber(), and ProcessSubModel().

◆ oldedges

int oldedges
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

◆ oldfaces

int oldfaces
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), PushInfo(), and WriteBSP().

◆ oldleafbrushes

int oldleafbrushes
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

◆ oldleafs

int oldleafs
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

◆ oldmodels

int oldmodels
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

◆ oldnodes

int oldnodes
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

◆ oldnormals

int oldnormals
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

◆ oldplanes

int oldplanes
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

◆ oldsurfedges

int oldsurfedges
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

◆ oldtexinfo

int oldtexinfo
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

◆ oldvertexes

int oldvertexes
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().