diff --git a/src/openrct2-ui/windows/EditorScenarioOptions.cpp b/src/openrct2-ui/windows/EditorScenarioOptions.cpp index 4d73994ba7..2956c22579 100644 --- a/src/openrct2-ui/windows/EditorScenarioOptions.cpp +++ b/src/openrct2-ui/windows/EditorScenarioOptions.cpp @@ -1288,7 +1288,7 @@ static void window_editor_scenario_options_park_mousedown(rct_window *w, rct_wid window_invalidate(w); break; case WIDX_ENTRY_PRICE_INCREASE: - if (gParkEntranceFee < MONEY(100,00)) { + if (gParkEntranceFee < MAX_ENTRANCE_FEE) { game_do_command( 0, GAME_COMMAND_FLAG_APPLY, diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index 754fcb1818..c2b206ab8f 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -1215,7 +1215,7 @@ static void window_park_price_mousedown(rct_window *w, rct_widgetindex widgetInd window_park_set_page(w, widgetIndex - WIDX_TAB_1); break; case WIDX_INCREASE_PRICE: - newFee = Math::Min(MONEY(200,00), gParkEntranceFee + MONEY(1,00)); + newFee = Math::Min(MAX_ENTRANCE_FEE, gParkEntranceFee + MONEY(1,00)); park_set_entrance_fee(newFee); break; case WIDX_DECREASE_PRICE: diff --git a/src/openrct2/Editor.cpp b/src/openrct2/Editor.cpp index 88a5f2d6be..05a5d24af1 100644 --- a/src/openrct2/Editor.cpp +++ b/src/openrct2/Editor.cpp @@ -333,7 +333,7 @@ namespace Editor gParkFlags &= ~PARK_FLAGS_SPRITES_INITIALISED; - gGuestInitialCash = Math::Clamp((money16)MONEY(10, 00), gGuestInitialCash, (money16)MONEY(100, 00)); + gGuestInitialCash = Math::Clamp((money16)MONEY(10, 00), gGuestInitialCash, (money16)MAX_ENTRANCE_FEE); gInitialCash = Math::Min(gInitialCash, 100000); finance_reset_cash_to_initial(); @@ -726,7 +726,7 @@ namespace Editor } break; case EDIT_SCENARIOOPTIONS_SETPARKCHARGEENTRYFEE: - gParkEntranceFee = Math::Clamp(MONEY(0, 00), *edx, MONEY(100, 00)); + gParkEntranceFee = Math::Clamp(MONEY(0, 00), *edx, MAX_ENTRANCE_FEE); window_invalidate_by_class(WC_PARK_INFORMATION); break; case EDIT_SCENARIOOPTIONS_SETFORBIDTREEREMOVAL: diff --git a/src/openrct2/actions/SetParkEntranceFeeAction.hpp b/src/openrct2/actions/SetParkEntranceFeeAction.hpp index 3c9754ec9e..bcf9b700e9 100644 --- a/src/openrct2/actions/SetParkEntranceFeeAction.hpp +++ b/src/openrct2/actions/SetParkEntranceFeeAction.hpp @@ -56,7 +56,7 @@ public: { return std::make_unique(GA_ERROR::DISALLOWED, STR_NONE); } - if (_fee < MONEY_FREE || _fee > MONEY(100,00)) + if (_fee < MONEY_FREE || _fee > MAX_ENTRANCE_FEE) { return std::make_unique(GA_ERROR::INVALID_PARAMETERS, STR_NONE); } diff --git a/src/openrct2/world/Park.h b/src/openrct2/world/Park.h index 498f7049d1..43261d6026 100644 --- a/src/openrct2/world/Park.h +++ b/src/openrct2/world/Park.h @@ -23,6 +23,7 @@ #define DECRYPT_MONEY(money) ((money32)rol32((money) ^ 0xF4EC9621, 13)) #define ENCRYPT_MONEY(money) ((money32)(ror32((money), 13) ^ 0xF4EC9621)) +#define MAX_ENTRANCE_FEE MONEY(200,00) enum { PARK_FLAGS_PARK_OPEN = (1 << 0),