mirror of https://github.com/OpenRCT2/OpenRCT2.git
add global macro: gGuestInitialThirst
This commit is contained in:
parent
a819819ff4
commit
0c90c165a2
|
@ -498,7 +498,7 @@ static int cc_get(const utf8 **argv, int argc)
|
|||
console_printf("guest_initial_hunger %d%% (%d)", ((255 - gGuestInitialHunger) * 100) / 255, gGuestInitialHunger);
|
||||
}
|
||||
else if (strcmp(argv[0], "guest_initial_thirst") == 0) {
|
||||
console_printf("guest_initial_thirst %d%% (%d)", ((255 - RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8)) * 100) / 255, RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8));
|
||||
console_printf("guest_initial_thirst %d%% (%d)", ((255 - gGuestInitialThirst) * 100) / 255, gGuestInitialThirst);
|
||||
}
|
||||
else if (strcmp(argv[0], "guest_prefer_less_intense_rides") == 0) {
|
||||
console_printf("guest_prefer_less_intense_rides %d", (gParkFlags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES) != 0);
|
||||
|
@ -626,7 +626,7 @@ static int cc_set(const utf8 **argv, int argc)
|
|||
console_execute_silent("get guest_initial_hunger");
|
||||
}
|
||||
else if (strcmp(argv[0], "guest_initial_thirst") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8) = (clamp(int_val[0], 1, 84) * 255 / 100 - 255) * -1;
|
||||
gGuestInitialThirst = (clamp(int_val[0], 1, 84) * 255 / 100 - 255) * -1;
|
||||
console_execute_silent("get guest_initial_thirst");
|
||||
}
|
||||
else if (strcmp(argv[0], "guest_prefer_less_intense_rides") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
|
|
|
@ -6130,7 +6130,7 @@ rct_peep *peep_generate(int x, int y, int z)
|
|||
|
||||
peep->hunger = hunger;
|
||||
|
||||
sint8 thirst = (scenario_rand() & 0x1F) - 15 + RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8);
|
||||
sint8 thirst = (scenario_rand() & 0x1F) - 15 + gGuestInitialThirst;
|
||||
|
||||
peep->thirst = thirst;
|
||||
|
||||
|
|
|
@ -602,6 +602,7 @@ enum {
|
|||
#define gGuestInitialCash RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_CASH, money16)
|
||||
#define gGuestInitialHappiness RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_HAPPINESS, uint8)
|
||||
#define gGuestInitialHunger RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_HUNGER, uint8)
|
||||
#define gGuestInitialThirst RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8)
|
||||
|
||||
int peep_get_staff_count();
|
||||
int peep_can_be_picked_up(rct_peep* peep);
|
||||
|
|
|
@ -960,7 +960,7 @@ void S4Importer::ImportParkFlags()
|
|||
// Initial guest status
|
||||
gGuestInitialCash = _s4.guest_initial_cash;
|
||||
gGuestInitialHunger = _s4.guest_initial_hunger;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8) = _s4.guest_initial_thirst;
|
||||
gGuestInitialThirst = _s4.guest_initial_thirst;
|
||||
|
||||
// Staff colours
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HANDYMAN_COLOUR, uint8) = RCT1::GetColour(_s4.handman_colour);
|
||||
|
|
|
@ -785,16 +785,16 @@ static void window_editor_scenario_options_guests_mousedown(int widgetIndex, rct
|
|||
window_invalidate(w);
|
||||
break;
|
||||
case WIDX_GUEST_INITIAL_THIRST_INCREASE:
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8) > 40) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8) -= 4;
|
||||
if (gGuestInitialThirst > 40) {
|
||||
gGuestInitialThirst -= 4;
|
||||
} else {
|
||||
window_error_open(3264, STR_NONE);
|
||||
}
|
||||
window_invalidate(w);
|
||||
break;
|
||||
case WIDX_GUEST_INITIAL_THIRST_DECREASE:
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8) < 250) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8) += 4;
|
||||
if (gGuestInitialThirst < 250) {
|
||||
gGuestInitialThirst += 4;
|
||||
} else {
|
||||
window_error_open(3265, STR_NONE);
|
||||
}
|
||||
|
@ -915,7 +915,7 @@ static void window_editor_scenario_options_guests_paint(rct_window *w, rct_drawp
|
|||
// Guest initial thirst value
|
||||
x = w->x + w->widgets[WIDX_GUEST_INITIAL_THIRST].left + 1;
|
||||
y = w->y + w->widgets[WIDX_GUEST_INITIAL_THIRST].top;
|
||||
arg = ((255 - RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8)) * 100) / 255;
|
||||
arg = ((255 - gGuestInitialThirst) * 100) / 255;
|
||||
gfx_draw_string_left(dpi, 3247, &arg, 0, x, y);
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ void park_init()
|
|||
gGuestInitialCash = MONEY(50,00); // Cash per guest (average)
|
||||
gGuestInitialHappiness = calculate_guest_initial_happiness(50); // 50%
|
||||
gGuestInitialHunger = 200;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8) = 200;
|
||||
gGuestInitialThirst = 200;
|
||||
gScenarioObjectiveType = OBJECTIVE_GUESTS_BY;
|
||||
gScenarioObjectiveYear = 4;
|
||||
gScenarioObjectiveNumGuests = 1000;
|
||||
|
|
Loading…
Reference in New Issue