mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 01:07:43 +00:00
Runtime/GuiSys: Replace bitfield unions with constructor initializers
This commit is contained in:
@@ -27,12 +27,11 @@ CHudEnergyInterface::CHudEnergyInterface(CGuiFrame& selHud, float tankEnergy, in
|
||||
: x0_hudType(hudType)
|
||||
, xc_tankEnergy(tankEnergy)
|
||||
, x10_totalEnergyTanks(totalEnergyTanks)
|
||||
, x14_numTanksFilled(numTanksFilled) {
|
||||
x1c_24_ = true;
|
||||
x1c_25_ = true;
|
||||
x1c_26_barDirty = true;
|
||||
x1c_27_energyLow = energyLow;
|
||||
|
||||
, x14_numTanksFilled(numTanksFilled)
|
||||
, x1c_24_(true)
|
||||
, x1c_25_(true)
|
||||
, x1c_26_barDirty(true)
|
||||
, x1c_27_energyLow(energyLow) {
|
||||
x20_textpane_energydigits = static_cast<CGuiTextPane*>(selHud.FindWidget("textpane_energydigits"));
|
||||
x24_meter_energytanks = static_cast<CAuiMeter*>(selHud.FindWidget("meter_energytanks"));
|
||||
x28_textpane_energywarning = static_cast<CGuiTextPane*>(selHud.FindWidget("textpane_energywarning"));
|
||||
@@ -100,7 +99,7 @@ void CHudEnergyInterface::Update(float dt, float energyLowPulse) {
|
||||
x1c_26_barDirty = false;
|
||||
x18_cachedBarEnergy = x2c_energybart01_energybar->GetFilledEnergy();
|
||||
std::string string =
|
||||
fmt::format(fmt("{:02d}"), int(std::fmod(x18_cachedBarEnergy, CPlayerState::GetEnergyTankCapacity())));
|
||||
fmt::format(fmt("{:02d}"), int(std::fmod(x18_cachedBarEnergy, CPlayerState::GetEnergyTankCapacity())));
|
||||
x20_textpane_energydigits->TextSupport().SetText(string);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user