Quake-III-Arena

Quake III Arena GPL Source Release
Log | Files | Refs

l_bsp_q2.h (2875B)


      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 ME
     24 #define ME
     25 #endif //ME
     26 
     27 extern	int				nummodels;
     28 extern	dmodel_t			*dmodels;//[MAX_MAP_MODELS];
     29 
     30 extern	int				visdatasize;
     31 extern	byte				*dvisdata;//[MAX_MAP_VISIBILITY];
     32 extern	dvis_t			*dvis;
     33 
     34 extern	int				lightdatasize;
     35 extern	byte				*dlightdata;//[MAX_MAP_LIGHTING];
     36 
     37 extern	int				entdatasize;
     38 extern	char				*dentdata;//[MAX_MAP_ENTSTRING];
     39 
     40 extern	int				numleafs;
     41 extern	dleaf_t			*dleafs;//[MAX_MAP_LEAFS];
     42 
     43 extern	int				numplanes;
     44 extern	dplane_t			*dplanes;//[MAX_MAP_PLANES];
     45 
     46 extern	int				numvertexes;
     47 extern	dvertex_t		*dvertexes;//[MAX_MAP_VERTS];
     48 
     49 extern	int				numnodes;
     50 extern	dnode_t			*dnodes;//[MAX_MAP_NODES];
     51 
     52 extern	int				numtexinfo;
     53 extern	texinfo_t		texinfo[MAX_MAP_TEXINFO];
     54 
     55 extern	int				numfaces;
     56 extern	dface_t			*dfaces;//[MAX_MAP_FACES];
     57 
     58 extern	int				numedges;
     59 extern	dedge_t			*dedges;//[MAX_MAP_EDGES];
     60 
     61 extern	int				numleaffaces;
     62 extern	unsigned short	*dleaffaces;//[MAX_MAP_LEAFFACES];
     63 
     64 extern	int				numleafbrushes;
     65 extern	unsigned short	*dleafbrushes;//[MAX_MAP_LEAFBRUSHES];
     66 
     67 extern	int				numsurfedges;
     68 extern	int				*dsurfedges;//[MAX_MAP_SURFEDGES];
     69 
     70 extern	int				numareas;
     71 extern	darea_t			*dareas;//[MAX_MAP_AREAS];
     72 
     73 extern	int				numareaportals;
     74 extern	dareaportal_t	*dareaportals;//[MAX_MAP_AREAPORTALS];
     75 
     76 extern	int				numbrushes;
     77 extern	dbrush_t			*dbrushes;//[MAX_MAP_BRUSHES];
     78 
     79 extern	int				numbrushsides;
     80 extern	dbrushside_t	*dbrushsides;//[MAX_MAP_BRUSHSIDES];
     81 
     82 extern	byte		dpop[256];
     83 
     84 extern	char brushsidetextured[MAX_MAP_BRUSHSIDES];
     85 
     86 void Q2_AllocMaxBSP(void);
     87 void Q2_FreeMaxBSP(void);
     88 
     89 void Q2_DecompressVis(byte *in, byte *decompressed);
     90 int Q2_CompressVis(byte *vis, byte *dest);
     91 
     92 void Q2_LoadBSPFile(char *filename, int offset, int length);
     93 void Q2_LoadBSPFileTexinfo(char *filename);	// just for qdata
     94 void Q2_WriteBSPFile(char *filename);
     95 void Q2_PrintBSPFileSizes(void);
     96 void Q2_ParseEntities(void);
     97 void Q2_UnparseEntities(void);
     98