defines.h
Go to the documentation of this file.00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef SHARED_DEFINES_H
00029 #define SHARED_DEFINES_H
00030
00038
00039 #define PLANESIDE_EPSILON 0.001
00040
00041
00042 #define MAX_ACTIVETEAM 8
00043
00045 #define LEAFNODE -1
00046 #define PLANENUM_LEAF -1
00047
00048
00049 #define TEXINFO_NODE -1
00050 #define MAXEDGES 20
00051
00052 #define TEAM_DEFAULT 1
00053
00055 #define DEBUG_ALL 0x07FE
00056 #define DEBUG_SHARED 0x02
00057 #define DEBUG_ENGINE 0x04
00058 #define DEBUG_SYSTEM 0x08
00059 #define DEBUG_COMMANDS 0x10
00060 #define DEBUG_CLIENT 0x20
00061 #define DEBUG_SERVER 0x40
00062 #define DEBUG_GAME 0x80
00063 #define DEBUG_RENDERER 0x0100
00064 #define DEBUG_SOUND 0x0200
00065 #define DEBUG_EVENTSYS 0x0400
00066
00067 #define DEBUG_PATHING 0x0800
00068 #define DEBUG_ROUTING 0x1000
00069
00070 #define NONE -1
00071 #define NONE_AMMO 0
00072
00073
00074 #define MAX_ROUTE 33
00075 #define MAX_MOVELENGTH 60
00076
00077
00078 #define TU_CROUCH 3
00079 #define TU_TURN 1
00080 #define TU_MOVE_STRAIGHT 2
00081 #define TU_MOVE_DIAGONAL 3
00082 #define TU_MOVE_CLIMB 4
00083 #define TU_MOVE_FALL 0
00084 #define TU_DOOR_ACTION 1
00085 #define TU_CROUCH_MOVING_FACTOR 1.5
00086 #define TU_FLYING_MOVING_FACTOR 2
00088 #define TU_GET_RELOAD(containerOut, containerIn, weapon) (csi.ids[(containerOut)].out + (weapon)->reload + csi.ids[(containerIn)].in)
00089
00090
00091 #define STATE_OPENED 0
00092 #define STATE_CLOSED 1
00093
00094 #define MAX_STRING_CHARS 1024
00095
00096 #define MAX_STRING_TOKENS 80
00097
00098
00099 #define MAX_TEXPATH 32
00101
00102
00103 #define MAX_TILESTRINGS 25
00104 #define MAX_TEAMS 8
00105 #define MAX_CLIENTS 256
00106 #define MAX_EDICTS 1024
00107 #define MAX_MODELS 256
00108 #define MAX_GENERAL (MAX_CLIENTS*2)
00109
00110
00111 #define MAX_HP 100
00112
00113
00114 #define PRINT_NONE -1
00115 #define PRINT_CHAT 0
00116 #define PRINT_HUD 1
00117 #define PRINT_CONSOLE 2
00118
00119 #define ERR_FATAL 0
00120 #define ERR_DROP 1
00121 #define ERR_DISCONNECT 2
00122
00123
00124 #define GROUND_DELTA 28
00125
00126
00127 #define UNIT_SIZE 32
00128 #define UNIT_HEIGHT 64
00129
00130
00131 #define PLAYER_HEIGHT (UNIT_HEIGHT - 16)
00132 #define QUANT 4
00133
00134 #define WALL_SIZE 5
00135
00140 #define MAX_MAP_MODELS 1024
00141 #define MAX_MAP_BRUSHES 16384
00142 #define MAX_MAP_ENTITIES 2048
00143 #define MAX_MAP_ENTSTRING 0x40000
00144 #define MAX_MAP_TEXINFO 16384
00145 #define MAX_MAP_PLANES 65536
00146 #define MAX_MAP_NODES 65536
00147 #define MAX_MAP_BRUSHSIDES 65536
00148 #define MAX_MAP_LEAFS 65536
00149 #define MAX_MAP_VERTS 65536
00150 #define MAX_MAP_FACES 65536
00151 #define MAX_MAP_LEAFBRUSHES 65536
00152 #define MAX_MAP_EDGES 128000
00153 #define MAX_MAP_SURFEDGES 256000
00154 #define MAX_MAP_LIGHTING 0x1000000
00155
00156 #define MAX_MAP_ROUTING 0x100000
00157
00158 #define MAX_LEAFS 1024
00159
00160 #if defined(COMPILE_MAP)
00161 #define MAX_MAPTILES 1
00162 #elif defined(COMPILE_UFO)
00163 #define MAX_MAPTILES 64
00164 #endif
00165
00166 #define MAX_MOD_KNOWN 512
00167
00169 #define MAX_KEY 32
00170 #define MAX_VALUE 1024
00171
00173 #define LUMP_ENTITIES 0
00174 #define LUMP_PLANES 1
00175 #define LUMP_VERTEXES 2
00176 #define LUMP_ROUTING 3
00177 #define LUMP_NODES 4
00178 #define LUMP_TEXINFO 5
00179 #define LUMP_FACES 6
00180 #define LUMP_LIGHTING_NIGHT 7
00181 #define LUMP_LIGHTING_DAY 8
00182 #define LUMP_LEAFS 9
00183 #define LUMP_LEAFBRUSHES 10
00184 #define LUMP_EDGES 11
00185 #define LUMP_SURFEDGES 12
00186 #define LUMP_MODELS 13
00187 #define LUMP_BRUSHES 14
00188 #define LUMP_BRUSHSIDES 15
00189 #define LUMP_NORMALS 16
00190 #define HEADER_LUMPS 17
00191
00192 #define SIDE_FRONT 0
00193 #define SIDE_ON 2
00194 #define SIDE_BACK 1
00195
00197 #define PLANE_X 0
00198 #define PLANE_Y 1
00199 #define PLANE_Z 2
00200
00202 #define PLANE_ANYX 3
00203 #define PLANE_ANYY 4
00204 #define PLANE_ANYZ 5
00205 #define PLANE_NONE 6
00206
00207 #define AXIAL(p) ((p)->type < PLANE_ANYX)
00208
00211 #define ANGLE_UP -1
00212 #define ANGLE_DOWN -2
00213
00214
00215
00216
00217
00218
00219
00229 #define CONTENTS_SOLID 0x0001
00230 #define CONTENTS_WINDOW 0x0002
00231 #define CONTENTS_LADDER 0x0004
00232 #define CONTENTS_WATER 0x0020
00233
00235
00236 #define LAST_VISIBLE_CONTENTS 0x80
00237
00238 #define CONTENTS_LEVEL_ALL 0xFF00
00239 #define CONTENTS_LEVEL_1 0x0100
00240 #define CONTENTS_LEVEL_2 0x0200
00241 #define CONTENTS_LEVEL_3 0x0400
00242 #define CONTENTS_LEVEL_4 0x0800
00243 #define CONTENTS_LEVEL_5 0x1000
00244 #define CONTENTS_LEVEL_6 0x2000
00245 #define CONTENTS_LEVEL_7 0x4000
00246 #define CONTENTS_LEVEL_8 0x8000
00247
00249 #define CONTENTS_ACTORCLIP 0x00010000
00250 #define CONTENTS_PASSABLE 0x00020000
00251 #define CONTENTS_TERRAIN 0x00040000
00252 #define CONTENTS_LIGHTCLIP 0x00080000
00253 #define CONTENTS_ACTOR 0x00800000
00254 #define CONTENTS_ORIGIN 0x01000000
00255 #define CONTENTS_WEAPONCLIP 0x02000000
00256 #define CONTENTS_DEADACTOR 0x04000000
00257 #define CONTENTS_DETAIL 0x08000000
00258 #define CONTENTS_TRANSLUCENT 0x10000000
00260 #define SURF_LIGHT 0x00000001
00261 #define SURF_SLICK 0x00000002
00262 #define SURF_WARP 0x00000008
00263 #define SURF_BLEND33 0x00000010
00264 #define SURF_BLEND66 0x00000020
00265 #define SURF_FLOWING 0x00000040
00266 #define SURF_NODRAW 0x00000080
00267 #define SURF_HINT 0x00000100
00268 #define SURF_SKIP 0x00000200
00269 #define SURF_PHONG 0x00000400
00270 #define SURF_BURN 0x00000800
00271 #define SURF_FOOTSTEP 0x00001000
00272 #define SURF_ORIGIN 0x00002000
00273 #define SURF_ALPHATEST 0x02000000
00275
00276 #define MASK_ALL (-1)
00277 #define MASK_SOLID (CONTENTS_SOLID | CONTENTS_WINDOW)
00278 #define MASK_IMPASSABLE (MASK_SOLID | CONTENTS_ACTORCLIP)
00279 #define MASK_PASSABLE (CONTENTS_PASSABLE | CONTENTS_WATER)
00280 #define MASK_SHOT (CONTENTS_SOLID | CONTENTS_ACTOR | CONTENTS_WEAPONCLIP | CONTENTS_WINDOW | CONTENTS_DEADACTOR)
00281 #define MASK_VISIBILILITY (CONTENTS_SOLID | CONTENTS_WATER)
00282 #define MASK_CLIP (CONTENTS_ACTORCLIP | CONTENTS_WEAPONCLIP | CONTENTS_LIGHTCLIP)
00283
00284
00285
00286 #define ROUTING_NOT_REACHABLE 0xFF
00287 #define ROUTING_UNREACHABLE -1
00289
00290
00291 #define MAX_WORLD_WIDTH 4096
00292
00293 #define GRID_WIDTH (MAX_WORLD_WIDTH / UNIT_SIZE)
00294
00295 #define PATHFINDING_WIDTH (GRID_WIDTH * 2)
00296
00297 #define PATHFINDING_HEIGHT 8
00298
00299 #define CELL_HEIGHT (UNIT_HEIGHT / QUANT)
00300
00301
00302 #define ACTOR_SIZE_INVALID 0
00303 #define ACTOR_SIZE_NORMAL 1
00304 #define ACTOR_SIZE_2x2 2
00305 #define ACTOR_MAX_SIZE (ACTOR_SIZE_2x2)
00306
00307
00308 #define PATHFINDING_MAX_FALL 16
00309
00310 #define PATHFINDING_LEGROOMHEIGHT 4
00311
00312
00313 #define PATHFINDING_MIN_STEPUP 2
00314
00315
00316 #define PATHFINDING_MAX_STEPUP 4
00317
00318 #define PATHFINDING_NO_STEPUP (2 * CELL_HEIGHT)
00319
00320 #define PATHFINDING_BIG_STEPUP 0x80
00321
00322 #define PATHFINDING_BIG_STEPDOWN 0x40
00323
00324
00325
00326 #define PATHFINDING_MIN_OPENING 6
00327
00328 #define PATHFINDING_MICROSTEP_SIZE 4
00329
00331 #define PATHFINDING_MICROSTEP_SKIP 2
00332
00333
00334 #define DIRECTION_FALL 13
00335 #define DIRECTION_CLIMB_UP 8
00336 #define DIRECTION_CLIMB_DOWN 9
00337 #define DIRECTION_STAND_UP 10
00338 #define DIRECTION_CROUCH 11
00339
00340
00341 #define ACTOR_MAX_STATES 2
00342
00351 #define LEVEL_LASTVISIBLE 255
00352 #define LEVEL_LIGHTCLIP 256
00353 #define LEVEL_LASTLIGHTBLOCKING 256
00354 #define LEVEL_WEAPONCLIP 257
00355 #define LEVEL_ACTORCLIP 258
00356 #define LEVEL_MAX 259
00357 #define NUM_REGULAR_MODELS (LEVEL_ACTORCLIP + 1)
00358
00359
00360 #define TL_FLAG_NONE 0x0000
00361 #define TL_FLAG_REGULAR_LEVELS 0x00FF
00362 #define TL_FLAG_ACTORCLIP 0x0100
00363 #define TL_FLAG_WEAPONCLIP 0x0200
00364 #define TL_FLAG_ALL 0x0300
00365
00366 #define LIGHTMAP_NIGHT 0
00367 #define LIGHTMAP_DAY 1
00368 #define LIGHTMAP_MAX 2
00369
00370 #define PSIDE_FRONT 1
00371 #define PSIDE_BACK 2
00372 #define PSIDE_BOTH (PSIDE_FRONT|PSIDE_BACK)
00373 #define PSIDE_FACING 4
00374
00375 #define MAX_TOKEN_CHARS 256
00376
00377 #define ON_EPSILON 0.1
00378
00379
00380 #define DIST_EPSILON (0.03125)
00381 #define DIST_EPSILON2 (0.0625125)
00382
00383 #define MAP_DIST_EPSILON 0.01
00384 #define NORMAL_EPSILON 0.00001
00385
00386 #define MAX_MAP_SIDES (MAX_MAP_BRUSHES*6)
00387 #define MAX_MAP_TEXTURES 1024
00388
00389 #define MAX_MAP_LIGHTMAP (512 * 512)
00390
00391 #define MAP_SIZE_OFFSET 100
00392
00393 #endif