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
30 extern dmodel_t dmodels[MAX_MAP_MODELS];
32 extern int visdatasize;
33 extern byte dvisdata[MAX_MAP_VISIBILITY];
36 extern int lightdatasize;
37 extern byte dlightdata[MAX_MAP_LIGHTING];
39 extern int entdatasize;
40 extern char dentdata[MAX_MAP_ENTSTRING];
43 extern dleaf_t dleafs[MAX_MAP_LEAFS];
46 extern dplane_t dplanes[MAX_MAP_PLANES];
48 extern int numvertexes;
49 extern dvertex_t dvertexes[MAX_MAP_VERTS];
52 extern dnode_t dnodes[MAX_MAP_NODES];
54 extern int numtexinfo;
55 extern texinfo_t texinfo[MAX_MAP_TEXINFO];
58 extern dface_t dfaces[MAX_MAP_FACES];
61 extern dedge_t dedges[MAX_MAP_EDGES];
63 extern int numleaffaces;
64 extern unsigned short dleaffaces[MAX_MAP_LEAFFACES];
66 extern int numleafbrushes;
67 extern unsigned short dleafbrushes[MAX_MAP_LEAFBRUSHES];
69 extern int numsurfedges;
70 extern int dsurfedges[MAX_MAP_SURFEDGES];
73 extern darea_t dareas[MAX_MAP_AREAS];
75 extern int numareaportals;
76 extern dareaportal_t dareaportals[MAX_MAP_AREAPORTALS];
78 extern int numbrushes;
79 extern dbrush_t dbrushes[MAX_MAP_BRUSHES];
81 extern int numbrushsides;
82 extern dbrushside_t dbrushsides[MAX_MAP_BRUSHSIDES];
84 extern byte dpop[256];
86 void DecompressVis (byte *in, byte *decompressed);
87 int CompressVis (byte *vis, byte *dest);
89 void LoadBSPFile (char *filename);
90 void LoadBSPFileTexinfo (char *filename); // just for qdata
91 void WriteBSPFile (char *filename);
92 void PrintBSPFileSizes (void);
97 typedef struct epair_s
111 // only valid for func_areaportals
116 extern int num_entities;
117 extern entity_t entities[MAX_MAP_ENTITIES];
119 void ParseEntities (void);
120 void UnparseEntities (void);
122 void SetKeyValue (entity_t *ent, char *key, char *value);
123 char *ValueForKey (entity_t *ent, char *key);
124 // will return "" if not present
126 vec_t FloatForKey (entity_t *ent, char *key);
127 void GetVectorForKey (entity_t *ent, char *key, vec3_t vec);
129 epair_t *ParseEpair (void);
131 void PrintEntity (entity_t *ent);