metaforce/Runtime/GuiSys/CHudThreatInterface.hpp

60 lines
1.7 KiB
C++
Raw Normal View History

2017-04-02 03:03:37 +00:00
#ifndef __URDE_CHUDTHREATINTERFACE_HPP__
#define __URDE_CHUDTHREATINTERFACE_HPP__
2017-04-07 05:35:09 +00:00
#include "CHudInterface.hpp"
#include "RetroTypes.hpp"
#include "zeus/CTransform.hpp"
2017-04-02 03:03:37 +00:00
namespace urde
{
class CGuiFrame;
2017-04-07 05:35:09 +00:00
class CGuiWidget;
class CGuiModel;
class CGuiTextPane;
class CAuiEnergyBarT01;
2017-04-02 03:03:37 +00:00
2017-04-07 05:35:09 +00:00
class CHudThreatInterface
2017-04-02 03:03:37 +00:00
{
2017-04-07 05:35:09 +00:00
enum class EThreatStatus
{
Normal,
Warning,
Damage
};
2017-04-02 03:03:37 +00:00
2017-04-07 05:35:09 +00:00
EHudType x4_hudType;
float x8_damagePulseTimer = 0.f;
float xc_damagePulse = 0.f;
float x10_threatDist;
float x14_arrowTimer = 0.f;
zeus::CTransform x18_threatIconXf;
float x48_warningLerpAlpha = 0.f;
EThreatStatus x4c_threatStatus = EThreatStatus::Normal;
float x50_warningColorLerp = 0.f;
bool x54_24_visibleDebug : 1;
bool x54_25_visibleGame : 1;
bool x54_26_hasArrows : 1;
bool x54_27_notXRay : 1;
CGuiWidget* x58_basewidget_threatstuff;
CGuiWidget* x5c_basewidget_threaticon;
CGuiModel* x60_model_threatarrowup;
CGuiModel* x64_model_threatarrowdown;
CGuiTextPane* x68_textpane_threatwarning;
CAuiEnergyBarT01* x6c_energybart01_threatbar;
CGuiTextPane* x70_textpane_threatdigits;
void UpdateVisibility();
2017-04-02 03:03:37 +00:00
public:
2017-04-07 05:35:09 +00:00
CHudThreatInterface(CGuiFrame& selHud, EHudType hudType, float threatDist);
void SetThreatDistance(float threatDist);
void SetIsVisibleDebug(bool v);
void SetIsVisibleGame(bool v);
2017-04-03 01:39:23 +00:00
void Update(float dt);
2017-04-07 05:35:09 +00:00
static std::pair<zeus::CVector3f, zeus::CVector3f> CombatThreatBarCoordFunc(float t);
static std::pair<zeus::CVector3f, zeus::CVector3f> XRayThreatBarCoordFunc(float t);
static std::pair<zeus::CVector3f, zeus::CVector3f> ThermalThreatBarCoordFunc(float t);
2017-04-02 03:03:37 +00:00
};
}
#endif // __URDE_CHUDTHREATINTERFACE_HPP__