1 // q2defines.h 2 // Mostly a straight rip of q_shared.h from Q2 3.20 src 3 // Also contains much of game.h 4 // This file is distributed under the id Software source license. 5 // See the file id.license.txt for details. 6 7 #ifndef __Q2DEFINES_H 8 #define __Q2DEFINES_H 9 10 typedef enum {false, true} qboolean; 11 typedef unsigned char byte; 12 13 // angle indexes 14 #define PITCH 0 // up / down 15 #define YAW 1 // left / right 16 #define ROLL 2 // fall over 17 18 #define MAX_STRING_CHARS 1024 // max length of a string passed to Cmd_TokenizeString 19 #define MAX_STRING_TOKENS 80 // max tokens resulting from Cmd_TokenizeString 20 #define MAX_TOKEN_CHARS 128 // max length of an individual token 21 22 #define MAX_QPATH 64 // max length of a quake game pathname 23 #define MAX_OSPATH 128 // max length of a filesystem pathname 24 25 // 26 // per-level limits 27 // 28 #define MAX_CLIENTS 256 // absolute limit 29 #define MAX_EDICTS 1024 // must change protocol to increase more 30 #define MAX_LIGHTSTYLES 256 31 #define MAX_MODELS 256 // these are sent over the net as bytes 32 #define MAX_SOUNDS 256 // so they cannot be blindly increased 33 #define MAX_IMAGES 256 34 #define MAX_ITEMS 256 35 #define MAX_GENERAL (MAX_CLIENTS*2) // general config strings 36 37 38 // game print flags 39 #define PRINT_LOW 0 // pickup messages 40 #define PRINT_MEDIUM 1 // death messages 41 #define PRINT_HIGH 2 // critical messages 42 #define PRINT_CHAT 3 // chat messages 43 44 45 46 #define ERR_FATAL 0 // exit the entire game with a popup window 47 #define ERR_DROP 1 // print to console and disconnect from game 48 #define ERR_DISCONNECT 2 // don't kill server 49 50 #define PRINT_ALL 0 51 #define PRINT_DEVELOPER 1 // only print when "developer 1" 52 #define PRINT_ALERT 2 53 54 55 // destination class for gi.multicast() 56 typedef enum 57 { 58 MULTICAST_ALL, 59 MULTICAST_PHS, 60 MULTICAST_PVS, 61 MULTICAST_ALL_R, 62 MULTICAST_PHS_R, 63 MULTICAST_PVS_R 64 } multicast_t; 65 66 67 /* 68 ============================================================== 69 70 MATHLIB 71 72 ============================================================== 73 */ 74 75 typedef float vec_t; 76 typedef vec_t vec3_t[3]; 77 typedef vec_t vec5_t[5]; 78 79 #define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h 80 81 #define DotProduct(x,y) (x[0]*y[0]+x[1]*y[1]+x[2]*y[2]) 82 #define VectorSubtract(a,b,c) (c[0]=a[0]-b[0],c[1]=a[1]-b[1],c[2]=a[2]-b[2]) 83 #define VectorAdd(a,b,c) (c[0]=a[0]+b[0],c[1]=a[1]+b[1],c[2]=a[2]+b[2]) 84 #define VectorCopy(a,b) (b[0]=a[0],b[1]=a[1],b[2]=a[2]) 85 #define VectorClear(a) (a[0]=a[1]=a[2]=0) 86 #define VectorNegate(a,b) (b[0]=-a[0],b[1]=-a[1],b[2]=-a[2]) 87 #define VectorSet(v, x, y, z) (v[0]=(x), v[1]=(y), v[2]=(z)) 88 // new 89 #define VectorCompare(a,b) (a[0]==b[0] && a[1]==b[1] && a[2]==b[2]) 90 // /new 91 92 // 93 // key / value info strings 94 // 95 #define MAX_INFO_KEY 64 96 #define MAX_INFO_VALUE 64 97 #define MAX_INFO_STRING 512 98 99 100 #define CVAR_ARCHIVE 1 // set to cause it to be saved to vars.rc 101 #define CVAR_USERINFO 2 // added to userinfo when changed 102 #define CVAR_SERVERINFO 4 // added to serverinfo when changed 103 #define CVAR_NOSET 8 // don't allow change from console at all, 104 // but can be set from the command line 105 #define CVAR_LATCH 16 // save changes until server restart 106 107 // nothing outside the Cvar_*() functions should modify these fields! 108 typedef struct cvar_s 109 { 110 char *name; 111 char *string; 112 char *latched_string; // for CVAR_LATCH vars 113 int flags; 114 qboolean modified; // set each time the cvar is changed 115 float value; 116 struct cvar_s *next; 117 } cvar_t; 118 119 120 #define CONTENTS_SOLID 1 // an eye is never valid in a solid 121 #define CONTENTS_WINDOW 2 // translucent, but not watery 122 #define CONTENTS_AUX 4 123 #define CONTENTS_LAVA 8 124 #define CONTENTS_SLIME 16 125 #define CONTENTS_WATER 32 126 #define CONTENTS_MIST 64 127 #define LAST_VISIBLE_CONTENTS 64 128 129 // remaining contents are non-visible, and don't eat brushes 130 131 #define CONTENTS_AREAPORTAL 0x8000 132 133 #define CONTENTS_PLAYERCLIP 0x10000 134 #define CONTENTS_MONSTERCLIP 0x20000 135 136 // currents can be added to any other contents, and may be mixed 137 #define CONTENTS_CURRENT_0 0x40000 138 #define CONTENTS_CURRENT_90 0x80000 139 #define CONTENTS_CURRENT_180 0x100000 140 #define CONTENTS_CURRENT_270 0x200000 141 #define CONTENTS_CURRENT_UP 0x400000 142 #define CONTENTS_CURRENT_DOWN 0x800000 143 144 #define CONTENTS_ORIGIN 0x1000000 // removed before bsping an entity 145 146 #define CONTENTS_MONSTER 0x2000000 // should never be on a brush, only in game 147 #define CONTENTS_DEADMONSTER 0x4000000 148 #define CONTENTS_DETAIL 0x8000000 // brushes to be added after vis leafs 149 #define CONTENTS_TRANSLUCENT 0x10000000 // auto set if any surface has trans 150 #define CONTENTS_LADDER 0x20000000 151 152 153 154 #define SURF_LIGHT 0x1 // value will hold the light strength 155 156 #define SURF_SLICK 0x2 // effects game physics 157 158 #define SURF_SKY 0x4 // don't draw, but add to skybox 159 #define SURF_WARP 0x8 // turbulent water warp 160 #define SURF_TRANS33 0x10 161 #define SURF_TRANS66 0x20 162 #define SURF_FLOWING 0x40 // scroll towards angle 163 #define SURF_NODRAW 0x80 // don't bother referencing the texture 164 165 166 167 // content masks 168 #define MASK_ALL (-1) 169 #define MASK_SOLID (CONTENTS_SOLID|CONTENTS_WINDOW) 170 #define MASK_PLAYERSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_WINDOW|CONTENTS_MONSTER) 171 #define MASK_DEADSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_WINDOW) 172 #define MASK_MONSTERSOLID (CONTENTS_SOLID|CONTENTS_MONSTERCLIP|CONTENTS_WINDOW|CONTENTS_MONSTER) 173 #define MASK_WATER (CONTENTS_WATER|CONTENTS_LAVA|CONTENTS_SLIME) 174 #define MASK_OPAQUE (CONTENTS_SOLID|CONTENTS_SLIME|CONTENTS_LAVA) 175 #define MASK_SHOT (CONTENTS_SOLID|CONTENTS_MONSTER|CONTENTS_WINDOW|CONTENTS_DEADMONSTER) 176 #define MASK_CURRENT (CONTENTS_CURRENT_0|CONTENTS_CURRENT_90|CONTENTS_CURRENT_180|CONTENTS_CURRENT_270|CONTENTS_CURRENT_UP|CONTENTS_CURRENT_DOWN) 177 178 179 // gi.BoxEdicts() can return a list of either solid or trigger entities 180 // FIXME: eliminate AREA_ distinction? 181 #define AREA_SOLID 1 182 #define AREA_TRIGGERS 2 183 184 185 // plane_t structure 186 // !!! if this is changed, it must be changed in asm code too !!! 187 typedef struct cplane_s 188 { 189 vec3_t normal; 190 float dist; 191 byte type; // for fast side tests 192 byte signbits; // signx + (signy<<1) + (signz<<1) 193 byte pad[2]; 194 } cplane_t; 195 196 // structure offset for asm code 197 #define CPLANE_NORMAL_X 0 198 #define CPLANE_NORMAL_Y 4 199 #define CPLANE_NORMAL_Z 8 200 #define CPLANE_DIST 12 201 #define CPLANE_TYPE 16 202 #define CPLANE_SIGNBITS 17 203 #define CPLANE_PAD0 18 204 #define CPLANE_PAD1 19 205 206 typedef struct cmodel_s 207 { 208 vec3_t mins, maxs; 209 vec3_t origin; // for sounds or lights 210 int headnode; 211 } cmodel_t; 212 213 typedef struct csurface_s 214 { 215 char name[16]; 216 int flags; 217 int value; 218 } csurface_t; 219 220 typedef struct mapsurface_s // used internally due to name len probs //ZOID 221 { 222 csurface_t c; 223 char rname[32]; 224 } mapsurface_t; 225 226 // a trace is returned when a box is swept through the world 227 typedef struct 228 { 229 qboolean allsolid; // if true, plane is not valid 230 qboolean startsolid; // if true, the initial point was in a solid area 231 float fraction; // time completed, 1.0 = didn't hit anything 232 vec3_t endpos; // final position 233 cplane_t plane; // surface normal at impact 234 csurface_t *surface; // surface hit 235 int contents; // contents on other side of surface hit 236 struct edict_s *ent; // not set by CM_*() functions 237 } trace_t; 238 239 240 241 // pmove_state_t is the information necessary for client side movement 242 // prediction 243 typedef enum 244 { 245 // can accelerate and turn 246 PM_NORMAL, 247 PM_SPECTATOR, 248 // no acceleration or turning 249 PM_DEAD, 250 PM_GIB, // different bounding box 251 PM_FREEZE 252 } pmtype_t; 253 254 // pmove->pm_flags 255 #define PMF_DUCKED 1 256 #define PMF_JUMP_HELD 2 257 #define PMF_ON_GROUND 4 258 #define PMF_TIME_WATERJUMP 8 // pm_time is waterjump 259 #define PMF_TIME_LAND 16 // pm_time is time before rejump 260 #define PMF_TIME_TELEPORT 32 // pm_time is non-moving time 261 #define PMF_NO_PREDICTION 64 // temporarily disables prediction (used for grappling hook) 262 263 // this structure needs to be communicated bit-accurate 264 // from the server to the client to guarantee that 265 // prediction stays in sync, so no floats are used. 266 // if any part of the game code modifies this struct, it 267 // will result in a prediction error of some degree. 268 typedef struct 269 { 270 pmtype_t pm_type; 271 272 short origin[3]; // 12.3 273 short velocity[3]; // 12.3 274 byte pm_flags; // ducked, jump_held, etc 275 byte pm_time; // each unit = 8 ms 276 short gravity; 277 short delta_angles[3]; // add to command angles to get view direction 278 // changed by spawns, rotating objects, and teleporters 279 } pmove_state_t; 280 281 282 // 283 // button bits 284 // 285 #define BUTTON_ATTACK 1 286 #define BUTTON_USE 2 287 #define BUTTON_ANY 128 // any key whatsoever 288 289 290 // usercmd_t is sent to the server each client frame 291 typedef struct usercmd_s 292 { 293 byte msec; 294 byte buttons; 295 short angles[3]; 296 short forwardmove, sidemove, upmove; 297 byte impulse; // remove? 298 byte lightlevel; // light level the player is standing on 299 } usercmd_t; 300 301 #define MAXTOUCH 32 302 typedef struct 303 { 304 // state (in / out) 305 pmove_state_t s; 306 307 // command (in) 308 usercmd_t cmd; 309 qboolean snapinitial; // if s has been changed outside pmove 310 311 // results (out) 312 int numtouch; 313 struct edict_s *touchents[MAXTOUCH]; 314 315 vec3_t viewangles; // clamped 316 float viewheight; 317 318 vec3_t mins, maxs; // bounding box size 319 320 struct edict_s *groundentity; 321 int watertype; 322 int waterlevel; 323 324 // callbacks to test the world 325 trace_t (*trace) (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end); 326 int (*pointcontents) (vec3_t point); 327 } pmove_t; 328 329 // entity_state_t->effects 330 // Effects are things handled on the client side (lights, particles, frame animations) 331 // that happen constantly on the given entity. 332 // An entity that has effects will be sent to the client 333 // even if it has a zero index model. 334 #define EF_ROTATE 0x00000001 // rotate (bonus items) 335 #define EF_GIB 0x00000002 // leave a trail 336 #define EF_BLASTER 0x00000008 // redlight + trail 337 #define EF_ROCKET 0x00000010 // redlight + trail 338 #define EF_GRENADE 0x00000020 339 #define EF_HYPERBLASTER 0x00000040 340 #define EF_BFG 0x00000080 341 #define EF_COLOR_SHELL 0x00000100 342 #define EF_POWERSCREEN 0x00000200 343 #define EF_ANIM01 0x00000400 // automatically cycle between frames 0 and 1 at 2 hz 344 #define EF_ANIM23 0x00000800 // automatically cycle between frames 2 and 3 at 2 hz 345 #define EF_ANIM_ALL 0x00001000 // automatically cycle through all frames at 2hz 346 #define EF_ANIM_ALLFAST 0x00002000 // automatically cycle through all frames at 10hz 347 #define EF_FLIES 0x00004000 348 #define EF_QUAD 0x00008000 349 #define EF_PENT 0x00010000 350 #define EF_TELEPORTER 0x00020000 // particle fountain 351 #define EF_FLAG1 0x00040000 352 #define EF_FLAG2 0x00080000 353 // RAFAEL 354 #define EF_IONRIPPER 0x00100000 355 #define EF_GREENGIB 0x00200000 356 #define EF_BLUEHYPERBLASTER 0x00400000 357 #define EF_SPINNINGLIGHTS 0x00800000 358 #define EF_PLASMA 0x01000000 359 #define EF_TRAP 0x02000000 360 361 //ROGUE 362 #define EF_TRACKER 0x04000000 363 #define EF_DOUBLE 0x08000000 364 #define EF_SPHERETRANS 0x10000000 365 #define EF_TAGTRAIL 0x20000000 366 #define EF_HALF_DAMAGE 0x40000000 367 #define EF_TRACKERTRAIL 0x80000000 368 //ROGUE 369 370 // entity_state_t->renderfx flags 371 #define RF_MINLIGHT 1 // allways have some light (viewmodel) 372 #define RF_VIEWERMODEL 2 // don't draw through eyes, only mirrors 373 #define RF_WEAPONMODEL 4 // only draw through eyes 374 #define RF_FULLBRIGHT 8 // allways draw full intensity 375 #define RF_DEPTHHACK 16 // for view weapon Z crunching 376 #define RF_TRANSLUCENT 32 377 #define RF_FRAMELERP 64 378 #define RF_BEAM 128 379 #define RF_CUSTOMSKIN 256 // skin is an index in image_precache 380 #define RF_GLOW 512 // pulse lighting for bonus items 381 #define RF_SHELL_RED 1024 382 #define RF_SHELL_GREEN 2048 383 #define RF_SHELL_BLUE 4096 384 385 //ROGUE 386 #define RF_IR_VISIBLE 0x00008000 // 32768 387 #define RF_SHELL_DOUBLE 0x00010000 // 65536 388 #define RF_SHELL_HALF_DAM 0x00020000 389 #define RF_USE_DISGUISE 0x00040000 390 //ROGUE 391 392 // player_state_t->refdef flags 393 #define RDF_UNDERWATER 1 // warp the screen as apropriate 394 #define RDF_NOWORLDMODEL 2 // used for player configuration screen 395 396 //ROGUE 397 #define RDF_IRGOGGLES 4 398 #define RDF_UVGOGGLES 8 399 //ROGUE 400 401 // 402 // muzzle flashes / player effects 403 // 404 #define MZ_BLASTER 0 405 #define MZ_MACHINEGUN 1 406 #define MZ_SHOTGUN 2 407 #define MZ_CHAINGUN1 3 408 #define MZ_CHAINGUN2 4 409 #define MZ_CHAINGUN3 5 410 #define MZ_RAILGUN 6 411 #define MZ_ROCKET 7 412 #define MZ_GRENADE 8 413 #define MZ_LOGIN 9 414 #define MZ_LOGOUT 10 415 #define MZ_RESPAWN 11 416 #define MZ_BFG 12 417 #define MZ_SSHOTGUN 13 418 #define MZ_HYPERBLASTER 14 419 #define MZ_ITEMRESPAWN 15 420 // RAFAEL 421 #define MZ_IONRIPPER 16 422 #define MZ_BLUEHYPERBLASTER 17 423 #define MZ_PHALANX 18 424 #define MZ_SILENCED 128 // bit flag ORed with one of the above numbers 425 426 //ROGUE 427 #define MZ_ETF_RIFLE 30 428 #define MZ_UNUSED 31 429 #define MZ_SHOTGUN2 32 430 #define MZ_HEATBEAM 33 431 #define MZ_BLASTER2 34 432 #define MZ_TRACKER 35 433 #define MZ_NUKE1 36 434 #define MZ_NUKE2 37 435 #define MZ_NUKE4 38 436 #define MZ_NUKE8 39 437 //ROGUE 438 439 // 440 // monster muzzle flashes 441 // 442 #define MZ2_TANK_BLASTER_1 1 443 #define MZ2_TANK_BLASTER_2 2 444 #define MZ2_TANK_BLASTER_3 3 445 #define MZ2_TANK_MACHINEGUN_1 4 446 #define MZ2_TANK_MACHINEGUN_2 5 447 #define MZ2_TANK_MACHINEGUN_3 6 448 #define MZ2_TANK_MACHINEGUN_4 7 449 #define MZ2_TANK_MACHINEGUN_5 8 450 #define MZ2_TANK_MACHINEGUN_6 9 451 #define MZ2_TANK_MACHINEGUN_7 10 452 #define MZ2_TANK_MACHINEGUN_8 11 453 #define MZ2_TANK_MACHINEGUN_9 12 454 #define MZ2_TANK_MACHINEGUN_10 13 455 #define MZ2_TANK_MACHINEGUN_11 14 456 #define MZ2_TANK_MACHINEGUN_12 15 457 #define MZ2_TANK_MACHINEGUN_13 16 458 #define MZ2_TANK_MACHINEGUN_14 17 459 #define MZ2_TANK_MACHINEGUN_15 18 460 #define MZ2_TANK_MACHINEGUN_16 19 461 #define MZ2_TANK_MACHINEGUN_17 20 462 #define MZ2_TANK_MACHINEGUN_18 21 463 #define MZ2_TANK_MACHINEGUN_19 22 464 #define MZ2_TANK_ROCKET_1 23 465 #define MZ2_TANK_ROCKET_2 24 466 #define MZ2_TANK_ROCKET_3 25 467 468 #define MZ2_INFANTRY_MACHINEGUN_1 26 469 #define MZ2_INFANTRY_MACHINEGUN_2 27 470 #define MZ2_INFANTRY_MACHINEGUN_3 28 471 #define MZ2_INFANTRY_MACHINEGUN_4 29 472 #define MZ2_INFANTRY_MACHINEGUN_5 30 473 #define MZ2_INFANTRY_MACHINEGUN_6 31 474 #define MZ2_INFANTRY_MACHINEGUN_7 32 475 #define MZ2_INFANTRY_MACHINEGUN_8 33 476 #define MZ2_INFANTRY_MACHINEGUN_9 34 477 #define MZ2_INFANTRY_MACHINEGUN_10 35 478 #define MZ2_INFANTRY_MACHINEGUN_11 36 479 #define MZ2_INFANTRY_MACHINEGUN_12 37 480 #define MZ2_INFANTRY_MACHINEGUN_13 38 481 482 #define MZ2_SOLDIER_BLASTER_1 39 483 #define MZ2_SOLDIER_BLASTER_2 40 484 #define MZ2_SOLDIER_SHOTGUN_1 41 485 #define MZ2_SOLDIER_SHOTGUN_2 42 486 #define MZ2_SOLDIER_MACHINEGUN_1 43 487 #define MZ2_SOLDIER_MACHINEGUN_2 44 488 489 #define MZ2_GUNNER_MACHINEGUN_1 45 490 #define MZ2_GUNNER_MACHINEGUN_2 46 491 #define MZ2_GUNNER_MACHINEGUN_3 47 492 #define MZ2_GUNNER_MACHINEGUN_4 48 493 #define MZ2_GUNNER_MACHINEGUN_5 49 494 #define MZ2_GUNNER_MACHINEGUN_6 50 495 #define MZ2_GUNNER_MACHINEGUN_7 51 496 #define MZ2_GUNNER_MACHINEGUN_8 52 497 #define MZ2_GUNNER_GRENADE_1 53 498 #define MZ2_GUNNER_GRENADE_2 54 499 #define MZ2_GUNNER_GRENADE_3 55 500 #define MZ2_GUNNER_GRENADE_4 56 501 502 #define MZ2_CHICK_ROCKET_1 57 503 504 #define MZ2_FLYER_BLASTER_1 58 505 #define MZ2_FLYER_BLASTER_2 59 506 507 #define MZ2_MEDIC_BLASTER_1 60 508 509 #define MZ2_GLADIATOR_RAILGUN_1 61 510 511 #define MZ2_HOVER_BLASTER_1 62 512 513 #define MZ2_ACTOR_MACHINEGUN_1 63 514 515 #define MZ2_SUPERTANK_MACHINEGUN_1 64 516 #define MZ2_SUPERTANK_MACHINEGUN_2 65 517 #define MZ2_SUPERTANK_MACHINEGUN_3 66 518 #define MZ2_SUPERTANK_MACHINEGUN_4 67 519 #define MZ2_SUPERTANK_MACHINEGUN_5 68 520 #define MZ2_SUPERTANK_MACHINEGUN_6 69 521 #define MZ2_SUPERTANK_ROCKET_1 70 522 #define MZ2_SUPERTANK_ROCKET_2 71 523 #define MZ2_SUPERTANK_ROCKET_3 72 524 525 #define MZ2_BOSS2_MACHINEGUN_L1 73 526 #define MZ2_BOSS2_MACHINEGUN_L2 74 527 #define MZ2_BOSS2_MACHINEGUN_L3 75 528 #define MZ2_BOSS2_MACHINEGUN_L4 76 529 #define MZ2_BOSS2_MACHINEGUN_L5 77 530 #define MZ2_BOSS2_ROCKET_1 78 531 #define MZ2_BOSS2_ROCKET_2 79 532 #define MZ2_BOSS2_ROCKET_3 80 533 #define MZ2_BOSS2_ROCKET_4 81 534 535 #define MZ2_FLOAT_BLASTER_1 82 536 537 #define MZ2_SOLDIER_BLASTER_3 83 538 #define MZ2_SOLDIER_SHOTGUN_3 84 539 #define MZ2_SOLDIER_MACHINEGUN_3 85 540 #define MZ2_SOLDIER_BLASTER_4 86 541 #define MZ2_SOLDIER_SHOTGUN_4 87 542 #define MZ2_SOLDIER_MACHINEGUN_4 88 543 #define MZ2_SOLDIER_BLASTER_5 89 544 #define MZ2_SOLDIER_SHOTGUN_5 90 545 #define MZ2_SOLDIER_MACHINEGUN_5 91 546 #define MZ2_SOLDIER_BLASTER_6 92 547 #define MZ2_SOLDIER_SHOTGUN_6 93 548 #define MZ2_SOLDIER_MACHINEGUN_6 94 549 #define MZ2_SOLDIER_BLASTER_7 95 550 #define MZ2_SOLDIER_SHOTGUN_7 96 551 #define MZ2_SOLDIER_MACHINEGUN_7 97 552 #define MZ2_SOLDIER_BLASTER_8 98 553 #define MZ2_SOLDIER_SHOTGUN_8 99 554 #define MZ2_SOLDIER_MACHINEGUN_8 100 555 556 // --- Xian shit below --- 557 #define MZ2_MAKRON_BFG 101 558 #define MZ2_MAKRON_BLASTER_1 102 559 #define MZ2_MAKRON_BLASTER_2 103 560 #define MZ2_MAKRON_BLASTER_3 104 561 #define MZ2_MAKRON_BLASTER_4 105 562 #define MZ2_MAKRON_BLASTER_5 106 563 #define MZ2_MAKRON_BLASTER_6 107 564 #define MZ2_MAKRON_BLASTER_7 108 565 #define MZ2_MAKRON_BLASTER_8 109 566 #define MZ2_MAKRON_BLASTER_9 110 567 #define MZ2_MAKRON_BLASTER_10 111 568 #define MZ2_MAKRON_BLASTER_11 112 569 #define MZ2_MAKRON_BLASTER_12 113 570 #define MZ2_MAKRON_BLASTER_13 114 571 #define MZ2_MAKRON_BLASTER_14 115 572 #define MZ2_MAKRON_BLASTER_15 116 573 #define MZ2_MAKRON_BLASTER_16 117 574 #define MZ2_MAKRON_BLASTER_17 118 575 #define MZ2_MAKRON_RAILGUN_1 119 576 #define MZ2_JORG_MACHINEGUN_L1 120 577 #define MZ2_JORG_MACHINEGUN_L2 121 578 #define MZ2_JORG_MACHINEGUN_L3 122 579 #define MZ2_JORG_MACHINEGUN_L4 123 580 #define MZ2_JORG_MACHINEGUN_L5 124 581 #define MZ2_JORG_MACHINEGUN_L6 125 582 #define MZ2_JORG_MACHINEGUN_R1 126 583 #define MZ2_JORG_MACHINEGUN_R2 127 584 #define MZ2_JORG_MACHINEGUN_R3 128 585 #define MZ2_JORG_MACHINEGUN_R4 129 586 #define MZ2_JORG_MACHINEGUN_R5 130 587 #define MZ2_JORG_MACHINEGUN_R6 131 588 #define MZ2_JORG_BFG_1 132 589 #define MZ2_BOSS2_MACHINEGUN_R1 133 590 #define MZ2_BOSS2_MACHINEGUN_R2 134 591 #define MZ2_BOSS2_MACHINEGUN_R3 135 592 #define MZ2_BOSS2_MACHINEGUN_R4 136 593 #define MZ2_BOSS2_MACHINEGUN_R5 137 594 595 //ROGUE 596 #define MZ2_CARRIER_MACHINEGUN_L1 138 597 #define MZ2_CARRIER_MACHINEGUN_R1 139 598 #define MZ2_CARRIER_GRENADE 140 599 #define MZ2_TURRET_MACHINEGUN 141 600 #define MZ2_TURRET_ROCKET 142 601 #define MZ2_TURRET_BLASTER 143 602 #define MZ2_STALKER_BLASTER 144 603 #define MZ2_DAEDALUS_BLASTER 145 604 #define MZ2_MEDIC_BLASTER_2 146 605 #define MZ2_CARRIER_RAILGUN 147 606 #define MZ2_WIDOW_DISRUPTOR 148 607 #define MZ2_WIDOW_BLASTER 149 608 #define MZ2_WIDOW_RAIL 150 609 #define MZ2_WIDOW_PLASMABEAM 151 // PMM - not used 610 #define MZ2_CARRIER_MACHINEGUN_L2 152 611 #define MZ2_CARRIER_MACHINEGUN_R2 153 612 #define MZ2_WIDOW_RAIL_LEFT 154 613 #define MZ2_WIDOW_RAIL_RIGHT 155 614 #define MZ2_WIDOW_BLASTER_SWEEP1 156 615 #define MZ2_WIDOW_BLASTER_SWEEP2 157 616 #define MZ2_WIDOW_BLASTER_SWEEP3 158 617 #define MZ2_WIDOW_BLASTER_SWEEP4 159 618 #define MZ2_WIDOW_BLASTER_SWEEP5 160 619 #define MZ2_WIDOW_BLASTER_SWEEP6 161 620 #define MZ2_WIDOW_BLASTER_SWEEP7 162 621 #define MZ2_WIDOW_BLASTER_SWEEP8 163 622 #define MZ2_WIDOW_BLASTER_SWEEP9 164 623 #define MZ2_WIDOW_BLASTER_100 165 624 #define MZ2_WIDOW_BLASTER_90 166 625 #define MZ2_WIDOW_BLASTER_80 167 626 #define MZ2_WIDOW_BLASTER_70 168 627 #define MZ2_WIDOW_BLASTER_60 169 628 #define MZ2_WIDOW_BLASTER_50 170 629 #define MZ2_WIDOW_BLASTER_40 171 630 #define MZ2_WIDOW_BLASTER_30 172 631 #define MZ2_WIDOW_BLASTER_20 173 632 #define MZ2_WIDOW_BLASTER_10 174 633 #define MZ2_WIDOW_BLASTER_0 175 634 #define MZ2_WIDOW_BLASTER_10L 176 635 #define MZ2_WIDOW_BLASTER_20L 177 636 #define MZ2_WIDOW_BLASTER_30L 178 637 #define MZ2_WIDOW_BLASTER_40L 179 638 #define MZ2_WIDOW_BLASTER_50L 180 639 #define MZ2_WIDOW_BLASTER_60L 181 640 #define MZ2_WIDOW_BLASTER_70L 182 641 #define MZ2_WIDOW_RUN_1 183 642 #define MZ2_WIDOW_RUN_2 184 643 #define MZ2_WIDOW_RUN_3 185 644 #define MZ2_WIDOW_RUN_4 186 645 #define MZ2_WIDOW_RUN_5 187 646 #define MZ2_WIDOW_RUN_6 188 647 #define MZ2_WIDOW_RUN_7 189 648 #define MZ2_WIDOW_RUN_8 190 649 #define MZ2_CARRIER_ROCKET_1 191 650 #define MZ2_CARRIER_ROCKET_2 192 651 #define MZ2_CARRIER_ROCKET_3 193 652 #define MZ2_CARRIER_ROCKET_4 194 653 #define MZ2_WIDOW2_BEAMER_1 195 654 #define MZ2_WIDOW2_BEAMER_2 196 655 #define MZ2_WIDOW2_BEAMER_3 197 656 #define MZ2_WIDOW2_BEAMER_4 198 657 #define MZ2_WIDOW2_BEAMER_5 199 658 #define MZ2_WIDOW2_BEAM_SWEEP_1 200 659 #define MZ2_WIDOW2_BEAM_SWEEP_2 201 660 #define MZ2_WIDOW2_BEAM_SWEEP_3 202 661 #define MZ2_WIDOW2_BEAM_SWEEP_4 203 662 #define MZ2_WIDOW2_BEAM_SWEEP_5 204 663 #define MZ2_WIDOW2_BEAM_SWEEP_6 205 664 #define MZ2_WIDOW2_BEAM_SWEEP_7 206 665 #define MZ2_WIDOW2_BEAM_SWEEP_8 207 666 #define MZ2_WIDOW2_BEAM_SWEEP_9 208 667 #define MZ2_WIDOW2_BEAM_SWEEP_10 209 668 #define MZ2_WIDOW2_BEAM_SWEEP_11 210 669 670 // ROGUE 671 672 // temp entity events 673 // 674 // Temp entity events are for things that happen 675 // at a location seperate from any existing entity. 676 // Temporary entity messages are explicitly constructed 677 // and broadcast. 678 typedef enum 679 { 680 TE_GUNSHOT, 681 TE_BLOOD, 682 TE_BLASTER, 683 TE_RAILTRAIL, 684 TE_SHOTGUN, 685 TE_EXPLOSION1, 686 TE_EXPLOSION2, 687 TE_ROCKET_EXPLOSION, 688 TE_GRENADE_EXPLOSION, 689 TE_SPARKS, 690 TE_SPLASH, 691 TE_BUBBLETRAIL, 692 TE_SCREEN_SPARKS, 693 TE_SHIELD_SPARKS, 694 TE_BULLET_SPARKS, 695 TE_LASER_SPARKS, 696 TE_PARASITE_ATTACK, 697 TE_ROCKET_EXPLOSION_WATER, 698 TE_GRENADE_EXPLOSION_WATER, 699 TE_MEDIC_CABLE_ATTACK, 700 TE_BFG_EXPLOSION, 701 TE_BFG_BIGEXPLOSION, 702 TE_BOSSTPORT, // used as '22' in a map, so DON'T RENUMBER!!! 703 TE_BFG_LASER, 704 TE_GRAPPLE_CABLE, 705 TE_WELDING_SPARKS, 706 TE_GREENBLOOD, 707 TE_BLUEHYPERBLASTER, 708 TE_PLASMA_EXPLOSION, 709 TE_TUNNEL_SPARKS, 710 //ROGUE 711 TE_BLASTER2, 712 TE_RAILTRAIL2, 713 TE_FLAME, 714 TE_LIGHTNING, 715 TE_DEBUGTRAIL, 716 TE_PLAIN_EXPLOSION, 717 TE_FLASHLIGHT, 718 TE_FORCEWALL, 719 TE_HEATBEAM, 720 TE_MONSTER_HEATBEAM, 721 TE_STEAM, 722 TE_BUBBLETRAIL2, 723 TE_MOREBLOOD, 724 TE_HEATBEAM_SPARKS, 725 TE_HEATBEAM_STEAM, 726 TE_CHAINFIST_SMOKE, 727 TE_ELECTRIC_SPARKS, 728 TE_TRACKER_EXPLOSION, 729 TE_TELEPORT_EFFECT, 730 TE_DBALL_GOAL, 731 TE_WIDOWBEAMOUT, 732 TE_NUKEBLAST, 733 TE_WIDOWSPLASH, 734 TE_EXPLOSION1_BIG, 735 TE_EXPLOSION1_NP, 736 TE_FLECHETTE 737 //ROGUE 738 } temp_event_t; 739 740 #define SPLASH_UNKNOWN 0 741 #define SPLASH_SPARKS 1 742 #define SPLASH_BLUE_WATER 2 743 #define SPLASH_BROWN_WATER 3 744 #define SPLASH_SLIME 4 745 #define SPLASH_LAVA 5 746 #define SPLASH_BLOOD 6 747 748 749 // sound channels 750 // channel 0 never willingly overrides 751 // other channels (1-7) allways override a playing sound on that channel 752 #define CHAN_AUTO 0 753 #define CHAN_WEAPON 1 754 #define CHAN_VOICE 2 755 #define CHAN_ITEM 3 756 #define CHAN_BODY 4 757 // modifier flags 758 #define CHAN_NO_PHS_ADD 8 // send to all clients, not just ones in PHS (ATTN 0 will also do this) 759 #define CHAN_RELIABLE 16 // send by reliable message, not datagram 760 761 762 // sound attenuation values 763 #define ATTN_NONE 0 // full volume the entire level 764 #define ATTN_NORM 1 765 #define ATTN_IDLE 2 766 #define ATTN_STATIC 3 // diminish very rapidly with distance 767 768 769 // player_state->stats[] indexes 770 #define STAT_HEALTH_ICON 0 771 #define STAT_HEALTH 1 772 #define STAT_AMMO_ICON 2 773 #define STAT_AMMO 3 774 #define STAT_ARMOR_ICON 4 775 #define STAT_ARMOR 5 776 #define STAT_SELECTED_ICON 6 777 #define STAT_PICKUP_ICON 7 778 #define STAT_PICKUP_STRING 8 779 #define STAT_TIMER_ICON 9 780 #define STAT_TIMER 10 781 #define STAT_HELPICON 11 782 #define STAT_SELECTED_ITEM 12 783 #define STAT_LAYOUTS 13 784 #define STAT_FRAGS 14 785 #define STAT_FLASHES 15 // cleared each frame, 1 = health, 2 = armor 786 #define STAT_CHASE 16 787 #define STAT_SPECTATOR 17 788 789 #define MAX_STATS 32 790 791 792 // dmflags->value flags 793 #define DF_NO_HEALTH 0x00000001 // 1 794 #define DF_NO_ITEMS 0x00000002 // 2 795 #define DF_WEAPONS_STAY 0x00000004 // 4 796 #define DF_NO_FALLING 0x00000008 // 8 797 #define DF_INSTANT_ITEMS 0x00000010 // 16 798 #define DF_SAME_LEVEL 0x00000020 // 32 799 #define DF_SKINTEAMS 0x00000040 // 64 800 #define DF_MODELTEAMS 0x00000080 // 128 801 #define DF_NO_FRIENDLY_FIRE 0x00000100 // 256 802 #define DF_SPAWN_FARTHEST 0x00000200 // 512 803 #define DF_FORCE_RESPAWN 0x00000400 // 1024 804 #define DF_NO_ARMOR 0x00000800 // 2048 805 #define DF_ALLOW_EXIT 0x00001000 // 4096 806 #define DF_INFINITE_AMMO 0x00002000 // 8192 807 #define DF_QUAD_DROP 0x00004000 // 16384 808 #define DF_FIXED_FOV 0x00008000 // 32768 809 810 // RAFAEL 811 #define DF_QUADFIRE_DROP 0x00010000 // 65536 812 813 //ROGUE 814 #define DF_NO_MINES 0x00020000 815 #define DF_NO_STACK_DOUBLE 0x00040000 816 #define DF_NO_NUKES 0x00080000 817 #define DF_NO_SPHERES 0x00100000 818 //ROGUE 819 820 /* 821 ========================================================== 822 823 ELEMENTS COMMUNICATED ACROSS THE NET 824 825 ========================================================== 826 */ 827 828 #define ANGLE2SHORT(x) ((int)((x)*65536/360) & 65535) 829 #define SHORT2ANGLE(x) ((x)*(360.0/65536)) 830 831 832 // 833 // config strings are a general means of communication from 834 // the server to all connected clients. 835 // Each config string can be at most MAX_QPATH characters. 836 // 837 #define CS_NAME 0 838 #define CS_CDTRACK 1 839 #define CS_SKY 2 840 #define CS_SKYAXIS 3 // %f %f %f format 841 #define CS_SKYROTATE 4 842 #define CS_STATUSBAR 5 // display program string 843 844 #define CS_AIRACCEL 29 // air acceleration control 845 #define CS_MAXCLIENTS 30 846 #define CS_MAPCHECKSUM 31 // for catching cheater maps 847 848 #define CS_MODELS 32 849 #define CS_SOUNDS (CS_MODELS+MAX_MODELS) 850 #define CS_IMAGES (CS_SOUNDS+MAX_SOUNDS) 851 #define CS_LIGHTS (CS_IMAGES+MAX_IMAGES) 852 #define CS_ITEMS (CS_LIGHTS+MAX_LIGHTSTYLES) 853 #define CS_PLAYERSKINS (CS_ITEMS+MAX_ITEMS) 854 #define CS_GENERAL (CS_PLAYERSKINS+MAX_CLIENTS) 855 #define MAX_CONFIGSTRINGS (CS_GENERAL+MAX_GENERAL) 856 857 858 //============================================== 859 860 861 // entity_state_t->event values 862 // ertity events are for effects that take place reletive 863 // to an existing entities origin. Very network efficient. 864 // All muzzle flashes really should be converted to events... 865 typedef enum 866 { 867 EV_NONE, 868 EV_ITEM_RESPAWN, 869 EV_FOOTSTEP, 870 EV_FALLSHORT, 871 EV_FALL, 872 EV_FALLFAR, 873 EV_PLAYER_TELEPORT, 874 EV_OTHER_TELEPORT 875 } entity_event_t; 876 877 878 // entity_state_t is the information conveyed from the server 879 // in an update message about entities that the client will 880 // need to render in some way 881 typedef struct entity_state_s 882 { 883 int number; // edict index 884 885 vec3_t origin; 886 vec3_t angles; 887 vec3_t old_origin; // for lerping 888 int modelindex; 889 int modelindex2, modelindex3, modelindex4; // weapons, CTF flags, etc 890 int frame; 891 int skinnum; 892 unsigned int effects; // PGM - we're filling it, so it needs to be unsigned 893 int renderfx; 894 int solid; // for client side prediction, 8*(bits 0-4) is x/y radius 895 // 8*(bits 5-9) is z down distance, 8(bits10-15) is z up 896 // gi.linkentity sets this properly 897 int sound; // for looping sounds, to guarantee shutoff 898 int event; // impulse events -- muzzle flashes, footsteps, etc 899 // events only go out for a single frame, they 900 // are automatically cleared each frame 901 } entity_state_t; 902 //============================================== 903 904 905 // player_state_t is the information needed in addition to pmove_state_t 906 // to rendered a view. There will only be 10 player_state_t sent each second, 907 // but the number of pmove_state_t changes will be reletive to client 908 // frame rates 909 typedef struct 910 { 911 pmove_state_t pmove; // for prediction 912 913 // these fields do not need to be communicated bit-precise 914 915 vec3_t viewangles; // for fixed views 916 vec3_t viewoffset; // add to pmovestate->origin 917 vec3_t kick_angles; // add to view direction to get render angles 918 // set by weapon kicks, pain effects, etc 919 920 vec3_t gunangles; 921 vec3_t gunoffset; 922 int gunindex; 923 int gunframe; 924 925 float blend[4]; // rgba full screen effect 926 927 float fov; // horizontal field of view 928 929 int rdflags; // refdef flags 930 931 short stats[MAX_STATS]; // fast status bar updates 932 } player_state_t; 933 934 // game.h 935 // game.h -- game dll information visible to server 936 937 #define GAME_API_VERSION 3 938 939 // edict->svflags 940 941 #define SVF_NOCLIENT 0x00000001 // don't send entity to clients, even if it has effects 942 #define SVF_DEADMONSTER 0x00000002 // treat as CONTENTS_DEADMONSTER for collision 943 #define SVF_MONSTER 0x00000004 // treat as CONTENTS_MONSTER for collision 944 945 // edict->solid values 946 947 typedef enum 948 { 949 SOLID_NOT, // no interaction with other objects 950 SOLID_TRIGGER, // only touch when inside, after moving 951 SOLID_BBOX, // touch on edge 952 SOLID_BSP // bsp clip, touch on edge 953 } solid_t; 954 955 //=============================================================== 956 957 // link_t is only used for entity area links now 958 typedef struct link_s 959 { 960 struct link_s *prev, *next; 961 } link_t; 962 963 #define MAX_ENT_CLUSTERS 16 964 965 typedef struct edict_s edict_t; 966 typedef struct gclient_s gclient_t; 967 968 969 #ifndef GAME_INCLUDE 970 struct gclient_s 971 { 972 player_state_t ps; // communicated by server to clients 973 int ping; 974 // the game dll can add anything it wants after 975 // this point in the structure 976 }; 977 978 979 struct edict_s 980 { 981 entity_state_t s; 982 struct gclient_s *client; 983 qboolean inuse; 984 int linkcount; 985 986 // FIXME: move these fields to a server private sv_entity_t 987 link_t area; // linked to a division node or leaf 988 989 int num_clusters; // if -1, use headnode instead 990 int clusternums[MAX_ENT_CLUSTERS]; 991 int headnode; // unused if num_clusters != -1 992 int areanum, areanum2; 993 994 //================================ 995 996 int svflags; // SVF_NOCLIENT, SVF_DEADMONSTER, SVF_MONSTER, etc 997 vec3_t mins, maxs; 998 vec3_t absmin, absmax, size; 999 solid_t solid; 1000 int clipmask; 1001 edict_t *owner; 1002 1003 // the game dll can add anything it wants after 1004 // this point in the structure 1005 }; 1006 1007 #endif // GAME_INCLUDE 1008 1009 // 1010 // functions provided by the main engine 1011 // 1012 typedef struct 1013 { 1014 // special messages 1015 void (*bprintf) (int printlevel, char *fmt, ...); 1016 void (*dprintf) (char *fmt, ...); 1017 void (*cprintf) (edict_t *ent, int printlevel, char *fmt, ...); 1018 void (*centerprintf) (edict_t *ent, char *fmt, ...); 1019 void (*sound) (edict_t *ent, int channel, int soundindex, float volume, float attenuation, float timeofs); 1020 void (*positioned_sound) (vec3_t origin, edict_t *ent, int channel, int soundinedex, float volume, float attenuation, float timeofs); 1021 1022 // config strings hold all the index strings, the lightstyles, 1023 // and misc data like the sky definition and cdtrack. 1024 // All of the current configstrings are sent to clients when 1025 // they connect, and changes are sent to all connected clients. 1026 void (*configstring) (int num, char *string); 1027 1028 void (*error) (char *fmt, ...); 1029 1030 // the *index functions create configstrings and some internal server state 1031 int (*modelindex) (char *name); 1032 int (*soundindex) (char *name); 1033 int (*imageindex) (char *name); 1034 1035 void (*setmodel) (edict_t *ent, char *name); 1036 1037 // collision detection 1038 trace_t (*trace) (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passent, int contentmask); 1039 int (*pointcontents) (vec3_t point); 1040 qboolean (*inPVS) (vec3_t p1, vec3_t p2); 1041 qboolean (*inPHS) (vec3_t p1, vec3_t p2); 1042 void (*SetAreaPortalState) (int portalnum, qboolean open); 1043 qboolean (*AreasConnected) (int area1, int area2); 1044 1045 // an entity will never be sent to a client or used for collision 1046 // if it is not passed to linkentity. If the size, position, or 1047 // solidity changes, it must be relinked. 1048 void (*linkentity) (edict_t *ent); 1049 void (*unlinkentity) (edict_t *ent); // call before removing an interactive edict 1050 int (*BoxEdicts) (vec3_t mins, vec3_t maxs, edict_t **list, int maxcount, int areatype); 1051 void (*Pmove) (pmove_t *pmove); // player movement code common with client prediction 1052 1053 // network messaging 1054 void (*multicast) (vec3_t origin, multicast_t to); 1055 void (*unicast) (edict_t *ent, qboolean reliable); 1056 void (*WriteChar) (int c); 1057 void (*WriteByte) (int c); 1058 void (*WriteShort) (int c); 1059 void (*WriteLong) (int c); 1060 void (*WriteFloat) (float f); 1061 void (*WriteString) (char *s); 1062 void (*WritePosition) (vec3_t pos); // some fractional bits 1063 void (*WriteDir) (vec3_t pos); // single byte encoded, very coarse 1064 void (*WriteAngle) (float f); 1065 1066 // managed memory allocation 1067 void *(*TagMalloc) (int size, int tag); 1068 void (*TagFree) (void *block); 1069 void (*FreeTags) (int tag); 1070 1071 // console variable interaction 1072 cvar_t *(*cvar) (char *var_name, char *value, int flags); 1073 cvar_t *(*cvar_set) (char *var_name, char *value); 1074 cvar_t *(*cvar_forceset) (char *var_name, char *value); 1075 1076 // ClientCommand and ServerCommand parameter access 1077 int (*argc) (void); 1078 char *(*argv) (int n); 1079 char *(*args) (void); // concatenation of all argv >= 1 1080 1081 // add commands to the server console as if they were typed in 1082 // for map changing, etc 1083 void (*AddCommandString) (char *text); 1084 1085 void (*DebugGraph) (float value, int color); 1086 } game_import_t; 1087 1088 // 1089 // functions exported by the game subsystem 1090 // 1091 typedef struct 1092 { 1093 int apiversion; 1094 1095 // the init function will only be called when a game starts, 1096 // not each time a level is loaded. Persistant data for clients 1097 // and the server can be allocated in init 1098 void (*Init) (void); 1099 void (*Shutdown) (void); 1100 1101 // each new level entered will cause a call to SpawnEntities 1102 void (*SpawnEntities) (char *mapname, char *entstring, char *spawnpoint); 1103 1104 // Read/Write Game is for storing persistant cross level information 1105 // about the world state and the clients. 1106 // WriteGame is called every time a level is exited. 1107 // ReadGame is called on a loadgame. 1108 void (*WriteGame) (char *filename, qboolean autosave); 1109 void (*ReadGame) (char *filename); 1110 1111 // ReadLevel is called after the default map information has been 1112 // loaded with SpawnEntities 1113 void (*WriteLevel) (char *filename); 1114 void (*ReadLevel) (char *filename); 1115 1116 qboolean (*ClientConnect) (edict_t *ent, char *userinfo); 1117 void (*ClientBegin) (edict_t *ent); 1118 void (*ClientUserinfoChanged) (edict_t *ent, char *userinfo); 1119 void (*ClientDisconnect) (edict_t *ent); 1120 void (*ClientCommand) (edict_t *ent); 1121 void (*ClientThink) (edict_t *ent, usercmd_t *cmd); 1122 1123 void (*RunFrame) (void); 1124 1125 // ServerCommand will be called when an "sv <command>" command is issued on the 1126 // server console. 1127 // The game can issue gi.argc() / gi.argv() commands to get the rest 1128 // of the parameters 1129 void (*ServerCommand) (void); 1130 1131 // 1132 // global variables shared between game and server 1133 // 1134 1135 // The edict array is allocated in the game dll so it 1136 // can vary in size from one game to another. 1137 // 1138 // The size will be fixed when ge->Init() is called 1139 struct edict_s *edicts; 1140 int edict_size; 1141 int num_edicts; // current number, <= max_edicts 1142 int max_edicts; 1143 } game_export_t; 1144 1145 1146 #endif // __Q2DEFINES_H 1147