#include "../map.h"
#include "checkentities.h"
#include "../../../shared/mathlib.h"
#include "../../../shared/entitiesdef.h"
#include "../common/shared.h"
#include "../bsp.h"
#include "checklib.h"
Go to the source code of this file.
Defines | |
#define | MIN_TILE_SIZE 256 |
Functions | |
static void | Check_MapSize (vec3_t mapSize) |
mapbrush_t ** | Check_ExtraBrushesForWorldspawn (int *numBrushes) |
single brushes in func_groups are moved to worldspawn. this function allocates space for pointers to those brushes. called when the .map is written back in map.c | |
static qboolean | Check_IsInfoStart (const char *classname) |
see if the entity is am actor start point | |
static qboolean | Check_InfoStartAligned (const entityDef_t *ed, const entity_t *e) |
check alignment using abstract size and mandatory origin | |
static qboolean | Check_TargetExists (const epair_t *kvp) |
check targets exist (targetname), and check targetnames are targetted (target) | |
static void | Check_EntityWithBrushes (entity_t *e, const char *classname, int entnum) |
void | CheckEntities (void) |
Perform an entity check. | |
void | Check_Stats (void) |
print map stats on -stats | |
Variables | |
static int | numToMoveToWorldspawn = 0 |
Definition in file checkentities.c.
#define MIN_TILE_SIZE 256 |
Definition at line 35 of file checkentities.c.
Referenced by Check_Stats().
static void Check_EntityWithBrushes | ( | entity_t * | e, | |
const char * | classname, | |||
int | entnum | |||
) | [static] |
Definition at line 92 of file checkentities.c.
References Check_Printf(), entity_t::numbrushes, numToMoveToWorldspawn, qfalse, qtrue, entity_t::skip, and VERB_CHECK.
Referenced by CheckEntities().
mapbrush_t ** Check_ExtraBrushesForWorldspawn | ( | int * | numBrushes | ) |
single brushes in func_groups are moved to worldspawn. this function allocates space for pointers to those brushes. called when the .map is written back in map.c
[out] | numBrushes | the number of brushes |
Definition at line 259 of file checkentities.c.
References entities, entity_t::firstbrush, i, mapbrushes, Mem_Alloc, name, num_entities, entity_t::numbrushes, numToMoveToWorldspawn, Sys_Error(), and ValueForKey().
Referenced by WriteMapFile().
static qboolean Check_InfoStartAligned | ( | const entityDef_t * | ed, | |
const entity_t * | e | |||
) | [static] |
check alignment using abstract size and mandatory origin
Definition at line 59 of file checkentities.c.
References ED_ERROR, ED_GetIntVector(), ED_GetKeyDefEntity(), ED_GetLastError(), int(), entity_t::origin, Sys_Error(), and UNIT_SIZE.
Referenced by CheckEntities().
static qboolean Check_IsInfoStart | ( | const char * | classname | ) | [static] |
see if the entity is am actor start point
Definition at line 48 of file checkentities.c.
Referenced by CheckEntities().
static void Check_MapSize | ( | vec3_t | mapSize | ) | [static] |
needs to be done here, on map brushes as worldMins and worldMaxs from levels.c are only calculated on BSPing
[out] | mapSize | the returned size in map units |
Definition at line 231 of file checkentities.c.
References AddPointToBounds(), side_s::brush, i, mapbrushes, nummapbrushes, winding_s::numpoints, mapbrush_s::numsides, mapbrush_s::original_sides, winding_s::p, VectorSet, VectorSubtract, and side_s::winding.
Referenced by Check_Stats().
void Check_Stats | ( | void | ) |
print map stats on -stats
Definition at line 185 of file checkentities.c.
References Check_InitEntityDefs(), Check_MapSize(), Com_Printf(), entities, entityDefs, i, Mem_Alloc, Mem_Free, MIN_TILE_SIZE, name, num_entities, numEntityDefs, nummapbrushes, nummapbrushsides, nummapplanes, UNIT_HEIGHT, UNIT_SIZE, ValueForKey(), VERB_NORMAL, and Verb_Printf().
Referenced by main().
check targets exist (targetname), and check targetnames are targetted (target)
Definition at line 74 of file checkentities.c.
References entities, i, epair_s::key, num_entities, qfalse, qtrue, epair_s::value, and ValueForKey().
Referenced by CheckEntities().
void CheckEntities | ( | void | ) |
Perform an entity check.
Definition at line 114 of file checkentities.c.
References Check_EntityWithBrushes(), Check_InfoStartAligned(), Check_InitEntityDefs(), Check_IsInfoStart(), Check_Printf(), Check_TargetExists(), entityDef_s::classname, entityKeyDef_s::defaultVal, ED_CheckKey(), ED_ERROR, ED_GetEntityDef(), ED_GetKeyDefEntity(), ED_GetLastError(), ED_MANDATORY, entities, entity_t::epairs, entityKeyDef_s::flags, i, epair_s::key, entityDef_s::keyDefs, entityKeyDef_s::name, name, epair_s::next, num_entities, qfalse, qtrue, SetKeyValue(), epair_s::value, ValueForKey(), and VERB_CHECK.
Referenced by main().
int numToMoveToWorldspawn = 0 [static] |
Definition at line 37 of file checkentities.c.
Referenced by Check_EntityWithBrushes(), and Check_ExtraBrushesForWorldspawn().