| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
#define MAX_FLAGS 8 |
| 27 |
|
| 28 |
typedef struct eclass_s |
| 29 |
{ |
| 30 |
struct eclass_s *next; |
| 31 |
char *name; |
| 32 |
qboolean fixedsize; |
| 33 |
qboolean unknown; |
| 34 |
vec3_t mins, maxs; |
| 35 |
vec3_t color; |
| 36 |
texdef_t texdef; |
| 37 |
char *comments; |
| 38 |
char flagnames[MAX_FLAGS][32]; |
| 39 |
} eclass_t; |
| 40 |
|
| 41 |
extern eclass_t *eclass; |
| 42 |
|
| 43 |
void Eclass_InitForSourceDirectory (char *path); |
| 44 |
eclass_t *Eclass_ForName (char *name, qboolean has_brushes); |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
typedef struct epair_s |
| 50 |
{ |
| 51 |
struct epair_s *next; |
| 52 |
char *key; |
| 53 |
char *value; |
| 54 |
} epair_t; |
| 55 |
|
| 56 |
typedef struct entity_s |
| 57 |
{ |
| 58 |
struct entity_s *prev, *next; |
| 59 |
brush_t brushes; |
| 60 |
vec3_t origin; |
| 61 |
eclass_t *eclass; |
| 62 |
epair_t *epairs; |
| 63 |
} entity_t; |
| 64 |
|
| 65 |
char *ValueForKey (entity_t *ent, char *key); |
| 66 |
void SetKeyValue (entity_t *ent, char *key, char *value); |
| 67 |
void DeleteKey (entity_t *ent, char *key); |
| 68 |
float FloatForKey (entity_t *ent, char *key); |
| 69 |
int IntForKey (entity_t *ent, char *key); |
| 70 |
void GetVectorForKey (entity_t *ent, char *key, vec3_t vec); |
| 71 |
|
| 72 |
void Entity_Free (entity_t *e); |
| 73 |
entity_t *Entity_Parse (qboolean onlypairs); |
| 74 |
void Entity_Write (entity_t *e, FILE *f, qboolean use_region); |
| 75 |
entity_t *Entity_Create (eclass_t *c); |
| 76 |
entity_t *Entity_Clone (entity_t *e); |
| 77 |
|
| 78 |
void Entity_LinkBrush (entity_t *e, brush_t *b); |
| 79 |
void Entity_UnlinkBrush (brush_t *b); |
| 80 |
entity_t *FindEntity(char *pszKey, char *pszValue); |
| 81 |
entity_t *FindEntityInt(char *pszKey, int iValue); |
| 82 |
|
| 83 |
int GetUniqueTargetId(int iHint); |
| 84 |
|