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