UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
levels.cpp File Reference
#include "levels.h"
#include "bsp.h"

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 More...
 

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

#define SPLIT_AT_POW2   6

Definition at line 118 of file levels.cpp.

Referenced by ConstructLevelNodes_r().

#define SPLIT_COORDS   2

Definition at line 119 of file levels.cpp.

Referenced by ConstructLevelNodes_r().

Function Documentation

static int32_t ConstructLevelNodes_r ( const int  levelnum,
const AABB partBox,
int  entityNum 
)
static
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, dMapTile_t::models, dBspModel_t::numfaces, dMapTile_t::numfaces, nummapbrushes, dMapTile_t::nummodels, OBJZERO, VERB_EXTRA, and Verb_Printf().

Referenced by ProcessWorldModel().

void ProcessLevelEntityNumber ( int  entityNumber)

Definition at line 222 of file levels.cpp.

References entityNum.

Referenced by ProcessWorldModel().

Variable Documentation

int brush_end

Definition at line 29 of file levels.cpp.

Referenced by ConstructLevelNodes_r(), and ProcessWorldModel().

int brush_start

Definition at line 29 of file levels.cpp.

Referenced by ConstructLevelNodes_r(), and ProcessWorldModel().

int entityNum
static
Todo:
userdata for ProcessLevel thread

Definition at line 220 of file levels.cpp.

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

int oldedges
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

int oldfaces
static

Definition at line 31 of file levels.cpp.

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

int oldleafbrushes
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

int oldleafs
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

int oldmodels
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

int oldnodes
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

int oldnormals
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

int oldplanes
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

int oldsurfedges
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

int oldtexinfo
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().

int oldvertexes
static

Definition at line 31 of file levels.cpp.

Referenced by PopInfo(), and PushInfo().