2019-08-26 03:59:14 +00:00
|
|
|
|
|
|
|
#ifndef __gun_h__
|
|
|
|
#define __gun_h__
|
|
|
|
|
2019-08-31 09:08:38 +00:00
|
|
|
#include "compat.h"
|
2019-08-26 03:59:14 +00:00
|
|
|
#include "sequence.h"
|
|
|
|
|
|
|
|
#define kMaxWeapons 7
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
2019-08-31 07:47:15 +00:00
|
|
|
kWeaponSword = 0,
|
|
|
|
kWeaponPistol,
|
|
|
|
kWeaponM60,
|
|
|
|
kWeaponFlamer,
|
|
|
|
kWeaponGrenade,
|
|
|
|
kWeaponStaff,
|
|
|
|
kWeaponRing,
|
|
|
|
kWeaponMummified
|
2019-08-26 03:59:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Weapon
|
|
|
|
{
|
2019-08-31 07:47:15 +00:00
|
|
|
short nSeq;
|
|
|
|
short b[12]; // seq offsets?
|
|
|
|
short nAmmoType;
|
|
|
|
short c;
|
|
|
|
short d; // default or min ammo? or ammo used per 'shot' ?
|
|
|
|
short bFireUnderwater;
|
2019-08-26 03:59:14 +00:00
|
|
|
// short pad[15];
|
|
|
|
};
|
|
|
|
|
|
|
|
extern Weapon WeaponInfo[];
|
|
|
|
extern short nTemperature[];
|
|
|
|
|
|
|
|
void RestoreMinAmmo(short nPlayer);
|
|
|
|
void FillWeapons(short nPlayer);
|
|
|
|
void ResetPlayerWeapons(short nPlayer);
|
|
|
|
void InitWeapons();
|
|
|
|
void SetNewWeapon(short nPlayer, short nWeapon);
|
|
|
|
void SetNewWeaponImmediate(short nPlayer, short nWeapon);
|
|
|
|
void SetNewWeaponIfBetter(short nPlayer, short nWeapon);
|
|
|
|
void SelectNewWeapon(short nPlayer);
|
|
|
|
void StopFiringWeapon(short nPlayer);
|
|
|
|
void FireWeapon(short nPlayer);
|
|
|
|
void CheckClip(short nPlayer);
|
|
|
|
void MoveWeapons(short nPlayer);
|
|
|
|
void DrawWeapons();
|
|
|
|
|
|
|
|
#endif
|