l_bsp_q2.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. #ifndef ME
  19. #define ME
  20. #endif //ME
  21. extern int nummodels;
  22. extern dmodel_t *dmodels;//[MAX_MAP_MODELS];
  23. extern int visdatasize;
  24. extern byte *dvisdata;//[MAX_MAP_VISIBILITY];
  25. extern dvis_t *dvis;
  26. extern int lightdatasize;
  27. extern byte *dlightdata;//[MAX_MAP_LIGHTING];
  28. extern int entdatasize;
  29. extern char *dentdata;//[MAX_MAP_ENTSTRING];
  30. extern int numleafs;
  31. extern dleaf_t *dleafs;//[MAX_MAP_LEAFS];
  32. extern int numplanes;
  33. extern dplane_t *dplanes;//[MAX_MAP_PLANES];
  34. extern int numvertexes;
  35. extern dvertex_t *dvertexes;//[MAX_MAP_VERTS];
  36. extern int numnodes;
  37. extern dnode_t *dnodes;//[MAX_MAP_NODES];
  38. extern int numtexinfo;
  39. extern texinfo_t texinfo[MAX_MAP_TEXINFO];
  40. extern int numfaces;
  41. extern dface_t *dfaces;//[MAX_MAP_FACES];
  42. extern int numedges;
  43. extern dedge_t *dedges;//[MAX_MAP_EDGES];
  44. extern int numleaffaces;
  45. extern unsigned short *dleaffaces;//[MAX_MAP_LEAFFACES];
  46. extern int numleafbrushes;
  47. extern unsigned short *dleafbrushes;//[MAX_MAP_LEAFBRUSHES];
  48. extern int numsurfedges;
  49. extern int *dsurfedges;//[MAX_MAP_SURFEDGES];
  50. extern int numareas;
  51. extern darea_t *dareas;//[MAX_MAP_AREAS];
  52. extern int numareaportals;
  53. extern dareaportal_t *dareaportals;//[MAX_MAP_AREAPORTALS];
  54. extern int numbrushes;
  55. extern dbrush_t *dbrushes;//[MAX_MAP_BRUSHES];
  56. extern int numbrushsides;
  57. extern dbrushside_t *dbrushsides;//[MAX_MAP_BRUSHSIDES];
  58. extern byte dpop[256];
  59. extern char brushsidetextured[MAX_MAP_BRUSHSIDES];
  60. void Q2_AllocMaxBSP(void);
  61. void Q2_FreeMaxBSP(void);
  62. void Q2_DecompressVis(byte *in, byte *decompressed);
  63. int Q2_CompressVis(byte *vis, byte *dest);
  64. void Q2_LoadBSPFile(char *filename, int offset, int length);
  65. void Q2_LoadBSPFileTexinfo(char *filename); // just for qdata
  66. void Q2_WriteBSPFile(char *filename);
  67. void Q2_PrintBSPFileSizes(void);
  68. void Q2_ParseEntities(void);
  69. void Q2_UnparseEntities(void);