28 #include "../../../shared/mathlib.h"
29 #include "../../../shared/entitiesdef.h"
30 #include "../common/shared.h"
34 #define MIN_TILE_SIZE 256
36 static int numToMoveToWorldspawn = 0;
49 return Q_strstart(classname,
"info_") && strstr(classname,
"_start");
75 const char* thisKey = kvp->
key;
76 const char* value = kvp->
value;
77 const char* otherKey =
Q_streq(
"target", thisKey) ?
"targetname" :
"target";
83 if (searchVal &&
Q_streq(searchVal, value))
99 Check_Printf(
VERB_CHECK,
false, entnum, -1,
"func_breakable with more than one brush given (might break pathfinding)\n");
103 Check_Printf(
VERB_CHECK,
true, entnum, -1,
"%s with one brush only - will be moved to worldspawn\n", classname);
152 "%s with %s of %s: no corresponding entity with %s with matching value\n",
166 const bool hasDefault = defaultVal ?
true :
false;
194 Verb_Printf(
VERB_NORMAL,
" Map size (units): %.0f %.0f %.0f\n", worldSize[0], worldSize[1], worldSize[2]);
208 if (j == numEntityDefs) {
209 Com_Printf(
"Check_Stats: entity '%s' not recognised\n", name);
235 for (
int bi = 0; bi < brush->
numsides; bi++) {
238 for (
int vi = 0; vi < winding->
numpoints; vi++)
239 mapBox.
add(winding->
p[vi]);
263 Sys_Error(
"Check_ExtraBrushesForWorldspawn: out of memory");
276 return brushesToMove;
int ED_CheckKey(const entityKeyDef_t *kd, const char *value)
as ED_Check, but where the entity and key are known, so takes different arguments.
Performs check on a loaded mapfile, and makes changes that can be saved back to the source map...
#define Mem_AllocTypeN(type, n)
void setNegativeVolume()
Sets mins and maxs to their starting points before using addPoint.
void Sys_Error(const char *error,...)
const entityKeyDef_t * ED_GetKeyDefEntity(const entityDef_t *ed, const char *keyname, const int abstract)
searches for the parsed key def, when the entity def is known
const entityDef_t * ED_GetEntityDef(const char *classname)
searches for the parsed entity def by classname
void Check_InitEntityDefs(void)
entityDef_t entityDefs[ED_MAX_DEFS+1]
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
void Com_Printf(const char *const fmt,...)
entity_t entities[MAX_MAP_ENTITIES]
void getDiagonal(vec3_t diagonal) const
#define Q_strvalid(string)
mapbrush_t mapbrushes[MAX_MAP_BRUSHES]
void SetKeyValue(entity_t *ent, const char *key, const char *value)
void add(const vec3_t point)
If the point is outside the box, expand the box to accommodate it.
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 ...
char const * Q_strstart(char const *str, char const *start)
Matches the start of a string.
struct side_s * original_sides
struct mapbrush_s * brush
for storing the vertices of the side of a brush or other polygon
void Check_Printf(verbosityLevel_t msgVerbLevel, bool change, int entnum, int brushnum, const char *format,...)
decides wether to proceed with output based on verbosity and ufo2map's mode: check/fix/compile ...
static bool 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)
static int numToMoveToWorldspawn
const char * ED_GetLastError(void)
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
void Check_Stats(void)
print map stats on -stats
void CheckEntities(void)
Perform an entity check.
int ED_GetIntVector(const entityKeyDef_t *kd, int v[], const int n)
parses a value from the definition
const char * ValueForKey(const entity_t *ent, const char *key)
static bool Check_IsInfoStart(const char *classname)
see if the entity is am actor start point
static bool Check_InfoStartAligned(const entityDef_t *ed, const entity_t *e)
check alignment using abstract size and mandatory origin