1 /*KJL*********************************************************************** 2 * WEAPONS.H * 3 * - this file contains prototypes for the functions in weapons.c * 4 * which can be called externally. * 5 ***********************************************************************KJL*/ 6 #ifndef _weapons_h_ 7 #define _weapons_h_ 1 8 9 10 #ifdef __cplusplus 11 12 extern "C" { 13 14 #endif 15 16 17 /*KJL**************************************************************************************** 18 * D E F I N E S * 19 ****************************************************************************************KJL*/ 20 21 typedef enum HitAreaMatrix { 22 HAM_Centre = 0, 23 HAM_Front, 24 HAM_Back, 25 HAM_Top, 26 HAM_Base, 27 HAM_Left, 28 HAM_Right, 29 HAM_TopLeft, 30 HAM_TopRight, 31 HAM_BaseLeft, 32 HAM_BaseRight, 33 HAM_end, 34 } HITAREAMATRIX; 35 36 /*KJL**************************************************************************************** 37 * P R O T O T Y P E S * 38 ****************************************************************************************KJL*/ 39 extern void UpdateWeaponStateMachine(void); 40 41 extern int AreTwoPistolsInTertiaryFire(void); 42 43 extern void HandleEffectsOfExplosion(STRATEGYBLOCK *objectToIgnorePtr, VECTORCH *centrePtr, int maxRange, DAMAGE_PROFILE *maxDamage, int flat); 44 /*KJL******************************************************************************* 45 * centrePtr - is a pointer to the explosion's position vector in world space. * 46 * * 47 * maxRange - is the distance away from the explosion's centre an object has to be * 48 * for no damage to be incurred. * 49 * * 50 * maxDamage - is the damage an object would incur if it were zero distance away * 51 * from the explosion. * 52 *******************************************************************************KJL*/ 53 54 55 extern void FireAutoGun(STRATEGYBLOCK *sbPtr); 56 /*KJL******** 57 * bang bang * 58 ********KJL*/ 59 60 extern void MakeMatrixFromDirection(VECTORCH *directionPtr, MATRIXCH *matrixPtr); 61 /*KJL****************************************************************************** 62 * directionPtr - is a pointer to a NORMALISED vector in world space (input) * 63 * matrixPtr - is a pointer to a matrix that will contain the function's output * 64 * * 65 * * 66 * The output matrix is the OrientMat an object would have if it were pointing in * 67 * in the given direction. * 68 ******************************************************************************KJL*/ 69 70 71 72 extern void UpdateWeaponShape(void); 73 /*KJL********************************************** 74 * Call UpdateWeaponShape on changing environment. * 75 **********************************************KJL*/ 76 77 extern void GrabWeaponShape(PLAYER_WEAPON_DATA *weaponPtr); 78 void HandleWeaponImpact(VECTORCH *positionPtr, STRATEGYBLOCK *sbPtr, enum AMMO_ID AmmoID, VECTORCH *directionPtr, int multiple, SECTION_DATA *this_section_data); 79 void HandleSpearImpact(VECTORCH *positionPtr, STRATEGYBLOCK *sbPtr, enum AMMO_ID AmmoID, VECTORCH *directionPtr, int multiple, SECTION_DATA *this_section_data); 80 extern void GrabMuzzleFlashShape(TEMPLATE_WEAPON_DATA *twPtr); 81 extern void FindEndOfShape(VECTORCH* endPositionPtr, int shapeIndex); 82 extern void InitThisWeapon(PLAYER_WEAPON_DATA *pwPtr); 83 84 extern void CauseDamageToObject(STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple,VECTORCH *incoming); 85 extern DISPLAYBLOCK *CauseDamageToHModel(HMODELCONTROLLER *HMC_Ptr, STRATEGYBLOCK *sbPtr, DAMAGE_PROFILE *damage, int multiple, SECTION_DATA *this_section_data, VECTORCH *incoming, VECTORCH *position, int FromHost); 86 extern int TotalKineticDamage(DAMAGE_PROFILE *damage); 87 extern void GetDirectionOfAttack(STRATEGYBLOCK *sbPtr,VECTORCH *WorldVector,VECTORCH *Output); 88 extern int Staff_Manager(DAMAGE_PROFILE *damage,SECTION_DATA *section1,SECTION_DATA *section2,SECTION_DATA *section3, 89 STRATEGYBLOCK *wielder); 90 91 /* exported varibles */ 92 extern DISPLAYBLOCK PlayersWeapon; 93 extern DISPLAYBLOCK PlayersWeaponMuzzleFlash; 94 extern void PositionPlayersWeapon(void); 95 extern void PositionPlayersWeaponMuzzleFlash(void); 96 extern void AutoSwapToDisc(void); 97 extern void AutoSwapToDisc_OutOfSequence(void); 98 void CreateSpearPossiblyWithFragment(DISPLAYBLOCK *dispPtr, VECTORCH *spearPositionPtr, VECTORCH *spearDirectionPtr); 99 100 101 struct Target 102 { 103 VECTORCH Position; 104 int Distance; 105 DISPLAYBLOCK *DispPtr; 106 SECTION_DATA *HModelSection; 107 }; 108 109 extern struct Target PlayersTarget; 110 extern SECTION_DATA *HitLocationRoll(STRATEGYBLOCK *sbPtr, STRATEGYBLOCK *source); 111 112 #define FORCE_MINIGUN_STOP 1 113 114 #define SPEARS_PER_PICKUP 30 115 #define MAX_SPEARS 99 116 117 #ifdef __cplusplus 118 119 } 120 121 #endif 122 123 124 #endif 125