#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; } }; }