Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
59 lines
1.1 KiB
C++
59 lines
1.1 KiB
C++
|
|
#pragma once
|
|
|
|
#include "MW4.hpp"
|
|
#include "Sensor.hpp"
|
|
#include "hudcomp.hpp"
|
|
|
|
namespace MechWarrior4
|
|
{
|
|
const int MAX_HUD_WEAPONS = 30;
|
|
class GUIWeaponManager;
|
|
class GUIWeapon;
|
|
class Weapon;
|
|
|
|
class HUDWeapon : public HUDComponent
|
|
{
|
|
protected:
|
|
|
|
typedef HUDComponent inherited;
|
|
|
|
HUDText *name_array[MAX_HUD_WEAPONS];
|
|
HUDText *ammo_text[MAX_HUD_WEAPONS];
|
|
DWORD weaponcolor;
|
|
SlotOf<Weapon *> m_SingleFire;
|
|
int m_SelectedWeaponGroup;
|
|
Scalar m_ReticleRange;
|
|
|
|
ChainOf<GUIWeapon *> m_Weapons;
|
|
|
|
SlotOf <GUIWeaponManager *>m_WeaponManager;
|
|
|
|
HUDText *m_Text[5];
|
|
int m_NumWeapons;
|
|
bool m_CanHit[6];
|
|
|
|
void DrawImplementation(void);
|
|
|
|
public:
|
|
HUDWeapon();
|
|
~HUDWeapon();
|
|
void SetupWeapons (void);
|
|
virtual void Reset (void);
|
|
void ReticleRange (Stuff::Scalar value)
|
|
{ m_ReticleRange = value; }
|
|
|
|
void SingleFire (Weapon *weap);
|
|
void SelectedWeaponGroup (int selected);
|
|
bool CanHit (int id)
|
|
{
|
|
Verify (id>=0);
|
|
Verify (id < 6);
|
|
return m_CanHit[id];
|
|
}
|
|
|
|
void WeaponManager (GUIWeaponManager *value);
|
|
};
|
|
}
|
|
|