aas_store.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. #define AAS_MAX_BBOXES 5
  19. #define AAS_MAX_VERTEXES 512000
  20. #define AAS_MAX_PLANES 65536
  21. #define AAS_MAX_EDGES 512000
  22. #define AAS_MAX_EDGEINDEXSIZE 512000
  23. #define AAS_MAX_FACES 512000
  24. #define AAS_MAX_FACEINDEXSIZE 512000
  25. #define AAS_MAX_AREAS 65536
  26. #define AAS_MAX_AREASETTINGS 65536
  27. #define AAS_MAX_REACHABILITYSIZE 65536
  28. #define AAS_MAX_NODES 256000
  29. #define AAS_MAX_PORTALS 65536
  30. #define AAS_MAX_PORTALINDEXSIZE 65536
  31. #define AAS_MAX_CLUSTERS 65536
  32. #define BSPCINCLUDE
  33. #include "../game/be_aas.h"
  34. #include "../botlib/be_aas_def.h"
  35. /*
  36. typedef struct bspc_aas_s
  37. {
  38. int loaded;
  39. int initialized; //true when AAS has been initialized
  40. int savefile; //set true when file should be saved
  41. //bounding boxes
  42. int numbboxes;
  43. aas_bbox_t *bboxes;
  44. //vertexes
  45. int numvertexes;
  46. aas_vertex_t *vertexes;
  47. //planes
  48. int numplanes;
  49. aas_plane_t *planes;
  50. //edges
  51. int numedges;
  52. aas_edge_t *edges;
  53. //edge index
  54. int edgeindexsize;
  55. aas_edgeindex_t *edgeindex;
  56. //faces
  57. int numfaces;
  58. aas_face_t *faces;
  59. //face index
  60. int faceindexsize;
  61. aas_faceindex_t *faceindex;
  62. //convex areas
  63. int numareas;
  64. aas_area_t *areas;
  65. //convex area settings
  66. int numareasettings;
  67. aas_areasettings_t *areasettings;
  68. //reachablity list
  69. int reachabilitysize;
  70. aas_reachability_t *reachability;
  71. //nodes of the bsp tree
  72. int numnodes;
  73. aas_node_t *nodes;
  74. //cluster portals
  75. int numportals;
  76. aas_portal_t *portals;
  77. //cluster portal index
  78. int portalindexsize;
  79. aas_portalindex_t *portalindex;
  80. //clusters
  81. int numclusters;
  82. aas_cluster_t *clusters;
  83. //
  84. int numreachabilityareas;
  85. float reachabilitytime;
  86. } bspc_aas_t;
  87. extern bspc_aas_t aasworld;
  88. //*/
  89. extern aas_t aasworld;
  90. //stores the AAS file from the temporary AAS
  91. void AAS_StoreFile(char *filename);
  92. //returns a number of the given plane
  93. qboolean AAS_FindPlane(vec3_t normal, float dist, int *planenum);
  94. //allocates the maximum AAS memory for storage
  95. void AAS_AllocMaxAAS(void);
  96. //frees the maximum AAS memory for storage
  97. void AAS_FreeMaxAAS(void);