metaforce/Runtime/GuiSys/CHudThreatInterface.hpp

51 lines
1.6 KiB
C++
Raw Permalink Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2017-04-02 03:03:37 +00:00
#include "Runtime/RetroTypes.hpp"
#include "Runtime/GuiSys/CHudInterface.hpp"
#include <zeus/CTransform.hpp>
2017-04-07 05:35:09 +00:00
2021-04-10 08:42:06 +00:00
namespace metaforce {
class CAuiEnergyBarT01;
2017-04-02 03:03:37 +00:00
class CGuiFrame;
2017-04-07 05:35:09 +00:00
class CGuiModel;
class CGuiTextPane;
class CGuiWidget;
2017-04-02 03:03:37 +00:00
2018-12-08 05:30:43 +00:00
class CHudThreatInterface {
enum class EThreatStatus { Normal, Warning, Damage };
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 = true;
bool x54_25_visibleGame : 1 = true;
2018-12-08 05:30:43 +00:00
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:
2018-12-08 05:30:43 +00:00
CHudThreatInterface(CGuiFrame& selHud, EHudType hudType, float threatDist);
void SetThreatDistance(float threatDist);
void SetIsVisibleDebug(bool v);
void SetIsVisibleGame(bool v);
void Update(float dt);
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
};
2021-04-10 08:42:06 +00:00
} // namespace metaforce