Quake-III-Arena

Quake III Arena GPL Source Release
Log | Files | Refs

l_bsp_ent.h (1818B)


      1 /*
      2 ===========================================================================
      3 Copyright (C) 1999-2005 Id Software, Inc.
      4 
      5 This file is part of Quake III Arena source code.
      6 
      7 Quake III Arena 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.
     11 
     12 Quake III Arena 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.
     16 
     17 You should have received a copy of the GNU General Public License
     18 along with Foobar; if not, write to the Free Software
     19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     20 ===========================================================================
     21 */
     22 
     23 #ifndef MAX_MAP_ENTITIES
     24 #define	MAX_MAP_ENTITIES	2048
     25 #endif
     26 
     27 typedef struct epair_s
     28 {
     29 	struct epair_s	*next;
     30 	char	*key;
     31 	char	*value;
     32 } epair_t;
     33 
     34 typedef struct
     35 {
     36 	vec3_t		origin;
     37 	int			firstbrush;
     38 	int			numbrushes;
     39 	epair_t		*epairs;
     40 	// only valid for func_areaportals
     41 	int			areaportalnum;
     42 	int			portalareas[2];
     43 	int			modelnum;	//for bsp 2 map conversion
     44    qboolean		wasdetail;	//for SIN
     45 } entity_t;
     46 
     47 extern	int num_entities;
     48 extern	entity_t entities[MAX_MAP_ENTITIES];
     49 
     50 void StripTrailing(char *e);
     51 void SetKeyValue(entity_t *ent, char *key, char *value);
     52 char *ValueForKey(entity_t *ent, char *key); // will return "" if not present
     53 vec_t FloatForKey(entity_t *ent, char *key);
     54 void GetVectorForKey(entity_t *ent, char *key, vec3_t vec);
     55 qboolean ParseEntity(script_t *script);
     56 epair_t *ParseEpair(script_t *script);
     57 void PrintEntity(entity_t *ent);
     58