| | 1 | #ifndef _bhtypes_h_ |
| | 2 | #define _bhtypes_h_ 1 |
| | 3 | |
| | 4 | #include "stratdef.h" |
| | 5 | #include "equipmnt.h" |
| | 6 | #include "vision.h" |
| | 7 | #include "hmodel.h" |
| | 8 | |
| | 9 | typedef struct |
| | 10 | { |
| | 11 | AVP_BEHAVIOUR_TYPE bhvr_type; |
| | 12 | |
| | 13 | struct PLAYER_WEAPON_DATA WeaponSlot[MAX_NO_OF_WEAPON_SLOTS]; |
| | 14 | struct PLAYER_WEAPON_DATA *SelectedWeapon; |
| | 15 | |
| | 16 | enum WEAPON_SLOT SelectedWeaponSlot; |
| | 17 | enum WEAPON_SLOT SwapToWeaponSlot; |
| | 18 | enum WEAPON_SLOT PreviouslySelectedWeaponSlot; |
| | 19 | enum WEAPON_STATE WeaponState; |
| | 20 | |
| | 21 | const TEMPLATE_WEAPON_DATA *twPtr; |
| | 22 | |
| | 23 | VECTORCH WeaponPositionOffset; |
| | 24 | |
| | 25 | enum VISION_MODE_ID VisionMode; |
| | 26 | |
| | 27 | int WeaponStateTimeOutCounter; /* in 16.16 */ |
| | 28 | int Health; /* in 16.16 */ |
| | 29 | int Armour; /* in 16.16 */ |
| | 30 | |
| | 31 | unsigned int Crouching:1; |
| | 32 | int ForwardInertia; |
| | 33 | int StrafeInertia; |
| | 34 | int TurnInertia; |
| | 35 | |
| | 36 | int ViewPanX; /* the looking up/down value that used to be in displayblock */ |
| | 37 | |
| | 38 | struct |
| | 39 | { |
| | 40 | unsigned int Rqst_FirePrimaryWeapon :1; |
| | 41 | unsigned int Rqst_FireSecondaryWeapon :1; |
| | 42 | unsigned int Rqst_Forward :1; |
| | 43 | unsigned int Rqst_Backward :1; |
| | 44 | unsigned int Rqst_SideStepLeft :1; |
| | 45 | unsigned int Rqst_SideStepRight :1; |
| | 46 | unsigned int Rqst_Strafe :1; |
| | 47 | unsigned int Rqst_Jump:1; |
| | 48 | unsigned int Rqst_Walk:1; |
| | 49 | |
| | 50 | } InputRequests; |
| | 51 | |
| | 52 | void (*Hud) (); |
| | 53 | void (*weapon_func) (); |
| | 54 | unsigned int securityClearances; |
| | 55 | unsigned int Alive :1; |
| | 56 | unsigned int RequestsToStandUp:1; |
| | 57 | unsigned int IHaveAPlacedAutogun :1; |
| | 58 | unsigned int JetpackEnabled :1; |
| | 59 | unsigned int GrapplingHookEnabled :1; |
| | 60 | unsigned int cloakOn :1; |
| | 61 | unsigned int muzzle_flash:1; |
| | 62 | unsigned int saves_left:3; |
| | 63 | unsigned int FirstPersonView:1; |
| | 64 | int LeanScale; |
| | 65 | int CurrentLightAtPlayer; |
| | 66 | int StartingHealth; |
| | 67 | int StartingArmour; |
| | 68 | int DamagedOverlayIntensity; |
| | 69 | int FieldCharge; |
| | 70 | int PlasmaCasterCharge; |
| | 71 | int FlaresLeft; |
| | 72 | int imageintensifier_battery; |
| | 73 | /* KJL 99/2/3 - Cloaking Effectiveness ranges from 0 (useless) to ONE_FIXED (practically invisible) */ |
| | 74 | int CloakingEffectiveness; |
| | 75 | int SmartGunMode; |
| | 76 | int tauntTimer; |
| | 77 | int soundCracklingFire; |
| | 78 | int sound_watersplash; |
| | 79 | int sound_mouth; |
| | 80 | int sound_jetpack; |
| | 81 | int incidentFlag; |
| | 82 | int incidentTimer; |
| | 83 | int invulnerabilityTimer; |
| | 84 | HMODELCONTROLLER HModelController; |
| | 85 | DISPLAYBLOCK *DisplayBlock; |
| | 86 | DISPLAYBLOCK weapon; |
| | 87 | STRATEGYBLOCK* sbptr; |
| | 88 | |
| | 89 | struct |
| | 90 | { |
| | 91 | VECTORCH Position; |
| | 92 | int Distance; |
| | 93 | DISPLAYBLOCK *DispPtr; |
| | 94 | SECTION_DATA *HModelSection; |
| | 95 | } Target; |
| | 96 | |
| | 97 | // information loaded from rif files |
| | 98 | VECTORCH StartLocation; |
| | 99 | MATRIXCH StartMat; |
| | 100 | |
| | 101 | struct |
| | 102 | { |
| | 103 | unsigned int marine_jetpack :1; |
| | 104 | unsigned int predator_pistol :1; |
| | 105 | unsigned int predator_plasmacaster :1; |
| | 106 | unsigned int predator_disc :1; |
| | 107 | unsigned int predator_medicomp :1; |
| | 108 | unsigned int predator_grappling_hook :1; |
| | 109 | int predator_num_spears; |
| | 110 | |
| | 111 | } StartingEquipment; |
| | 112 | |
| | 113 | } PLAYER_STATUS; |
| | 114 | |
| | 115 | extern PLAYER_STATUS PlayerStatus; |
| | 116 | |
| | 117 | #define TAUNT_LENGTH (ONE_FIXED<<1) |
| | 118 | #define PLAYER_ON_FIRE_TIME (ONE_FIXED*20) |
| | 119 | #define PLAYERCLOAK_MAXENERGY (30*ONE_FIXED) /* fixed point seconds */ |
| | 120 | #define PLAYERCLOAK_POSTIONGIVENAWAYTIME (ONE_FIXED>>2) /*(2*ONE_FIXED) fixed point seconds */ |
| | 121 | |
| | 122 | typedef struct simpleanimbehaviour |
| | 123 | { |
| | 124 | AVP_BEHAVIOUR_TYPE bhvr_type; |
| | 125 | TXACTRLBLK *tacbSimple; |
| | 126 | |
| | 127 | } SIMPLE_ANIM_BEHAV_BLOCK; |
| | 128 | |
| | 129 | typedef struct simple_anim_tools_template |
| | 130 | { |
| | 131 | MREF my_module; |
| | 132 | char nameID[SB_NAME_LENGTH]; |
| | 133 | |
| | 134 | } SIMPLE_ANIM_TOOLS_TEMPLATE; |
| | 135 | |
| | 136 | typedef enum |
| | 137 | { |
| | 138 | I_door_opening, |
| | 139 | I_door_closing, |
| | 140 | I_door_open, |
| | 141 | I_door_closed |
| | 142 | |
| | 143 | } DOOR_STATES; |
| | 144 | |
| | 145 | typedef struct ProxDoorBehaviourType |
| | 146 | { |
| | 147 | AVP_BEHAVIOUR_TYPE bhvr_type; |
| | 148 | int door_state; |
| | 149 | MORPHCTRL *PDmctrl; |
| | 150 | int Timer; |
| | 151 | unsigned int alienTrigger :1; |
| | 152 | unsigned int marineTrigger :1; |
| | 153 | int lockable_door; |
| | 154 | int door_locked; |
| | 155 | char target_name[SB_NAME_LENGTH]; |
| | 156 | STRATEGYBLOCK* door_lock_target; |
| | 157 | int SoundHandle; |
| | 158 | int doorType; // Used to determine door sound type |
| | 159 | int door_opening_speed; |
| | 160 | int door_closing_speed; |
| | 161 | |
| | 162 | } PROXDOOR_BEHAV_BLOCK; |
| | 163 | |
| | 164 | typedef struct prox_door_tools_template |
| | 165 | { |
| | 166 | int has_lock_target; |
| | 167 | char target_name [SB_NAME_LENGTH]; |
| | 168 | MREF my_module; |
| | 169 | int shape_open; |
| | 170 | int shape_closed; |
| | 171 | char nameID[SB_NAME_LENGTH]; |
| | 172 | int door_is_locked; |
| | 173 | |
| | 174 | int door_opening_speed; |
| | 175 | int door_closing_speed; |
| | 176 | |
| | 177 | } PROX_DOOR_TOOLS_TEMPLATE; |
| | 178 | |
| | 179 | typedef enum |
| | 180 | { |
| | 181 | I_NPC_Civilian = 0, |
| | 182 | I_NPC_FaceHugger, |
| | 183 | I_NPC_Alien, |
| | 184 | I_NPC_Xenoborg, |
| | 185 | I_NPC_Marine, |
| | 186 | I_NPC_PredatorAlien, |
| | 187 | I_NPC_Predator, |
| | 188 | I_NPC_PraetorianGuard, |
| | 189 | I_NPC_AlienQueen, |
| | 190 | I_NPC_DefaultInanimate, |
| | 191 | I_PC_Alien_MaxStats, |
| | 192 | I_NPC_SentryGun, |
| | 193 | I_NPC_Android, |
| | 194 | I_NPC_End |
| | 195 | |
| | 196 | } NPC_TYPES; |
| | 197 | |
| | 198 | typedef struct |
| | 199 | { |
| | 200 | NPC_TYPES Type; |
| | 201 | DAMAGEBLOCK StartingStats; |
| | 202 | |
| | 203 | } NPC_DATA; |
| | 204 | |
| | 205 | extern const NPC_DATA NpcDataList[]; |
| | 206 | extern void AssignAllSBNames(); |
| | 207 | extern void RequestState(STRATEGYBLOCK* sb, int message, STRATEGYBLOCK * SBRequester); |
| | 208 | extern int GetState(STRATEGYBLOCK* sb); |
| | 209 | extern void ExecuteBehaviour(); |
| | 210 | |
| | 211 | #endif |