mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename PEEP_MIN_ENERGY to kPeepMinEnergy
This commit is contained in:
parent
530a7de98f
commit
04ca18b7c6
|
@ -981,7 +981,7 @@ static StringId window_cheats_page_titles[] = {
|
|||
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_ENERGY, PEEP_MAX_ENERGY);
|
||||
break;
|
||||
case WIDX_GUEST_ENERGY_MIN:
|
||||
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_ENERGY, PEEP_MIN_ENERGY);
|
||||
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_ENERGY, kPeepMinEnergy);
|
||||
break;
|
||||
case WIDX_GUEST_HUNGER_MAX:
|
||||
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_HUNGER, 0);
|
||||
|
|
|
@ -1101,7 +1101,7 @@ static_assert(_guestWindowPageWidgets.size() == WINDOW_GUEST_PAGE_COUNT);
|
|||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_ENERGY_LABEL);
|
||||
|
||||
int32_t energy = NormalizeGuestStatValue(peep->Energy - PEEP_MIN_ENERGY, PEEP_MAX_ENERGY - PEEP_MIN_ENERGY, 10);
|
||||
int32_t energy = NormalizeGuestStatValue(peep->Energy - kPeepMinEnergy, PEEP_MAX_ENERGY - kPeepMinEnergy, 10);
|
||||
barColour = COLOUR_BRIGHT_GREEN;
|
||||
barBlink = energy < 50;
|
||||
StatsBarsDraw(energy, screenCoords, dpi, barColour, barBlink);
|
||||
|
|
|
@ -353,7 +353,7 @@ ParametersRange CheatSetAction::GetParameterRange(CheatType cheatType) const
|
|||
{ 0, kPeepMaxHappiness } };
|
||||
case GUEST_PARAMETER_ENERGY:
|
||||
return { { GUEST_PARAMETER_HAPPINESS, GUEST_PARAMETER_PREFERRED_RIDE_INTENSITY },
|
||||
{ PEEP_MIN_ENERGY, PEEP_MAX_ENERGY } };
|
||||
{ kPeepMinEnergy, PEEP_MAX_ENERGY } };
|
||||
case GUEST_PARAMETER_HUNGER:
|
||||
return { { GUEST_PARAMETER_HAPPINESS, GUEST_PARAMETER_PREFERRED_RIDE_INTENSITY }, { 0, kPeepMaxHunger } };
|
||||
case GUEST_PARAMETER_THIRST:
|
||||
|
|
|
@ -843,8 +843,8 @@ void Guest::Loc68FA89()
|
|||
newEnergy = newTargetEnergy;
|
||||
}
|
||||
|
||||
if (newEnergy < PEEP_MIN_ENERGY)
|
||||
newEnergy = PEEP_MIN_ENERGY;
|
||||
if (newEnergy < kPeepMinEnergy)
|
||||
newEnergy = kPeepMinEnergy;
|
||||
|
||||
/* Previous code here suggested maximum energy is 128. */
|
||||
newEnergy = std::min(static_cast<uint8_t>(PEEP_MAX_ENERGY), newEnergy);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <array>
|
||||
#include <optional>
|
||||
|
||||
#define PEEP_MIN_ENERGY 32
|
||||
constexpr int8_t kPeepMinEnergy = 32;
|
||||
#define PEEP_MAX_ENERGY 128
|
||||
#define PEEP_MAX_ENERGY_TARGET 255 // Oddly, this differs from max energy!
|
||||
|
||||
|
|
Loading…
Reference in New Issue