metaforce/Runtime/GuiSys/CHudEnergyInterface.hpp

47 lines
1.5 KiB
C++
Raw Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
2017-04-01 20:03:37 -07:00
#include "Runtime/RetroTypes.hpp"
#include "Runtime/GuiSys/CHudInterface.hpp"
#include <zeus/CVector3f.hpp>
2017-04-02 22:37:54 -07:00
2021-04-10 01:42:06 -07:00
namespace metaforce {
class CAuiEnergyBarT01;
class CAuiMeter;
2017-04-02 22:37:54 -07:00
class CGuiFrame;
class CGuiTextPane;
class CGuiWidget;
2017-04-01 20:03:37 -07:00
2018-12-07 21:30:43 -08:00
class CHudEnergyInterface {
EHudType x0_hudType;
float x4_energyLowFader = 0.f;
float x8_flashMag = 0.f;
float xc_tankEnergy;
int x10_totalEnergyTanks;
int x14_numTanksFilled;
float x18_cachedBarEnergy = 0.f;
bool x1c_24_ : 1 = true;
bool x1c_25_ : 1 = true;
bool x1c_26_barDirty : 1 = true;
bool x1c_27_energyLow : 1;
2018-12-07 21:30:43 -08:00
CGuiTextPane* x20_textpane_energydigits;
CAuiMeter* x24_meter_energytanks;
CGuiTextPane* x28_textpane_energywarning;
CAuiEnergyBarT01* x2c_energybart01_energybar;
2017-04-02 22:37:54 -07:00
public:
2018-12-07 21:30:43 -08:00
CHudEnergyInterface(CGuiFrame& selHud, float tankEnergy, int totalEnergyTanks, int numTanksFilled, bool energyLow,
EHudType hudType);
void Update(float dt, float energyLowPulse);
void SetEnergyLow(bool energyLow);
void SetFlashMagnitude(float mag);
void SetNumFilledEnergyTanks(int numTanksFilled);
void SetNumTotalEnergyTanks(int totalEnergyTanks);
void SetCurrEnergy(float tankEnergy, bool wrapped);
static std::pair<zeus::CVector3f, zeus::CVector3f> CombatEnergyCoordFunc(float t);
static std::pair<zeus::CVector3f, zeus::CVector3f> XRayEnergyCoordFunc(float t);
static std::pair<zeus::CVector3f, zeus::CVector3f> ThermalEnergyCoordFunc(float t);
static std::pair<zeus::CVector3f, zeus::CVector3f> BallEnergyCoordFunc(float t);
2017-04-01 20:03:37 -07:00
};
2021-04-10 01:42:06 -07:00
} // namespace metaforce