1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00

add global macro: gGuestInitialHunger

This commit is contained in:
Ted John
2016-04-23 02:37:23 +01:00
parent 727a568e32
commit a819819ff4
6 changed files with 11 additions and 10 deletions

View File

@@ -495,7 +495,7 @@ static int cc_get(const utf8 **argv, int argc)
}
}
else if (strcmp(argv[0], "guest_initial_hunger") == 0) {
console_printf("guest_initial_hunger %d%% (%d)", ((255 - RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_HUNGER, uint8)) * 100) / 255, RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_HUNGER, uint8));
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));
@@ -622,7 +622,7 @@ static int cc_set(const utf8 **argv, int argc)
console_execute_silent("get guest_initial_happiness");
}
else if (strcmp(argv[0], "guest_initial_hunger") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_HUNGER, uint8) = (clamp(int_val[0], 1, 84) * 255 / 100 - 255) * -1;
gGuestInitialHunger = (clamp(int_val[0], 1, 84) * 255 / 100 - 255) * -1;
console_execute_silent("get guest_initial_hunger");
}
else if (strcmp(argv[0], "guest_initial_thirst") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {