1 #ifndef ITEM_TYPES_H 2 #define ITEM_TYPES_H 3 4 #include "Types.h" 5 6 enum ItemCursor 7 { 8 INVALIDCURS = 0, 9 QUESTCURS = 1, 10 PUNCHCURS = 2, 11 TARGETCURS = 3, 12 KNIFECURS = 4, 13 AIDCURS = 5, 14 TOSSCURS = 6, 15 MINECURS = 8, 16 LPICKCURS = 9, 17 MDETECTCURS = 10, 18 CROWBARCURS = 11, 19 SURVCAMCURS = 12, 20 CAMERACURS = 13, 21 KEYCURS = 14, 22 SAWCURS = 15, 23 WIRECUTCURS = 16, 24 REMOTECURS = 17, 25 BOMBCURS = 18, // (only calculated, not set item table) 26 REPAIRCURS = 19, 27 TRAJECTORYCURS = 20, 28 JARCURS = 21, 29 TINCANCURS = 22, 30 REFUELCURS = 23 31 }; 32 33 #define ITEM_NOT_FOUND -1 34 35 36 #define USABLE 10 // minimum work% of items to still be usable 37 38 #define MAX_OBJECTS_PER_SLOT 8 39 #define MAX_ATTACHMENTS 4 40 #define MAX_MONEY_PER_SLOT 20000 41 42 enum DetonatorType 43 { 44 BOMB_TIMED = 1, 45 BOMB_REMOTE, 46 BOMB_PRESSURE, 47 BOMB_SWITCH 48 }; 49 50 #define FIRST_MAP_PLACED_FREQUENCY 50 51 #define PANIC_FREQUENCY 127 52 #define PANIC_FREQUENCY_2 126 53 #define PANIC_FREQUENCY_3 125 54 55 #define OBJECT_UNDROPPABLE 0x01 56 #define OBJECT_MODIFIED 0x02 57 #define OBJECT_AI_UNUSABLE 0x04 58 #define OBJECT_ARMED_BOMB 0x08 59 #define OBJECT_KNOWN_TO_BE_TRAPPED 0x10 60 #define OBJECT_DISABLED_BOMB 0x20 61 #define OBJECT_ALARM_TRIGGER 0x40 62 #define OBJECT_NO_OVERWRITE 0x80 63 64 struct OBJECTTYPE 65 { 66 UINT16 usItem; 67 UINT8 ubNumberOfObjects; 68 union 69 { 70 struct 71 { 72 INT8 bGunStatus; // status % of gun 73 UINT8 ubGunAmmoType; // ammo type, as per weapons.h 74 UINT8 ubGunShotsLeft; // duh, amount of ammo left 75 UINT16 usGunAmmoItem; // the item # for the item table 76 INT8 bGunAmmoStatus; // only for "attached ammo" - grenades, mortar shells 77 UINT8 ubGunUnused[MAX_OBJECTS_PER_SLOT - 6]; // XXX HACK000B 78 }; 79 struct 80 { 81 UINT8 ubShotsLeft[MAX_OBJECTS_PER_SLOT]; 82 }; 83 struct 84 { 85 INT8 bStatus[MAX_OBJECTS_PER_SLOT]; 86 }; 87 struct 88 { 89 INT8 bMoneyStatus; 90 UINT32 uiMoneyAmount; 91 UINT8 ubMoneyUnused[MAX_OBJECTS_PER_SLOT - 5]; // XXX HACK000B 92 }; 93 struct 94 { 95 // this is used by placed bombs, switches, and the action item 96 INT8 bBombStatus; // % status 97 INT8 bDetonatorType; // timed, remote, or pressure-activated 98 UINT16 usBombItem; // the usItem of the bomb. 99 union 100 { 101 struct 102 { 103 INT8 bDelay; // >=0 values used only 104 }; 105 struct 106 { 107 INT8 bFrequency; // >=0 values used only 108 }; 109 }; 110 UINT8 ubBombOwner; // side which placed the bomb 111 UINT8 bActionValue;// this is used by the ACTION_ITEM fake item 112 UINT8 ubTolerance; // tolerance value for panic triggers 113 }; 114 struct 115 { 116 INT8 bKeyStatus[ 6 ]; 117 UINT8 ubKeyID; 118 UINT8 ubKeyUnused[1]; // XXX HACK000B 119 }; 120 struct 121 { 122 UINT8 ubOwnerProfile; 123 UINT8 ubOwnerCivGroup; 124 UINT8 ubOwnershipUnused[6]; // XXX HACK000B 125 }; 126 }; 127 // attached objects 128 UINT16 usAttachItem[MAX_ATTACHMENTS]; 129 INT8 bAttachStatus[MAX_ATTACHMENTS]; 130 131 INT8 fFlags; 132 UINT8 ubMission; 133 INT8 bTrap; // 1-10 exp_lvl to detect 134 UINT8 ubImprintID; // ID of merc that item is imprinted on 135 UINT8 ubWeight; 136 UINT8 fUsed; // flags for whether the item is used or not 137 }; 138 139 140 // SUBTYPES 141 #define IC_NONE 0x00000001 142 #define IC_GUN 0x00000002 143 #define IC_BLADE 0x00000004 144 #define IC_THROWING_KNIFE 0x00000008 145 146 #define IC_LAUNCHER 0x00000010 147 #define IC_TENTACLES 0x00000020 148 149 #define IC_THROWN 0x00000040 150 #define IC_PUNCH 0x00000080 151 152 #define IC_GRENADE 0x00000100 153 #define IC_BOMB 0x00000200 154 #define IC_AMMO 0x00000400 155 #define IC_ARMOUR 0x00000800 156 157 #define IC_MEDKIT 0x00001000 158 #define IC_KIT 0x00002000 159 #define IC_FACE 0x00008000 160 161 #define IC_KEY 0x00010000 162 163 #define IC_MISC 0x10000000 164 #define IC_MONEY 0x20000000 165 166 // PARENT TYPES 167 #define IC_ALL 0xFFFFFFFF 168 169 #define IC_WEAPON ( IC_GUN | IC_BLADE | IC_THROWING_KNIFE | IC_LAUNCHER | IC_TENTACLES ) 170 #define IC_EXPLOSV ( IC_GRENADE | IC_BOMB ) 171 172 #define IC_BOBBY_GUN ( IC_GUN | IC_LAUNCHER ) 173 #define IC_BOBBY_MISC ( IC_GRENADE | IC_BOMB | IC_MISC | IC_MEDKIT | IC_KIT | IC_BLADE | IC_THROWING_KNIFE | IC_PUNCH | IC_FACE ) 174 175 176 // replaces candamage 177 #define ITEM_DAMAGEABLE 0x0001 178 // replaces canrepair 179 #define ITEM_REPAIRABLE 0x0002 180 // replaces waterdamage 181 #define ITEM_WATER_DAMAGES 0x0004 182 // replaces metal 183 #define ITEM_METAL 0x0008 184 // replaces sinkable 185 #define ITEM_SINKS 0x0010 186 // replaces seemeter 187 #define ITEM_SHOW_STATUS 0x0020 188 // for attachers/merges, hidden 189 #define ITEM_HIDDEN_ADDON 0x0040 190 // needs two hands 191 #define ITEM_TWO_HANDED 0x0080 192 // can't be found for sale 193 #define ITEM_NOT_BUYABLE 0x0100 194 // item is an attachment for something 195 #define ITEM_ATTACHMENT 0x0200 196 // item only belongs in the "big gun list" 197 #define ITEM_BIGGUNLIST 0x0400 198 // item should not be placed via the editor 199 #define ITEM_NOT_EDITOR 0x0800 200 // item defaults to undroppable 201 #define ITEM_DEFAULT_UNDROPPABLE 0x1000 202 // item is terrible for throwing 203 #define ITEM_UNAERODYNAMIC 0x2000 204 // item is electronic for repair (etc) purposes 205 #define ITEM_ELECTRONIC 0x4000 206 // item is a PERMANENT attachment 207 #define ITEM_INSEPARABLE 0x8000 208 209 // item flag combinations 210 211 #define IF_STANDARD_GUN ITEM_DAMAGEABLE | ITEM_WATER_DAMAGES | ITEM_REPAIRABLE | ITEM_SHOW_STATUS | ITEM_METAL | ITEM_SINKS 212 #define IF_TWOHANDED_GUN IF_STANDARD_GUN | ITEM_TWO_HANDED 213 #define IF_STANDARD_BLADE ITEM_DAMAGEABLE | ITEM_WATER_DAMAGES | ITEM_REPAIRABLE | ITEM_SHOW_STATUS | ITEM_METAL | ITEM_SINKS 214 #define IF_STANDARD_ARMOUR ITEM_DAMAGEABLE | ITEM_REPAIRABLE | ITEM_SHOW_STATUS | ITEM_SINKS 215 #define IF_STANDARD_KIT ITEM_DAMAGEABLE | ITEM_SHOW_STATUS | ITEM_SINKS 216 #define IF_STANDARD_CLIP ITEM_SINKS | ITEM_METAL 217 218 #define EXPLOSIVE_GUN( x ) ( x == ROCKET_LAUNCHER || x == TANK_CANNON ) 219 220 #define FIRST_WEAPON 1 221 #define LAST_WEAPON 70 222 #define FIRST_AMMO 71 223 #define LAST_AMMO 130 224 #define MAX_AMMO (LAST_AMMO - FIRST_AMMO + 1) 225 #define FIRST_EXPLOSIVE 131 226 #define FIRST_ARMOUR 161 227 #define FIRST_KEY 271 228 229 #define NOTHING NONE 230 enum ITEMDEFINE 231 { 232 NONE = 0, 233 234 // weapons 235 GLOCK_17 = FIRST_WEAPON, 236 GLOCK_18, 237 __ITEM_3, // BERETTA_92F, 238 __ITEM_4, // BERETTA_93R, 239 SW38, 240 __ITEM_6, // BARRACUDA, 241 DESERTEAGLE, 242 __ITEM_8, // M1911, 243 __ITEM_9, // MP5K, 244 __ITEM_10, // MAC10, 245 246 __ITEM_11, // THOMPSON, 247 __ITEM_12, // COMMANDO, 248 __ITEM_13, // MP53, 249 __ITEM_14, // AKSU74, 250 __ITEM_15, // P90, 251 __ITEM_16, // TYPE85, 252 __ITEM_17, // SKS, 253 __ITEM_18, // DRAGUNOV, 254 __ITEM_19, // M24, 255 __ITEM_20, // AUG, 256 257 G41, 258 __ITEM_22, // MINI14, 259 __ITEM_23, // C7, 260 __ITEM_24, // FAMAS, 261 __ITEM_25, // AK74, 262 __ITEM_26, // AKM, 263 __ITEM_27, // M14, 264 __ITEM_28, // FNFAL, 265 __ITEM_29, // G3A3, 266 G11, 267 268 __ITEM_31, // M870, 269 __ITEM_32, // SPAS15, 270 __ITEM_33, // CAWS, 271 MINIMI, 272 __ITEM_35, // RPK74, 273 __ITEM_36, // HK21E, 274 COMBAT_KNIFE, 275 THROWING_KNIFE, 276 ROCK, 277 GLAUNCHER, 278 279 MORTAR, 280 ROCK2, 281 CREATURE_YOUNG_MALE_CLAWS, 282 CREATURE_OLD_MALE_CLAWS, 283 CREATURE_YOUNG_FEMALE_CLAWS, 284 CREATURE_OLD_FEMALE_CLAWS, 285 CREATURE_QUEEN_TENTACLES, 286 CREATURE_QUEEN_SPIT, 287 BRASS_KNUCKLES, 288 UNDER_GLAUNCHER, 289 290 ROCKET_LAUNCHER, 291 BLOODCAT_CLAW_ATTACK, 292 BLOODCAT_BITE, 293 __ITEM_54, // MACHETE, 294 ROCKET_RIFLE, 295 AUTOMAG_III, 296 CREATURE_INFANT_SPIT, 297 CREATURE_YOUNG_MALE_SPIT, 298 CREATURE_OLD_MALE_SPIT, 299 TANK_CANNON, 300 301 DART_GUN, 302 BLOODY_THROWING_KNIFE, 303 FLAMETHROWER, 304 CROWBAR, 305 AUTO_ROCKET_RIFLE, 306 __ITEM_66, // NOTHING, 307 __ITEM_67, // NOTHING, 308 __ITEM_68, // NOTHING, 309 __ITEM_69, // NOTHING, 310 __ITEM_70, // NOTHING, 311 MAX_WEAPONS = ( FIRST_AMMO - 1 ), 312 313 CLIP9_15 = FIRST_AMMO, 314 CLIP9_30, 315 __ITEM_73, // CLIP9_15_AP, 316 __ITEM_74, // CLIP9_30_AP, 317 __ITEM_75, // CLIP9_15_HP, 318 __ITEM_76, // CLIP9_30_HP, 319 CLIP38_6, 320 __ITEM_78, // CLIP38_6_AP, 321 __ITEM_79, // CLIP38_6_HP, 322 CLIP45_7, 323 324 CLIP45_30, 325 __ITEM_82, // CLIP45_7_AP, 326 __ITEM_83, // CLIP45_30_AP, 327 __ITEM_84, // CLIP45_7_HP, 328 __ITEM_85, // CLIP45_30_HP, 329 CLIP357_6, 330 CLIP357_9, 331 __ITEM_88, // CLIP357_6_AP, 332 __ITEM_89, // CLIP357_9_AP, 333 __ITEM_90, // CLIP357_6_HP, 334 335 __ITEM_91, // CLIP357_9_HP, 336 __ITEM_92, // CLIP545_30_AP, 337 CLIP545_30_HP, 338 __ITEM_94, // CLIP556_30_AP, 339 CLIP556_30_HP, 340 __ITEM_96, // CLIP762W_10_AP, 341 __ITEM_97, // CLIP762W_30_AP, 342 CLIP762W_10_HP, 343 CLIP762W_30_HP, 344 CLIP762N_5_AP, 345 346 __ITEM_101, // CLIP762N_20_AP, 347 CLIP762N_5_HP, 348 CLIP762N_20_HP, 349 __ITEM_104, // CLIP47_50_SAP, 350 __ITEM_105, // CLIP57_50_AP, 351 __ITEM_106, // CLIP57_50_HP, 352 CLIP12G_7, 353 CLIP12G_7_BUCKSHOT, 354 __ITEM_109, // CLIPCAWS_10_SAP, 355 __ITEM_110, // CLIPCAWS_10_FLECH, 356 357 __ITEM_111, // CLIPROCKET_AP, 358 __ITEM_112, // CLIPROCKET_HE, 359 __ITEM_113, // CLIPROCKET_HEAT, 360 __ITEM_114, // CLIPDART_SLEEP, 361 362 __ITEM_115, // CLIPFLAME, 363 __ITEM_116, // NOTHING 364 __ITEM_117, // NOTHING 365 __ITEM_118, // NOTHING 366 __ITEM_119, // NOTHING 367 __ITEM_120, // NOTHING 368 __ITEM_121, // NOTHING 369 __ITEM_122, // NOTHING 370 __ITEM_123, // NOTHING 371 __ITEM_124, // NOTHING 372 __ITEM_125, // NOTHING 373 __ITEM_126, // NOTHING 374 __ITEM_127, // NOTHING 375 __ITEM_128, // NOTHING 376 __ITEM_129, // NOTHING 377 __ITEM_130, // NOTHING 378 379 // explosives 380 STUN_GRENADE = FIRST_EXPLOSIVE, 381 TEARGAS_GRENADE, 382 MUSTARD_GRENADE, 383 MINI_GRENADE, 384 HAND_GRENADE, 385 RDX, 386 TNT, 387 HMX, 388 C1, 389 MORTAR_SHELL, 390 391 MINE, 392 C4, 393 TRIP_FLARE, 394 TRIP_KLAXON, 395 SHAPED_CHARGE, 396 BREAK_LIGHT, 397 GL_HE_GRENADE, 398 GL_TEARGAS_GRENADE, 399 GL_STUN_GRENADE, 400 GL_SMOKE_GRENADE, 401 402 SMOKE_GRENADE, 403 TANK_SHELL, 404 STRUCTURE_IGNITE, 405 __ITEM_154, // CREATURE_COCKTAIL, 406 STRUCTURE_EXPLOSION, 407 GREAT_BIG_EXPLOSION, 408 BIG_TEAR_GAS, 409 SMALL_CREATURE_GAS, 410 LARGE_CREATURE_GAS, 411 VERY_SMALL_CREATURE_GAS, 412 413 // armor 414 FLAK_JACKET, 415 FLAK_JACKET_18, 416 FLAK_JACKET_Y, 417 KEVLAR_VEST, 418 KEVLAR_VEST_18, 419 KEVLAR_VEST_Y, 420 SPECTRA_VEST, 421 SPECTRA_VEST_18, 422 SPECTRA_VEST_Y, 423 KEVLAR_LEGGINGS, 424 425 KEVLAR_LEGGINGS_18, 426 KEVLAR_LEGGINGS_Y, 427 SPECTRA_LEGGINGS, 428 SPECTRA_LEGGINGS_18, 429 SPECTRA_LEGGINGS_Y, 430 STEEL_HELMET, 431 KEVLAR_HELMET, 432 KEVLAR_HELMET_18, 433 KEVLAR_HELMET_Y, 434 SPECTRA_HELMET, 435 436 SPECTRA_HELMET_18, 437 SPECTRA_HELMET_Y, 438 CERAMIC_PLATES, 439 CREATURE_INFANT_HIDE, 440 CREATURE_YOUNG_MALE_HIDE, 441 CREATURE_OLD_MALE_HIDE, 442 CREATURE_QUEEN_HIDE, 443 LEATHER_JACKET, 444 LEATHER_JACKET_W_KEVLAR, 445 LEATHER_JACKET_W_KEVLAR_18, 446 447 LEATHER_JACKET_W_KEVLAR_Y, 448 CREATURE_YOUNG_FEMALE_HIDE, 449 CREATURE_OLD_FEMALE_HIDE, 450 TSHIRT, 451 TSHIRT_DEIDRANNA, 452 KEVLAR2_VEST, 453 KEVLAR2_VEST_18, 454 KEVLAR2_VEST_Y, 455 __ITEM_199, 456 __ITEM_200, 457 458 // kits 459 FIRSTAIDKIT, 460 MEDICKIT, 461 TOOLKIT, 462 LOCKSMITHKIT, 463 CAMOUFLAGEKIT, 464 __ITEM_206, // BOOBYTRAPKIT, 465 SILENCER, 466 SNIPERSCOPE, 467 BIPOD, 468 EXTENDEDEAR, 469 470 NIGHTGOGGLES, 471 SUNGOGGLES, 472 GASMASK, 473 CANTEEN, 474 METALDETECTOR, 475 COMPOUND18, 476 JAR_QUEEN_CREATURE_BLOOD, 477 JAR_ELIXIR, 478 MONEY, 479 JAR, 480 481 JAR_CREATURE_BLOOD, 482 ADRENALINE_BOOSTER, 483 DETONATOR, 484 REMDETONATOR, 485 __ITEM_225, // VIDEOTAPE, 486 DEED, 487 LETTER, 488 __ITEM_228, // TERRORIST_INFO, 489 CHALICE, 490 BLOODCAT_CLAWS, 491 492 BLOODCAT_TEETH, 493 BLOODCAT_PELT, 494 SWITCH, 495 ACTION_ITEM, 496 REGEN_BOOSTER, 497 SYRINGE_3, 498 SYRINGE_4, 499 SYRINGE_5, 500 JAR_HUMAN_BLOOD, 501 OWNERSHIP, 502 503 // additional items 504 LASERSCOPE, 505 REMOTEBOMBTRIGGER, 506 WIRECUTTERS, 507 DUCKBILL, 508 ALCOHOL, 509 UVGOGGLES, 510 DISCARDED_LAW, 511 HEAD_1, 512 HEAD_2, 513 HEAD_3, 514 HEAD_4, 515 HEAD_5, 516 HEAD_6, 517 HEAD_7, 518 WINE, 519 BEER, 520 __ITEM_257, // PORNOS, 521 VIDEO_CAMERA, 522 ROBOT_REMOTE_CONTROL, 523 CREATURE_PART_CLAWS, 524 CREATURE_PART_FLESH, 525 CREATURE_PART_ORGAN, 526 REMOTETRIGGER, 527 GOLDWATCH, 528 __ITEM_265, // GOLFCLUBS, 529 WALKMAN, 530 __ITEM_267, // PORTABLETV, 531 MONEY_FOR_PLAYERS_ACCOUNT, 532 CIGARS, 533 __ITEM_270, // NOTHING 534 535 KEY_1 = FIRST_KEY, 536 __ITEM_272, // KEY_2, 537 __ITEM_273, // KEY_3, 538 __ITEM_274, // KEY_4, 539 __ITEM_275, // KEY_5, 540 __ITEM_276, // KEY_6, 541 __ITEM_277, // KEY_7, 542 __ITEM_278, // KEY_8, 543 __ITEM_279, // KEY_9, 544 __ITEM_280, // KEY_10, 545 546 __ITEM_281, // KEY_11, 547 __ITEM_282, // KEY_12, 548 __ITEM_283, // KEY_13, 549 __ITEM_284, // KEY_14, 550 __ITEM_285, // KEY_15, 551 __ITEM_286, // KEY_16, 552 __ITEM_287, // KEY_17, 553 __ITEM_288, // KEY_18, 554 __ITEM_289, // KEY_19, 555 __ITEM_290, // KEY_20, 556 557 __ITEM_291, // KEY_21, 558 __ITEM_292, // KEY_22, 559 __ITEM_293, // KEY_23, 560 __ITEM_294, // KEY_24, 561 __ITEM_295, // KEY_25, 562 __ITEM_296, // KEY_26, 563 __ITEM_297, // KEY_27, 564 __ITEM_298, // KEY_28, 565 __ITEM_299, // KEY_29, 566 __ITEM_300, // KEY_30, 567 568 __ITEM_301, // KEY_31, 569 KEY_32, 570 __ITEM_302, // SILVER_PLATTER, 571 DUCT_TAPE, 572 ALUMINUM_ROD, 573 SPRING, 574 SPRING_AND_BOLT_UPGRADE, 575 STEEL_ROD, 576 QUICK_GLUE, 577 GUN_BARREL_EXTENDER, 578 579 STRING, 580 TIN_CAN, 581 STRING_TIED_TO_TIN_CAN, 582 MARBLES, 583 LAME_BOY, 584 COPPER_WIRE, 585 DISPLAY_UNIT, 586 FUMBLE_PAK, 587 XRAY_BULB, 588 CHEWING_GUM, 589 590 FLASH_DEVICE, 591 BATTERIES, 592 __ITEM_323, // ELASTIC, 593 XRAY_DEVICE, 594 SILVER, 595 GOLD, 596 GAS_CAN, 597 __ITEM_328, // UNUSED_26, 598 __ITEM_329, // UNUSED_27, 599 __ITEM_330, // UNUSED_28, 600 601 __ITEM_331, // UNUSED_29, 602 __ITEM_332, // UNUSED_30, 603 __ITEM_333, // UNUSED_31, 604 __ITEM_334, // UNUSED_32, 605 __ITEM_335, // UNUSED_33, 606 __ITEM_336, // UNUSED_34, 607 __ITEM_337, // UNUSED_35, 608 __ITEM_338, // UNUSED_36, 609 __ITEM_339, // UNUSED_37, 610 __ITEM_340, // UNUSED_38, 611 612 __ITEM_341, // UNUSED_39, 613 __ITEM_342, // UNUSED_40, 614 __ITEM_343, // UNUSED_41, 615 __ITEM_344, // UNUSED_42, 616 __ITEM_345, // UNUSED_43, 617 __ITEM_346, // UNUSED_44, 618 __ITEM_347, // UNUSED_45, 619 __ITEM_348, // UNUSED_46, 620 __ITEM_349, // UNUSED_47, 621 __ITEM_350, // UNUSED_48, 622 623 MAXITEMS 624 }; 625 626 #define FIRST_HELMET STEEL_HELMET 627 #define LAST_HELMET SPECTRA_HELMET_Y 628 629 #define FIRST_VEST FLAK_JACKET 630 #define LAST_VEST KEVLAR2_VEST_Y 631 632 #define FIRST_LEGGINGS KEVLAR_LEGGINGS 633 #define LAST_LEGGINGS SPECTRA_LEGGINGS_Y 634 635 #define FIRST_HEAD_ITEM EXTENDEDEAR 636 #define LAST_HEAD_ITEM SUNGOGGLES 637 638 #endif 639