|
UFO: Alien Invasion
|
#include "../../../common/qfiles.h"

Go to the source code of this file.
Data Structures | |
| struct | epair_t |
| struct | entity_t |
Functions | |
| dMapTile_t * | LoadBSPFile (const char *filename) |
| long | WriteBSPFile (const char *filename) |
| Swaps the bsp file in place, so it should not be referenced again. | |
| void | PrintBSPFileSizes (void) |
| Dumps info about current file. | |
| entity_t * | FindTargetEntity (const char *target) |
| Searches the entities array for an entity with the parameter targetname that matches the searched target parameter. | |
| void | ParseEntities (void) |
| Parses the curTile->entdata string into entities. | |
| const char * | UnparseEntities (void) |
| Generates the curTile->entdata string from all the entities. | |
| void | SetKeyValue (entity_t *ent, const char *key, const char *value) |
| const char * | ValueForKey (const entity_t *ent, const char *key) |
| vec_t | FloatForKey (const entity_t *ent, const char *key) |
| void | GetVectorFromString (const char *value, vec3_t vec) |
Converts a string into a vec3_t. | |
| void | GetVectorForKey (const entity_t *ent, const char *key, vec3_t vec) |
Converts the value of a entity parameter into a vec3_t. | |
| epair_t * | ParseEpair (int entNum) |
| Parses one key and value for an entity from the current tokens. | |
| bool | EpairCheckForDuplicate (const entity_t *ent, const epair_t *e) |
| epair_t * | AddEpair (const char *key, const char *value, int entNum) |
| byte * | CompressRouting (byte *dataStart, byte *destStart, int l) |
| Compress the routing data of a map. | |
Variables | |
| int | num_entities |
| entity_t | entities [MAX_MAP_ENTITIES] |
Definition at line 428 of file bspfile.cpp.
References IsInvalidEntityToken(), epair_t::key, key, MAX_KEY, MAX_VALUE, Mem_AllocType, Sys_Error(), epair_t::ump, and epair_t::value.
Referenced by ParseEpair(), ParseMapEntity(), and SetKeyValue().
Compress the routing data of a map.
Definition at line 37 of file bspfile.cpp.
References data.
Referenced by DoRouting().
Definition at line 418 of file bspfile.cpp.
References entity_t::epairs, epair_t::key, epair_t::next, and Q_streq.
Referenced by ParseMapEntity().
| entity_t * FindTargetEntity | ( | const char * | target | ) |
Searches the entities array for an entity with the parameter targetname that matches the searched target parameter.
| [in] | target | The targetname value that the entity should have that we are looking for |
Definition at line 911 of file map.cpp.
References entities, i, num_entities, Q_streq, and ValueForKey().
Referenced by BuildLights().
Definition at line 566 of file bspfile.cpp.
References key, and ValueForKey().
Referenced by BuildLights().
Converts the value of a entity parameter into a vec3_t.
Definition at line 592 of file bspfile.cpp.
References GetVectorFromString(), key, and ValueForKey().
Referenced by BuildLights(), BuildPatches(), and ParseMapEntity().
Converts a string into a vec3_t.
Definition at line 575 of file bspfile.cpp.
References Sys_Error(), VectorClear, and VectorSet.
Referenced by BuildLights(), and GetVectorForKey().
| dMapTile_t * LoadBSPFile | ( | const char * | filename | ) |
Definition at line 231 of file bspfile.cpp.
References cBspBrush_t::brushContentFlags, dBspBrush_t::brushContentFlags, BSP_SwapHeader, BSPVERSION, CopyLump(), curTile, cBspBrush_t::firstbrushside, dBspBrush_t::firstbrushside, FS_FreeFile(), FS_LoadFile(), i, IDBSPHEADER, dBspHeader_t::ident, LIGHTMAP_DAY, LIGHTMAP_NIGHT, LUMP_BRUSHES, LUMP_BRUSHSIDES, LUMP_EDGES, LUMP_ENTITIES, LUMP_FACES, LUMP_LEAFBRUSHES, LUMP_LEAFS, LUMP_LIGHTING_DAY, LUMP_LIGHTING_NIGHT, LUMP_MODELS, LUMP_NODES, LUMP_NORMALS, LUMP_PLANES, LUMP_ROUTING, LUMP_SURFEDGES, LUMP_TEXINFO, LUMP_VERTEXES, mapTiles, cBspBrush_t::numsides, dBspBrush_t::numsides, OBJZERO, SwapBSPFile(), Sys_Error(), and dBspHeader_t::version.
Referenced by main().
Parses the curTile->entdata string into entities.
Definition at line 502 of file bspfile.cpp.
References curTile, num_entities, ParseEntity(), and ParseFromMemory().
Referenced by PrintBSPFileSizes().
Parses one key and value for an entity from the current tokens.
Definition at line 453 of file bspfile.cpp.
References AddEpair(), GetToken(), key, Mem_StrDup, parsedToken, and StripTrailingWhitespaces().
Referenced by ParseEntity(), and ParseMapEntity().
Dumps info about current file.
Definition at line 364 of file bspfile.cpp.
References Com_Printf(), curTile, num_entities, and ParseEntities().
Referenced by main().
Definition at line 546 of file bspfile.cpp.
References AddEpair(), entity_t::epairs, key, Mem_StrDup, epair_t::next, and Q_streq.
Referenced by CheckEntities(), ParseBrush(), and SetModelNumbers().
| const char * UnparseEntities | ( | void | ) |
Generates the curTile->entdata string from all the entities.
Definition at line 515 of file bspfile.cpp.
References curTile, entities, i, IsInvalidEntityToken(), epair_t::key, key, epair_t::next, num_entities, Q_strcat(), Q_strncpyz(), StripTrailingWhitespaces(), Sys_Error(), and epair_t::value.
Referenced by EndBSPFile(), and main().
| const char * ValueForKey | ( | const entity_t * | ent, |
| const char * | key ) |
Definition at line 558 of file bspfile.cpp.
References entity_t::epairs, key, epair_t::next, Q_streq, and epair_t::value.
Referenced by BuildLights(), Check_ExtraBrushesForWorldspawn(), Check_IsOptimisable(), Check_Stats(), Check_TargetExists(), CheckEntities(), EntityForModel(), FaceFromPortal(), FindTargetEntity(), FloatForKey(), GetVectorForKey(), LoadMapFile(), ParseMapEntity(), and ProcessSubModel().
| long WriteBSPFile | ( | const char * | filename | ) |
Swaps the bsp file in place, so it should not be referenced again.
Definition at line 316 of file bspfile.cpp.
References AddLump(), BSPVERSION, curTile, FILE_WRITE, FS_OpenFile(), FS_Write(), ScopedFile::getFile(), IDBSPHEADER, dBspHeader_t::ident, LittleLong, LUMP_BRUSHES, LUMP_BRUSHSIDES, LUMP_EDGES, LUMP_ENTITIES, LUMP_FACES, LUMP_LEAFBRUSHES, LUMP_LEAFS, LUMP_LIGHTING_DAY, LUMP_LIGHTING_NIGHT, LUMP_MODELS, LUMP_NODES, LUMP_NORMALS, LUMP_PLANES, LUMP_ROUTING, LUMP_SURFEDGES, LUMP_TEXINFO, LUMP_VERTEXES, OBJZERO, SEEK_SET, SwapBSPFile(), Sys_Error(), and dBspHeader_t::version.
Referenced by EndBSPFile(), and main().
|
extern |
Definition at line 395 of file bspfile.cpp.
Referenced by BeginModel(), BuildLights(), Check_ExtraBrushesForWorldspawn(), Check_IsOptimisable(), Check_Stats(), Check_TargetExists(), CheckEntities(), EntityForModel(), FaceFromPortal(), FindTargetEntity(), G_SpawnEntities(), LoadMapFile(), MoveBrushesToWorld(), ParseBrush(), ParseEntity(), ParseMapEntity(), ProcessModels(), ProcessSubModel(), ProcessWorldModel(), SetModelNumbers(), UnparseEntities(), and WriteMapFile().
|
extern |
Definition at line 394 of file bspfile.cpp.
Referenced by BuildLights(), Check_ExtraBrushesForWorldspawn(), Check_Stats(), Check_TargetExists(), CheckEntities(), EntityForModel(), FindTargetEntity(), LoadMapFile(), main(), MoveBrushesToWorld(), ParseBrush(), ParseEntities(), ParseEntity(), ParseMapEntity(), PrintBSPFileSizes(), ProcessModels(), SetModelNumbers(), UnparseEntities(), and WriteMapFile().