Files
firestorm/Gameleap/code/mw4/Code/MW4/hudcomp2.hpp
T
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
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.
2026-06-24 21:28:16 -05:00

189 lines
4.1 KiB
C++

#pragma once
#include "MW4.hpp"
#include "Sensor.hpp"
#include "hudcomp.hpp"
namespace MechWarrior4
{
class HUDTargetArrow : public HUDComponent
{
protected:
typedef HUDComponent inherited;
HUDTexture *arrowTexture;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Construction, Destruction
//
void DrawImplementation(void);
DWORD m_NavAlpha;
Stuff::Time m_NavAlphaTime;
DWORD m_LockColor[3];
bool m_LeftArrow;
bool m_RightArrow;
bool m_TopArrow;
bool m_BottomArrow;
bool m_IndicatorInZoom;
bool m_OnScreen;
int m_TargetAlignment;
// MSL 5.02 Hud Box Masking
// MSL 5.05 Advance Mode
int m_AdvanceMode;
Stuff::Scalar arrowTextureWidth_Half;
Stuff::Scalar arrowTextureHeight_Half;
Stuff::Scalar m_TargetX,m_TargetY,m_TargetWidth,m_TargetHeight;
Scalar m_ZoomLeft,m_ZoomRight,m_ZoomTop,m_ZoomBottom;
public:
HUDTargetArrow();
~HUDTargetArrow();
virtual void Update (Stuff::Time till);
void TargetAlignment (int value)
{ Verify (value>=0 && value<=2); m_TargetAlignment = value; }
void LeftArrow (void)
{
m_LeftArrow = true;
m_RightArrow = false;
m_OnScreen = false;
m_TopArrow = false;
m_BottomArrow = false;
}
void RightArrow (void)
{
m_LeftArrow = false;
m_RightArrow = true;
m_TopArrow = false;
m_BottomArrow = false;
m_OnScreen = false;
}
void TopArrow (void)
{
m_LeftArrow = false;
m_RightArrow = false;
m_TopArrow = true;
m_BottomArrow = false;
m_OnScreen = false;
}
void BottomArrow (void)
{
m_LeftArrow = false;
m_RightArrow = false;
m_TopArrow = false;
m_BottomArrow = true;
m_OnScreen = false;
}
void IndicatorInZoom(bool fInZoom)
{ m_IndicatorInZoom = fInZoom; }
void SetZoomWindow (Stuff::Scalar left,Stuff::Scalar top,Stuff::Scalar right,Stuff::Scalar bottom);
void TargetLoc (Stuff::Scalar TargetX,Stuff::Scalar TargetY,Stuff::Scalar width=0,Stuff::Scalar height=0)
{
m_LeftArrow = false;
m_RightArrow = false;
m_TopArrow = false;
m_BottomArrow = false;
if ((TargetX != -1.0f) && (TargetY != -1.0f))
m_OnScreen = true;
else
m_OnScreen = false;
m_TargetX = TargetX;
m_TargetY = TargetY;
m_TargetWidth = width;
m_TargetHeight = height;
}
};
class HUDTorsoBar : public HUDComponent
{
protected:
typedef HUDComponent inherited;
void DrawImplementation(void);
Stuff::Scalar m_TorsoTwist,m_TorsoPitch;
Stuff::Point3D m_TwistSize,m_PitchSize;
Stuff::Point3D m_TwistLoc,m_PitchLoc;
HUDText *m_TwistText;
public:
HUDTorsoBar();
~HUDTorsoBar();
void TorsoTwist (Stuff::Scalar value)
{ m_TorsoTwist = value; }
void TorsoPitch (Stuff::Scalar value)
{ m_TorsoPitch = value; }
Stuff::Point3D TwistSize(void)
{ return m_TwistSize; }
Stuff::Point3D PitchSize(void)
{ return m_PitchSize; }
Stuff::Point3D TwistLoc(void)
{ return m_TwistLoc; }
Stuff::Point3D PitchLoc(void)
{ return m_PitchLoc; }
};
class HUDZoom : public HUDComponent
{
protected:
typedef HUDComponent inherited;
void DrawImplementation(void);
// HUDText *m_Text;
int m_ZoomLevel;
Scalar m_Left,m_Right,m_Top,m_Bottom;
public:
HUDZoom();
~HUDZoom();
void SetZoomLevel(int zoom_level);
void SetWindow (Stuff::Scalar left,Stuff::Scalar top,Stuff::Scalar right,Stuff::Scalar bottom);
};
class HUDMP : public HUDComponent
{
protected:
typedef HUDComponent inherited;
int m_Alpha;
Stuff::Time m_AlphaTime;
DWORD m_HeatColor[3];
// MSL 5.03 Ammo Bay Fire Indicator
// MSL 5.03 Jam Indicator
bool m_FlagVisible,m_KOTFVisible,m_FireVisible,m_JamVisible;
void DrawImplementation(void);
public:
HUDMP();
virtual void Update (Stuff::Time till);
void ShowFlag (bool value)
{ m_FlagVisible = value; }
void ShowKOTF (bool value)
{ m_KOTFVisible = value; }
// MSL 5.03 Ammo Bay Fire Indicator
void ShowFIRE (bool value)
{ m_FireVisible = value; }
// MSL 5.03 Jam Indicator
void ShowJAM (bool value)
{ m_JamVisible = value; }
};
}