2018-10-06 20:42:33 -07:00
|
|
|
#pragma once
|
2017-04-01 20:03:37 -07:00
|
|
|
|
2019-09-22 14:52:05 -07:00
|
|
|
#include "Runtime/RetroTypes.hpp"
|
|
|
|
#include "Runtime/GuiSys/CHudInterface.hpp"
|
|
|
|
#include <zeus/CTransform.hpp>
|
2017-04-03 22:48:13 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2017-04-03 22:48:13 -07:00
|
|
|
class CAuiEnergyBarT01;
|
2019-09-22 14:52:05 -07:00
|
|
|
class CGuiFrame;
|
2017-04-03 22:48:13 -07:00
|
|
|
class CGuiModel;
|
2019-09-22 14:52:05 -07:00
|
|
|
class CGuiTextPane;
|
|
|
|
class CGuiWidget;
|
|
|
|
class CStateManager;
|
2017-04-01 20:03:37 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
class CHudMissileInterface {
|
|
|
|
enum class EInventoryStatus { Normal, Warning, Depleted };
|
2017-04-03 22:48:13 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
EHudType x0_hudType;
|
|
|
|
int x4_missileCapacity;
|
|
|
|
int x8_numMissles;
|
|
|
|
float xc_arrowTimer = 0.f;
|
|
|
|
zeus::CTransform x10_missleIconXf;
|
|
|
|
float x40_missileWarningAlpha = 0.f;
|
|
|
|
EInventoryStatus x44_latestStatus = EInventoryStatus::Normal;
|
|
|
|
float x48_missileWarningPulse = 0.f;
|
|
|
|
float x4c_chargeBeamFactor;
|
|
|
|
float x50_missileIconAltDeplete = 0.f;
|
|
|
|
float x54_missileIconIncrement = 0.f;
|
2020-04-10 12:11:10 -07:00
|
|
|
bool x58_24_missilesActive : 1;
|
2020-04-19 21:57:50 -07:00
|
|
|
bool x58_25_visibleDebug : 1 = true;
|
|
|
|
bool x58_26_visibleGame : 1 = true;
|
2020-04-10 12:11:10 -07:00
|
|
|
bool x58_27_hasArrows : 1;
|
|
|
|
bool x58_28_notXRay : 1;
|
2018-12-07 21:30:43 -08:00
|
|
|
CGuiWidget* x5c_basewidget_missileicon;
|
|
|
|
CGuiTextPane* x60_textpane_missiledigits;
|
|
|
|
CAuiEnergyBarT01* x64_energybart01_missilebar;
|
|
|
|
CGuiTextPane* x68_textpane_missilewarning;
|
|
|
|
CGuiModel* x6c_model_missilearrowup;
|
|
|
|
CGuiModel* x70_model_missilearrowdown;
|
|
|
|
CGuiWidget* x74_basewidget_missileicon;
|
|
|
|
void UpdateVisibility(const CStateManager& mgr);
|
|
|
|
|
2017-04-02 18:39:23 -07:00
|
|
|
public:
|
2018-12-07 21:30:43 -08:00
|
|
|
CHudMissileInterface(CGuiFrame& selHud, int missileCapacity, int numMissiles, float chargeFactor, bool missilesActive,
|
|
|
|
EHudType hudType, const CStateManager& mgr);
|
|
|
|
void Update(float dt, const CStateManager& mgr);
|
|
|
|
void SetIsVisibleGame(bool v, const CStateManager& mgr);
|
|
|
|
void SetIsVisibleDebug(bool v, const CStateManager& mgr);
|
|
|
|
void SetIsMissilesActive(bool active);
|
|
|
|
void SetChargeBeamFactor(float t);
|
|
|
|
void SetNumMissiles(int numMissiles, const CStateManager& mgr);
|
|
|
|
void SetMissileCapacity(int missileCapacity);
|
2019-08-14 03:04:11 -07:00
|
|
|
EInventoryStatus GetMissileInventoryStatus() const;
|
2018-12-07 21:30:43 -08:00
|
|
|
static std::pair<zeus::CVector3f, zeus::CVector3f> CombatMissileBarCoordFunc(float t);
|
|
|
|
static std::pair<zeus::CVector3f, zeus::CVector3f> XRayMissileBarCoordFunc(float t);
|
|
|
|
static std::pair<zeus::CVector3f, zeus::CVector3f> ThermalMissileBarCoordFunc(float t);
|
2017-04-01 20:03:37 -07:00
|
|
|
};
|
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|