| | 1 | #ifndef _equipmnt_h_ |
| | 2 | #define _equipmnt_h_ 1 |
| | 3 | |
| | 4 | #include "gamedef.h" |
| | 5 | |
| | 6 | /* KJL 12:39:41 09/18/96 - Okay, I think we should have two weapon structures: |
| | 7 | |
| | 8 | TEMPLATE_WEAPON_DATA: First the basic template for each weapon, which remains constant |
| | 9 | during the game & contains the base description of a weapon eg. |
| | 10 | ammo type, weight, graphics, etc. |
| | 11 | |
| | 12 | PLAYER_WEAPON_DATA: Second is the structure which describes a player's weapon |
| | 13 | eg. a pointer to a TEMPLATE_WEAPON_DATA, ammo remaining, jam |
| | 14 | status, and so on. eg. PLAYER_WEAPON_DATA PlayerWeapons[]; |
| | 15 | */ |
| | 16 | |
| | 17 | enum WEAPON_STATE |
| | 18 | { |
| | 19 | WEAPONSTATE_IDLE = 0, |
| | 20 | WEAPONSTATE_FIRING_PRIMARY, |
| | 21 | WEAPONSTATE_FIRING_SECONDARY, |
| | 22 | WEAPONSTATE_SWAPPING_IN, |
| | 23 | WEAPONSTATE_SWAPPING_OUT, |
| | 24 | WEAPONSTATE_JAMMED, |
| | 25 | WEAPONSTATE_WAITING, |
| | 26 | WEAPONSTATE_READYING, |
| | 27 | WEAPONSTATE_UNREADYING, |
| | 28 | MAX_NO_OF_WEAPON_STATES |
| | 29 | }; |
| | 30 | |
| | 31 | enum WEAPON_ID |
| | 32 | { |
| | 33 | /* USED TO DENOTE AN EMPTY SLOT */ |
| | 34 | NULL_WEAPON = -1, |
| | 35 | |
| | 36 | WEAPON_PULSERIFLE = 0, |
| | 37 | WEAPON_SMARTGUN, |
| | 38 | WEAPON_FLAMETHROWER, |
| | 39 | WEAPON_SADAR, |
| | 40 | WEAPON_GRENADELAUNCHER, |
| | 41 | WEAPON_MINIGUN, |
| | 42 | WEAPON_MARINE_PISTOL, |
| | 43 | WEAPON_TWO_PISTOLS, |
| | 44 | WEAPON_FRISBEE_LAUNCHER, |
| | 45 | WEAPON_CUDGEL, |
| | 46 | |
| | 47 | WEAPON_PRED_WRISTBLADE, |
| | 48 | WEAPON_PRED_RIFLE, |
| | 49 | WEAPON_PRED_SHOULDERCANNON, |
| | 50 | WEAPON_PRED_MEDICOMP, |
| | 51 | WEAPON_PRED_PISTOL, |
| | 52 | WEAPON_PRED_DISC, |
| | 53 | |
| | 54 | WEAPON_ALIEN_CLAW, |
| | 55 | WEAPON_ALIEN_TAIL, |
| | 56 | MAX_NO_OF_WEAPON_TEMPLATES |
| | 57 | }; |
| | 58 | |
| | 59 | enum WEAPON_SLOT |
| | 60 | { |
| | 61 | MIN_NO_OF_WEAPON_SLOTS = -1, |
| | 62 | WEAPON_SLOT_1 = 0, |
| | 63 | WEAPON_SLOT_2, |
| | 64 | WEAPON_SLOT_3, |
| | 65 | WEAPON_SLOT_4, |
| | 66 | WEAPON_SLOT_5, |
| | 67 | WEAPON_SLOT_6, |
| | 68 | WEAPON_SLOT_7, |
| | 69 | WEAPON_SLOT_8, |
| | 70 | WEAPON_SLOT_9, |
| | 71 | WEAPON_SLOT_10, |
| | 72 | MAX_NO_OF_WEAPON_SLOTS, |
| | 73 | |
| | 74 | WEAPON_FINISHED_SWAPPING |
| | 75 | }; |
| | 76 | |
| | 77 | enum AMMO_ID |
| | 78 | { |
| | 79 | AMMO_NONE = -1, |
| | 80 | AMMO_10MM_CULW = 0, |
| | 81 | AMMO_PULSE_GRENADE, |
| | 82 | AMMO_SHOTGUN, |
| | 83 | AMMO_SMARTGUN, |
| | 84 | AMMO_FLAMETHROWER, |
| | 85 | AMMO_SADAR_TOW, |
| | 86 | AMMO_GRENADE, |
| | 87 | EXPLOSIONFIRE_BLAST, |
| | 88 | AMMO_MINIGUN, |
| | 89 | AMMO_FRAGMENTATION_GRENADE, |
| | 90 | AMMO_PROXIMITY_GRENADE, |
| | 91 | AMMO_MARINE_PISTOL, |
| | 92 | AMMO_FRISBEE, |
| | 93 | AMMO_FRISBEE_FIRE, |
| | 94 | AMMO_CUDGEL, |
| | 95 | |
| | 96 | AMMO_PRED_WRISTBLADE, |
| | 97 | AMMO_HEAVY_PRED_WRISTBLADE, |
| | 98 | AMMO_PRED_RIFLE, |
| | 99 | AMMO_PLASMACASTER, |
| | 100 | AMMO_PRED_PISTOL_BLAST, |
| | 101 | AMMO_PRED_DISC, |
| | 102 | |
| | 103 | AMMO_ALIEN_CLAW, |
| | 104 | AMMO_ALIEN_TAIL, |
| | 105 | |
| | 106 | AMMO_AUTOGUN, |
| | 107 | AMMO_XENOBORG, |
| | 108 | AMMO_FACEHUGGER, |
| | 109 | AMMO_NPC_OBSTACLE_CLEAR, |
| | 110 | AMMO_ALIEN_FRAG, |
| | 111 | |
| | 112 | AMMO_ALIEN_BITE_KILLSECTION, |
| | 113 | AMMO_ALIEN_BITE_KILLSECTION_SUPER, |
| | 114 | |
| | 115 | AMMO_NPC_PAQ_CLAW, |
| | 116 | AMMO_NPC_ALIEN_BITE, |
| | 117 | AMMO_NPC_PREDALIEN_CLAW, |
| | 118 | AMMO_NPC_PREDALIEN_BITE, |
| | 119 | AMMO_NPC_PREDALIEN_TAIL, |
| | 120 | AMMO_NPC_PRAETORIAN_CLAW, |
| | 121 | AMMO_NPC_PRAETORIAN_BITE, |
| | 122 | AMMO_NPC_PRAETORIAN_TAIL, |
| | 123 | AMMO_NPC_PRED_STAFF, |
| | 124 | AMMO_PC_ALIEN_BITE, |
| | 125 | |
| | 126 | AMMO_PRED_TROPHY_KILLSECTION, |
| | 127 | |
| | 128 | MAX_NO_OF_AMMO_TEMPLATES, |
| | 129 | AMMO_FLECHETTE, |
| | 130 | AMMO_FALLINGDAMAGE, |
| | 131 | AMMO_FIREDAMAGE, |
| | 132 | AMMO_FAN |
| | 133 | }; |
| | 134 | |
| | 135 | typedef struct |
| | 136 | { |
| | 137 | unsigned int Impact:16; |
| | 138 | unsigned int Cutting:16; |
| | 139 | unsigned int Penetrative:16; |
| | 140 | unsigned int Fire:16; |
| | 141 | unsigned int Electrical:16; |
| | 142 | unsigned int Acid:16; |
| | 143 | unsigned int ExplosivePower:3; // 1 is PARTICLE_EXPLOSIONFIRE any marine weapon explosion, 2 is predpistol, 3 plasmacaster |
| | 144 | unsigned int Slicing :2; |
| | 145 | unsigned int ForceBoom :2; |
| | 146 | unsigned int BlowUpSections :1; |
| | 147 | unsigned int MakeExitWounds :1; |
| | 148 | |
| | 149 | enum AMMO_ID Id; |
| | 150 | |
| | 151 | } DAMAGE_PROFILE; |
| | 152 | |
| | 153 | typedef struct |
| | 154 | { |
| | 155 | int AmmoPerMagazine; |
| | 156 | DAMAGE_PROFILE MaxDamage; |
| | 157 | |
| | 158 | } TEMPLATE_AMMO_DATA; |
| | 159 | |
| | 160 | struct PLAYER_WEAPON_DATA |
| | 161 | { |
| | 162 | enum WEAPON_ID WeaponIDNumber; |
| | 163 | unsigned int PrimaryRoundsRemaining; /* in 'current' magazine */ |
| | 164 | unsigned int SecondaryRoundsRemaining; /* in 'current' magazine */ |
| | 165 | unsigned int MagazinesRemaining:7; |
| | 166 | unsigned int LeftOverBullets; |
| | 167 | unsigned int Possessed:1; /* meaning you are carrying the weapon, not that an evil spirit etc etc. */ |
| | 168 | }; |
| | 169 | |
| | 170 | typedef struct |
| | 171 | { |
| | 172 | void (*maintain_weapon) (); |
| | 173 | enum AMMO_ID PrimaryAmmoID; |
| | 174 | enum AMMO_ID SecondaryAmmoID; |
| | 175 | |
| | 176 | VECTORCH RestPosition; |
| | 177 | |
| | 178 | int RecoilMaxZ; |
| | 179 | int RecoilMaxRandomZ; |
| | 180 | int RecoilMaxXTilt; |
| | 181 | int RecoilMaxYTilt; |
| | 182 | int swap_in_out; |
| | 183 | |
| | 184 | const char * HierarchyName; |
| | 185 | |
| | 186 | unsigned int LogAccuracy: 1; |
| | 187 | unsigned int LogShots: 1; |
| | 188 | int InitialSubSequence; |
| | 189 | |
| | 190 | } TEMPLATE_WEAPON_DATA; |
| | 191 | |
| | 192 | typedef struct |
| | 193 | { |
| | 194 | enum AMMO_ID SelectedAmmo; |
| | 195 | unsigned int StandardRoundsRemaining:3; |
| | 196 | unsigned int StandardMagazinesRemaining:7; |
| | 197 | unsigned int FragmentationRoundsRemaining:3; |
| | 198 | unsigned int FragmentationMagazinesRemaining:7; |
| | 199 | unsigned int ProximityRoundsRemaining:3; |
| | 200 | unsigned int ProximityMagazinesRemaining:7; |
| | 201 | |
| | 202 | } GRENADE_LAUNCHER_DATA; |
| | 203 | |
| | 204 | extern const TEMPLATE_WEAPON_DATA TemplateWeapon[]; |
| | 205 | extern const TEMPLATE_AMMO_DATA TemplateAmmo[]; |
| | 206 | extern GRENADE_LAUNCHER_DATA GrenadeLauncherData; |
| | 207 | |
| | 208 | extern enum WEAPON_ID MarineWeaponKey[MAX_NO_OF_WEAPON_SLOTS]; |
| | 209 | extern enum WEAPON_ID PredatorWeaponKey[MAX_NO_OF_WEAPON_SLOTS]; |
| | 210 | extern enum WEAPON_ID AlienWeaponKey[MAX_NO_OF_WEAPON_SLOTS]; |
| | 211 | |
| | 212 | enum DAMAGE_PROFILES |
| | 213 | { |
| | 214 | CERTAINDEATH = 0, |
| | 215 | FIREDAMAGE, |
| | 216 | FALLINGDAMAGE, |
| | 217 | FLECHETTEDAMAGE, |
| | 218 | PREDPISTOL_FLECHETTEDAMAGE, |
| | 219 | MAX_NUMBER_OF_DAMAGEPROFILES |
| | 220 | }; |
| | 221 | |
| | 222 | extern const DAMAGE_PROFILE damage_profiles[]; |
| | 223 | #endif |