From e749285e4866f9ee0a44f87403dcb06d9fdb7c7e Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Sun, 29 Jan 2017 20:08:37 +0000 Subject: [PATCH] Label PARK_FLAGS_18 and adjust SCENARIO_NO_MONEY comment --- src/openrct2/editor.c | 2 +- src/openrct2/rct1/S4Importer.cpp | 2 +- src/openrct2/scenario/scenario.c | 2 +- src/openrct2/windows/editor_bottom_toolbar.c | 6 +++--- src/openrct2/windows/loadsave.c | 2 +- src/openrct2/world/park.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/openrct2/editor.c b/src/openrct2/editor.c index b8009f5707..135c9c0465 100644 --- a/src/openrct2/editor.c +++ b/src/openrct2/editor.c @@ -333,7 +333,7 @@ static void editor_clear_map_for_editing(bool fromSave) else gParkFlags &= ~PARK_FLAGS_PARK_FREE_ENTRY; - gParkFlags &= ~PARK_FLAGS_18; + gParkFlags &= ~PARK_FLAGS_SPRITES_INITIALISED; gGuestInitialCash = clamp(MONEY(10,00), gGuestInitialCash, MONEY(100,00)); diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 89dbed9611..d0145b834f 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1877,7 +1877,7 @@ private: { gCheatsUnlockAllPrices = true; } - // RCT2 uses two flags for no money (for cheat detection). RCT1 used only one. + // RCT2 uses two flags for no money (due to the scenario editor). RCT1 used only one. // Copy its value to make no money scenarios such as Arid Heights work properly. if (_s4.park_flags & RCT1_PARK_FLAGS_NO_MONEY) { diff --git a/src/openrct2/scenario/scenario.c b/src/openrct2/scenario/scenario.c index fd13c0791e..e350a07b59 100644 --- a/src/openrct2/scenario/scenario.c +++ b/src/openrct2/scenario/scenario.c @@ -264,7 +264,7 @@ void scenario_begin() gParkEntranceFee = 0; } - gParkFlags |= PARK_FLAGS_18; + gParkFlags |= PARK_FLAGS_SPRITES_INITIALISED; load_palette(); gfx_invalidate_screen(); diff --git a/src/openrct2/windows/editor_bottom_toolbar.c b/src/openrct2/windows/editor_bottom_toolbar.c index 54181fa2ad..4cade3a608 100644 --- a/src/openrct2/windows/editor_bottom_toolbar.c +++ b/src/openrct2/windows/editor_bottom_toolbar.c @@ -354,7 +354,7 @@ static void window_editor_bottom_toolbar_mouseup(rct_window *w, sint32 widgetInd { if (widgetIndex == WIDX_PREVIOUS_STEP_BUTTON) { if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) || - (gSpriteListCount[SPRITE_LIST_NULL] == MAX_SPRITES && !(gParkFlags & PARK_FLAGS_18)) + (gSpriteListCount[SPRITE_LIST_NULL] == MAX_SPRITES && !(gParkFlags & PARK_FLAGS_SPRITES_INITIALISED)) ) { previous_button_mouseup_events[gS6Info.editor_step](); } @@ -401,7 +401,7 @@ void window_editor_bottom_toolbar_invalidate(rct_window *w) } else if (gS6Info.editor_step == EDITOR_STEP_ROLLERCOASTER_DESIGNER) { hide_next_step_button(); } else if (!(gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)) { - if (gSpriteListCount[SPRITE_LIST_NULL] != MAX_SPRITES || gParkFlags & PARK_FLAGS_18) { + if (gSpriteListCount[SPRITE_LIST_NULL] != MAX_SPRITES || gParkFlags & PARK_FLAGS_SPRITES_INITIALISED) { hide_previous_step_button(); } } @@ -426,7 +426,7 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) else if (gSpriteListCount[SPRITE_LIST_NULL] != MAX_SPRITES) { drawNextButton = true; } - else if (gParkFlags & PARK_FLAGS_18) { + else if (gParkFlags & PARK_FLAGS_SPRITES_INITIALISED) { drawNextButton = true; } else { diff --git a/src/openrct2/windows/loadsave.c b/src/openrct2/windows/loadsave.c index 8c75413f77..d18a5c98cc 100644 --- a/src/openrct2/windows/loadsave.c +++ b/src/openrct2/windows/loadsave.c @@ -785,7 +785,7 @@ static void window_loadsave_select(rct_window *w, const char *path) { save_path(&gConfigGeneral.last_save_scenario_directory, path); sint32 parkFlagsBackup = gParkFlags; - gParkFlags &= ~PARK_FLAGS_18; + gParkFlags &= ~PARK_FLAGS_SPRITES_INITIALISED; gS6Info.editor_step = 255; rw = SDL_RWFromFile(path, "wb+"); sint32 success = 0; diff --git a/src/openrct2/world/park.h b/src/openrct2/world/park.h index e1ca3ce273..cd23cd6ddd 100644 --- a/src/openrct2/world/park.h +++ b/src/openrct2/world/park.h @@ -42,7 +42,7 @@ enum { PARK_FLAGS_DIFFICULT_PARK_RATING = (1 << 14), PARK_FLAGS_LOCK_REAL_NAMES_OPTION = (1 << 15), PARK_FLAGS_NO_MONEY_SCENARIO = (1 << 17), // equivalent to PARK_FLAGS_NO_MONEY, but used in scenario editor - PARK_FLAGS_18 = (1 << 18), + PARK_FLAGS_SPRITES_INITIALISED = (1 << 18), // After a scenario is loaded this prevents edits in the scenario editor PARK_FLAGS_SIX_FLAGS_DEPRECATED = (1 << 19) // Not used anymore };