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 FACE_SOLID 1 //just solid at the other side
00060 #define FACE_LADDER 2 //ladder
00061 #define FACE_GROUND 4 //standing on ground when in this face
00062 #define FACE_GAP 8 //gap in the ground
00063 #define FACE_LIQUID 16
00064 #define FACE_LIQUIDSURFACE 32
00065
00066
00067 #define AREACONTENTS_WATER 1
00068 #define AREACONTENTS_LAVA 2
00069 #define AREACONTENTS_SLIME 4
00070 #define AREACONTENTS_CLUSTERPORTAL 8
00071 #define AREACONTENTS_TELEPORTAL 16
00072 #define AREACONTENTS_ROUTEPORTAL 32
00073 #define AREACONTENTS_TELEPORTER 64
00074 #define AREACONTENTS_JUMPPAD 128
00075 #define AREACONTENTS_DONOTENTER 256
00076 #define AREACONTENTS_VIEWPORTAL 512
00077
00078
00079 #define AREA_GROUNDED 1 //bot can stand on the ground
00080 #define AREA_LADDER 2 //area contains one or more ladder faces
00081 #define AREA_LIQUID 4 //area contains a liquid
00082
00083
00084 #define AAS_LUMPS 14
00085 #define AASLUMP_BBOXES 0
00086 #define AASLUMP_VERTEXES 1
00087 #define AASLUMP_PLANES 2
00088 #define AASLUMP_EDGES 3
00089 #define AASLUMP_EDGEINDEX 4
00090 #define AASLUMP_FACES 5
00091 #define AASLUMP_FACEINDEX 6
00092 #define AASLUMP_AREAS 7
00093 #define AASLUMP_AREASETTINGS 8
00094 #define AASLUMP_REACHABILITY 9
00095 #define AASLUMP_NODES 10
00096 #define AASLUMP_PORTALS 11
00097 #define AASLUMP_PORTALINDEX 12
00098 #define AASLUMP_CLUSTERS 13
00099
00100
00101
00102
00103 typedef struct aas_bbox_s
00104 {
00105 int presencetype;
00106 int flags;
00107 vec3_t mins, maxs;
00108 } aas_bbox_t;
00109
00110
00111
00112
00113 typedef struct aas_reachability_s
00114 {
00115 int areanum;
00116 int facenum;
00117 int edgenum;
00118 vec3_t start;
00119 vec3_t end;
00120 int traveltype;
00121 unsigned short int traveltime;
00122 } aas_reachability_t;
00123
00124
00125 typedef struct aas_areasettings_s
00126 {
00127
00128 int contents;
00129 int areaflags;
00130 int presencetype;
00131 int cluster;
00132 int clusterareanum;
00133 int numreachableareas;
00134 int firstreachablearea;
00135 } aas_areasettings_t;
00136
00137
00138 typedef struct aas_portal_s
00139 {
00140 int areanum;
00141 int frontcluster;
00142 int backcluster;
00143 int clusterareanum[2];
00144 } aas_portal_t;
00145
00146
00147 typedef int aas_portalindex_t;
00148
00149
00150 typedef struct aas_cluster_s
00151 {
00152 int numareas;
00153 int numreachabilityareas;
00154 int numportals;
00155 int firstportal;
00156 } aas_cluster_t;
00157
00158
00159
00160 typedef vec3_t aas_vertex_t;
00161
00162
00163 typedef struct aas_plane_s
00164 {
00165 vec3_t normal;
00166 float dist;
00167 int type;
00168 } aas_plane_t;
00169
00170
00171 typedef struct aas_edge_s
00172 {
00173 int v[2];
00174 } aas_edge_t;
00175
00176
00177 typedef int aas_edgeindex_t;
00178
00179
00180 typedef struct aas_face_s
00181 {
00182 int planenum;
00183 int faceflags;
00184 int numedges;
00185 int firstedge;
00186 int frontarea;
00187 int backarea;
00188 } aas_face_t;
00189
00190
00191 typedef int aas_faceindex_t;
00192
00193
00194 typedef struct aas_area_s
00195 {
00196 int areanum;
00197
00198 int numfaces;
00199 int firstface;
00200 vec3_t mins;
00201 vec3_t maxs;
00202 vec3_t center;
00203 } aas_area_t;
00204
00205
00206 typedef struct aas_node_s
00207 {
00208 int planenum;
00209 int children[2];
00210
00211 } aas_node_t;
00212
00213
00214
00215
00216 typedef struct
00217 {
00218 int fileofs;
00219 int filelen;
00220 } aas_lump_t;
00221
00222
00223 typedef struct aas_header_s
00224 {
00225 int ident;
00226 int version;
00227 int bspchecksum;
00228
00229 aas_lump_t lumps[AAS_LUMPS];
00230 } aas_header_t;
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252