00001 /* 00002 =========================================================================== 00003 Copyright (C) 1999-2005 Id Software, Inc. 00004 00005 This file is part of Quake III Arena source code. 00006 00007 Quake III Arena source code is free software; you can redistribute it 00008 and/or modify it under the terms of the GNU General Public License as 00009 published by the Free Software Foundation; either version 2 of the License, 00010 or (at your option) any later version. 00011 00012 Quake III Arena source code is distributed in the hope that it will be 00013 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Foobar; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 =========================================================================== 00021 */ 00022 00023 #ifndef MAX_MAP_ENTITIES 00024 #define MAX_MAP_ENTITIES 2048 00025 #endif 00026 00027 typedef struct epair_s 00028 { 00029 struct epair_s *next; 00030 char *key; 00031 char *value; 00032 } epair_t; 00033 00034 typedef struct 00035 { 00036 vec3_t origin; 00037 int firstbrush; 00038 int numbrushes; 00039 epair_t *epairs; 00040 // only valid for func_areaportals 00041 int areaportalnum; 00042 int portalareas[2]; 00043 int modelnum; //for bsp 2 map conversion 00044 qboolean wasdetail; //for SIN 00045 } entity_t; 00046 00047 extern int num_entities; 00048 extern entity_t entities[MAX_MAP_ENTITIES]; 00049 00050 void StripTrailing(char *e); 00051 void SetKeyValue(entity_t *ent, char *key, char *value); 00052 char *ValueForKey(entity_t *ent, char *key); // will return "" if not present 00053 vec_t FloatForKey(entity_t *ent, char *key); 00054 void GetVectorForKey(entity_t *ent, char *key, vec3_t vec); 00055 qboolean ParseEntity(script_t *script); 00056 epair_t *ParseEpair(script_t *script); 00057 void PrintEntity(entity_t *ent); 00058
1.3.9.1