00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #define AASID (('S'<<24)+('A'<<16)+('A'<<8)+'E')
00028 #define AASVERSION_OLD 4
00029 #define AASVERSION 5
00030
00031
00032 #define PRESENCE_NONE 1
00033 #define PRESENCE_NORMAL 2
00034 #define PRESENCE_CROUCH 4
00035
00036
00037 #define MAX_TRAVELTYPES 32
00038 #define TRAVEL_INVALID 1 //temporary not possible
00039 #define TRAVEL_WALK 2 //walking
00040 #define TRAVEL_CROUCH 3 //crouching
00041 #define TRAVEL_BARRIERJUMP 4 //jumping onto a barrier
00042 #define TRAVEL_JUMP 5 //jumping
00043 #define TRAVEL_LADDER 6 //climbing a ladder
00044 #define TRAVEL_WALKOFFLEDGE 7 //walking of a ledge
00045 #define TRAVEL_SWIM 8 //swimming
00046 #define TRAVEL_WATERJUMP 9 //jump out of the water
00047 #define TRAVEL_TELEPORT 10 //teleportation
00048 #define TRAVEL_ELEVATOR 11 //travel by elevator
00049 #define TRAVEL_ROCKETJUMP 12 //rocket jumping required for travel
00050 #define TRAVEL_BFGJUMP 13 //bfg jumping required for travel
00051 #define TRAVEL_GRAPPLEHOOK 14 //grappling hook required for travel
00052 #define TRAVEL_DOUBLEJUMP 15 //double jump
00053 #define TRAVEL_RAMPJUMP 16 //ramp jump
00054 #define TRAVEL_STRAFEJUMP 17 //strafe jump
00055 #define TRAVEL_JUMPPAD 18 //jump pad
00056 #define TRAVEL_FUNCBOB 19 //func bob
00057
00058
00059 #define TRAVELTYPE_MASK 0xFFFFFF
00060 #define TRAVELFLAG_NOTTEAM1 (1 << 24)
00061 #define TRAVELFLAG_NOTTEAM2 (2 << 24)
00062
00063
00064 #define FACE_SOLID 1 //just solid at the other side
00065 #define FACE_LADDER 2 //ladder
00066 #define FACE_GROUND 4 //standing on ground when in this face
00067 #define FACE_GAP 8 //gap in the ground
00068 #define FACE_LIQUID 16 //face seperating two areas with liquid
00069 #define FACE_LIQUIDSURFACE 32 //face seperating liquid and air
00070 #define FACE_BRIDGE 64 //can walk over this face if bridge is closed
00071
00072
00073 #define AREACONTENTS_WATER 1
00074 #define AREACONTENTS_LAVA 2
00075 #define AREACONTENTS_SLIME 4
00076 #define AREACONTENTS_CLUSTERPORTAL 8
00077 #define AREACONTENTS_TELEPORTAL 16
00078 #define AREACONTENTS_ROUTEPORTAL 32
00079 #define AREACONTENTS_TELEPORTER 64
00080 #define AREACONTENTS_JUMPPAD 128
00081 #define AREACONTENTS_DONOTENTER 256
00082 #define AREACONTENTS_VIEWPORTAL 512
00083 #define AREACONTENTS_MOVER 1024
00084 #define AREACONTENTS_NOTTEAM1 2048
00085 #define AREACONTENTS_NOTTEAM2 4096
00086
00087 #define AREACONTENTS_MODELNUMSHIFT 24
00088 #define AREACONTENTS_MAXMODELNUM 0xFF
00089 #define AREACONTENTS_MODELNUM (AREACONTENTS_MAXMODELNUM << AREACONTENTS_MODELNUMSHIFT)
00090
00091
00092 #define AREA_GROUNDED 1 //bot can stand on the ground
00093 #define AREA_LADDER 2 //area contains one or more ladder faces
00094 #define AREA_LIQUID 4 //area contains a liquid
00095 #define AREA_DISABLED 8 //area is disabled for routing when set
00096 #define AREA_BRIDGE 16 //area ontop of a bridge
00097
00098
00099 #define AAS_LUMPS 14
00100 #define AASLUMP_BBOXES 0
00101 #define AASLUMP_VERTEXES 1
00102 #define AASLUMP_PLANES 2
00103 #define AASLUMP_EDGES 3
00104 #define AASLUMP_EDGEINDEX 4
00105 #define AASLUMP_FACES 5
00106 #define AASLUMP_FACEINDEX 6
00107 #define AASLUMP_AREAS 7
00108 #define AASLUMP_AREASETTINGS 8
00109 #define AASLUMP_REACHABILITY 9
00110 #define AASLUMP_NODES 10
00111 #define AASLUMP_PORTALS 11
00112 #define AASLUMP_PORTALINDEX 12
00113 #define AASLUMP_CLUSTERS 13
00114
00115
00116
00117
00118 typedef struct aas_bbox_s
00119 {
00120 int presencetype;
00121 int flags;
00122 vec3_t mins, maxs;
00123 } aas_bbox_t;
00124
00125
00126
00127
00128 typedef struct aas_reachability_s
00129 {
00130 int areanum;
00131 int facenum;
00132 int edgenum;
00133 vec3_t start;
00134 vec3_t end;
00135 int traveltype;
00136 unsigned short int traveltime;
00137 } aas_reachability_t;
00138
00139
00140 typedef struct aas_areasettings_s
00141 {
00142
00143 int contents;
00144 int areaflags;
00145 int presencetype;
00146 int cluster;
00147 int clusterareanum;
00148 int numreachableareas;
00149 int firstreachablearea;
00150 } aas_areasettings_t;
00151
00152
00153 typedef struct aas_portal_s
00154 {
00155 int areanum;
00156 int frontcluster;
00157 int backcluster;
00158 int clusterareanum[2];
00159 } aas_portal_t;
00160
00161
00162 typedef int aas_portalindex_t;
00163
00164
00165 typedef struct aas_cluster_s
00166 {
00167 int numareas;
00168 int numreachabilityareas;
00169 int numportals;
00170 int firstportal;
00171 } aas_cluster_t;
00172
00173
00174
00175 typedef vec3_t aas_vertex_t;
00176
00177
00178 typedef struct aas_plane_s
00179 {
00180 vec3_t normal;
00181 float dist;
00182 int type;
00183 } aas_plane_t;
00184
00185
00186 typedef struct aas_edge_s
00187 {
00188 int v[2];
00189 } aas_edge_t;
00190
00191
00192 typedef int aas_edgeindex_t;
00193
00194
00195 typedef struct aas_face_s
00196 {
00197 int planenum;
00198 int faceflags;
00199 int numedges;
00200 int firstedge;
00201 int frontarea;
00202 int backarea;
00203 } aas_face_t;
00204
00205
00206 typedef int aas_faceindex_t;
00207
00208
00209 typedef struct aas_area_s
00210 {
00211 int areanum;
00212
00213 int numfaces;
00214 int firstface;
00215 vec3_t mins;
00216 vec3_t maxs;
00217 vec3_t center;
00218 } aas_area_t;
00219
00220
00221 typedef struct aas_node_s
00222 {
00223 int planenum;
00224 int children[2];
00225
00226 } aas_node_t;
00227
00228
00229
00230
00231 typedef struct
00232 {
00233 int fileofs;
00234 int filelen;
00235 } aas_lump_t;
00236
00237
00238 typedef struct aas_header_s
00239 {
00240 int ident;
00241 int version;
00242 int bspchecksum;
00243
00244 aas_lump_t lumps[AAS_LUMPS];
00245 } aas_header_t;
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267