2 Copyright (C) 1999-2006 Id Software, Inc. and contributors.
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
5 This file is part of GtkRadiant.
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 GtkRadiant is distributed in the hope that it will be useful,
13 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 GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 extern dmodel_t dmodels[MAX_MAP_MODELS];
28 extern int visdatasize;
29 extern byte dvisdata[MAX_MAP_VISIBILITY];
32 extern int lightdatasize;
33 extern byte dlightdata[MAX_MAP_LIGHTING];
35 extern int entdatasize;
36 extern char dentdata[MAX_MAP_ENTSTRING];
39 extern dleaf_t dleafs[MAX_MAP_LEAFS];
42 extern dplane_t dplanes[MAX_MAP_PLANES];
44 extern int numvertexes;
45 extern dvertex_t dvertexes[MAX_MAP_VERTS];
48 extern dnode_t dnodes[MAX_MAP_NODES];
50 extern int numtexinfo;
51 extern texinfo_t texinfo[MAX_MAP_TEXINFO];
54 extern dface_t dfaces[MAX_MAP_FACES];
57 extern dedge_t dedges[MAX_MAP_EDGES];
59 extern int numleaffaces;
60 extern unsigned short dleaffaces[MAX_MAP_LEAFFACES];
62 extern int numleafbrushes;
63 extern unsigned short dleafbrushes[MAX_MAP_LEAFBRUSHES];
65 extern int numsurfedges;
66 extern int dsurfedges[MAX_MAP_SURFEDGES];
69 extern darea_t dareas[MAX_MAP_AREAS];
71 extern int numareaportals;
72 extern dareaportal_t dareaportals[MAX_MAP_AREAPORTALS];
74 extern int numbrushes;
75 extern dbrush_t dbrushes[MAX_MAP_BRUSHES];
77 extern int numbrushsides;
78 extern dbrushside_t dbrushsides[MAX_MAP_BRUSHSIDES];
80 extern byte dpop[256];
82 void DecompressVis (byte *in, byte *decompressed);
83 int CompressVis (byte *vis, byte *dest);
85 void LoadBSPFile (char *filename);
86 void LoadBSPFileTexinfo (char *filename); // just for qdata
87 void WriteBSPFile (char *filename);
88 void PrintBSPFileSizes (void);
93 typedef struct epair_s
107 // only valid for func_areaportals
112 extern int num_entities;
113 extern entity_t entities[MAX_MAP_ENTITIES];
115 void ParseEntities (void);
116 void UnparseEntities (void);
118 void SetKeyValue (entity_t *ent, char *key, char *value);
119 char *ValueForKey (entity_t *ent, char *key);
120 // will return "" if not present
122 vec_t FloatForKey (entity_t *ent, char *key);
123 void GetVectorForKey (entity_t *ent, char *key, vec3_t vec);
125 epair_t *ParseEpair (void);
127 void PrintEntity (entity_t *ent);