QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

Data Structures

struct  entity_t
 In-memory representation of an entity as parsed from the map script. More...
 
struct  epair_s
 
struct  mbrush_s
 
struct  mface_s
 

Macros

#define ENTITIES_CHUNK   16
 
#define MAX_FACES   256
 
#define MIPTEXNAME_CHUNK   16
 

Typedefs

typedef struct epair_s epair_t
 
typedef struct mbrush_s mbrush_t
 
typedef struct mface_s mface_t
 

Functions

int FindMiptex (const char *name)
 Allocate a miptex handle for the named miptex. More...
 
void GetVectorForKey (const entity_t *ent, const char *key, vec3_t vec)
 Parse a vector value from an entity's key. More...
 
void LoadMapFile (const char *filename)
 Load and parse the map script. More...
 
void PrintEntity (const entity_t *ent)
 Dump an entity's data to stdout. More...
 
void SetKeyValue (entity_t *ent, const char *key, const char *value)
 Set the value of the entity's key. More...
 
const char * ValueForKey (const entity_t *ent, const char *key)
 Get the value for the specified key from an entity. More...
 
void WriteEntitiesToString (void)
 Write all valid entities to the bsp file. More...
 

Variables

vec3_t baseaxis [18]
 
entity_tentities
 
entity_tentities
 
script_tmap_script
 
entity_tmapent
 
int max_entities
 
int maxmiptexnames
 
hashtab_tmiptex_hash
 
const char ** miptexnames
 
const char ** miptexnames
 
int num_entities
 
int num_entities
 
int numdetailbrushes
 
int nummapbrushes
 
int nummapbrushfaces
 
int nummiptexnames
 
int nummiptexnames
 

Detailed Description

Macro Definition Documentation

#define ENTITIES_CHUNK   16
#define MAX_FACES   256
#define MIPTEXNAME_CHUNK   16

Typedef Documentation

typedef struct epair_s epair_t
typedef struct mbrush_s mbrush_t
typedef struct mface_s mface_t

Function Documentation

int FindMiptex ( const char *  name)

Allocate a miptex handle for the named miptex.

If the a miptex with the same name already exists, the previous handle will be returned. hint and skip textures are handled specially, returning TEX_HINT and TEX_SKIP respectively.

Parameters
nameThe name of the texture.
Returns
The handle for the texture.
void GetVectorForKey ( const entity_t ent,
const char *  key,
vec3_t  vec 
)

Parse a vector value from an entity's key.

Parameters
entThe entity from which to fetch the key.
keyThe key of wich to parse the vector value.
vecThe destination of the vector value.
void LoadMapFile ( const char *  filename)

Load and parse the map script.

Fills in the entities and miptexnames arrays.

Parameters
filenamePath of the map script to parse.
void PrintEntity ( const entity_t ent)

Dump an entity's data to stdout.

Parameters
entThe entity to dump.
void SetKeyValue ( entity_t ent,
const char *  key,
const char *  value 
)

Set the value of the entity's key.

If the key does not exist, one will be added.

Parameters
entThe entity owning the key.
keyThe key to set.
valueThe value to which the key is to be set.
const char * ValueForKey ( const entity_t ent,
const char *  key 
)

Get the value for the specified key from an entity.

Parameters
entThe entity from which to fetch the value.
keyThe key for which to fetch the value.
Returns
The value for the key, or the empty string if the key does not exist in this entity.
void WriteEntitiesToString ( void  )

Write all valid entities to the bsp file.

Writes all entities that still have key=value pairs to the bsp file. Only the key=value pairs are written: any brush data is left out.

Variable Documentation

vec3_t baseaxis[18]
Initial value:
= {
{0, 0, 1}, {1, 0, 0}, {0, -1, 0},
{0, 0, -1}, {1, 0, 0}, {0, -1, 0},
{1, 0, 0}, {0, 1, 0}, {0, 0, -1},
{-1, 0, 0}, {0, 1, 0}, {0, 0, -1},
{0, 1, 0}, {1, 0, 0}, {0, 0, -1},
{0, -1, 0}, {1, 0, 0}, {0, 0, -1}
}
entity_t* entities
entity_t* entities
script_t* map_script
entity_t* mapent
int max_entities
int maxmiptexnames
hashtab_t* miptex_hash
const char** miptexnames
const char** miptexnames
int num_entities
int num_entities
int numdetailbrushes
int nummapbrushes
int nummapbrushfaces
int nummiptexnames
int nummiptexnames