2 ===========================================================================
3 Copyright (C) 1997-2006 Id Software, Inc.
5 This file is part of Quake 2 Tools source code.
7 Quake 2 Tools source code is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the License,
10 or (at your option) any later version.
12 Quake 2 Tools source code is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Quake 2 Tools source code; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 ===========================================================================
28 typedef struct eclass_s
30 struct eclass_s *next;
33 qboolean unknown; // wasn't found in source
38 char flagnames[MAX_FLAGS][32];
41 extern eclass_t *eclass;
43 void Eclass_InitForSourceDirectory (char *path);
44 eclass_t *Eclass_ForName (char *name, qboolean has_brushes);
46 //===================================================
49 typedef struct epair_s
56 typedef struct entity_s
58 struct entity_s *prev, *next;
59 brush_t brushes; // head/tail of list
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);
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);
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);
83 int GetUniqueTargetId(int iHint);