2017-04-02 03:03:37 +00:00
|
|
|
#ifndef __URDE_CHUDENERGYINTERFACE_HPP__
|
|
|
|
#define __URDE_CHUDENERGYINTERFACE_HPP__
|
|
|
|
|
2017-04-03 05:37:54 +00:00
|
|
|
#include "RetroTypes.hpp"
|
2017-04-04 05:48:13 +00:00
|
|
|
#include "CHudInterface.hpp"
|
2017-10-25 07:47:49 +00:00
|
|
|
#include "zeus/CVector3f.hpp"
|
2017-04-03 05:37:54 +00:00
|
|
|
|
2017-04-02 03:03:37 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
2017-04-03 05:37:54 +00:00
|
|
|
class CGuiFrame;
|
|
|
|
class CGuiWidget;
|
|
|
|
class CGuiTextPane;
|
|
|
|
class CAuiMeter;
|
|
|
|
class CAuiEnergyBarT01;
|
2017-04-02 03:03:37 +00:00
|
|
|
|
2017-04-03 05:37:54 +00:00
|
|
|
class CHudEnergyInterface
|
2017-04-02 03:03:37 +00:00
|
|
|
{
|
2017-04-04 05:48:13 +00:00
|
|
|
EHudType x0_hudType;
|
2017-04-03 05:37:54 +00:00
|
|
|
float x4_energyLowFader = 0.f;
|
|
|
|
float x8_flashMag = 0.f;
|
|
|
|
float xc_tankEnergy;
|
|
|
|
int x10_totalEnergyTanks;
|
|
|
|
int x14_numTanksFilled;
|
|
|
|
float x18_cachedBarEnergy = 0.f;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool x1c_24_ : 1;
|
|
|
|
bool x1c_25_ : 1;
|
|
|
|
bool x1c_26_barDirty : 1;
|
|
|
|
bool x1c_27_energyLow : 1;
|
|
|
|
};
|
|
|
|
u16 _dummy = 0;
|
|
|
|
};
|
|
|
|
CGuiTextPane* x20_textpane_energydigits;
|
|
|
|
CAuiMeter* x24_meter_energytanks;
|
|
|
|
CGuiTextPane* x28_textpane_energywarning;
|
|
|
|
CAuiEnergyBarT01* x2c_energybart01_energybar;
|
|
|
|
public:
|
|
|
|
CHudEnergyInterface(CGuiFrame& selHud, float tankEnergy, int totalEnergyTanks,
|
2017-04-04 05:48:13 +00:00
|
|
|
int numTanksFilled, bool energyLow, EHudType hudType);
|
2017-04-03 01:39:23 +00:00
|
|
|
void Update(float dt, float energyLowPulse);
|
2017-04-03 05:37:54 +00:00
|
|
|
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-02 03:03:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CHUDENERGYINTERFACE_HPP__
|