diff --git a/openrct2.vcxproj.user b/openrct2.vcxproj.user index 5ea571c6c0..fd6680fbf4 100644 --- a/openrct2.vcxproj.user +++ b/openrct2.vcxproj.user @@ -7,7 +7,8 @@ $(TargetDir)\openrct2.exe WindowsLocalDebugger $(TargetDir) - intro + + $(TargetDir) diff --git a/src/addresses.h b/src/addresses.h index 8eb3d9ea62..31cea24828 100644 --- a/src/addresses.h +++ b/src/addresses.h @@ -85,8 +85,6 @@ #define RCT2_ADDRESS_ERROR_TYPE 0x009AC31B #define RCT2_ADDRESS_ERROR_STRING_ID 0x009AC31C -#define RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS 0x009AC861 - #define RCT2_ADDRESS_RIDE_ENTRIES 0x009ACFA4 @@ -544,6 +542,7 @@ #define RCT2_ADDRESS_LIGHTNING_ACTIVE 0x009AC068 #define RCT2_ADDRESS_RUN_INTRO_TICK_PART 0x009AC319 +#define RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS 0x009AC861 #define RCT2_ADDRESS_TOOL_WINDOWNUMBER 0x009DE542 #define RCT2_ADDRESS_TOOL_WINDOWCLASS 0x009DE544 diff --git a/src/game.c b/src/game.c index d4c9d887d8..ec5695a66a 100644 --- a/src/game.c +++ b/src/game.c @@ -322,19 +322,19 @@ void game_update() // it was done due to inability to reproduce original frequency // and decision that the original one looks too fast if (gCurrentTicks % 4 == 0) - RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) ^= (1 << 15); + gWindowMapFlashingFlags ^= (1 << 15); // Handle guest map flashing - RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) &= ~(1 << 1); - if (RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) & (1 << 0)) - RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) |= (1 << 1); - RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) &= ~(1 << 0); + gWindowMapFlashingFlags &= ~(1 << 1); + if (gWindowMapFlashingFlags & (1 << 0)) + gWindowMapFlashingFlags |= (1 << 1); + gWindowMapFlashingFlags &= ~(1 << 0); // Handle staff map flashing - RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) &= ~(1 << 3); - if (RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) & (1 << 2)) - RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) |= (1 << 3); - RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) &= ~(1 << 2); + gWindowMapFlashingFlags &= ~(1 << 3); + if (gWindowMapFlashingFlags & (1 << 2)) + gWindowMapFlashingFlags |= (1 << 3); + gWindowMapFlashingFlags &= ~(1 << 2); window_map_tooltip_update_visibility(); diff --git a/src/interface/window.c b/src/interface/window.c index cfdf94ee79..58250b8458 100644 --- a/src/interface/window.c +++ b/src/interface/window.c @@ -46,6 +46,7 @@ bool gUsingWidgetTextBox = 0; bool gLoadSaveTitleSequenceSave = 0; uint8 gToolbarDirtyFlags; +uint16 gWindowMapFlashingFlags; // converted from uint16 values at 0x009A41EC - 0x009A4230 // these are percentage coordinates of the viewport to center to, if a window is obscuring a location, the next is tried diff --git a/src/interface/window.h b/src/interface/window.h index 093c9f23e0..7a4dc8cc78 100644 --- a/src/interface/window.h +++ b/src/interface/window.h @@ -512,6 +512,7 @@ extern rct_window * gWindowNextSlot; extern ride_list_item _window_track_list_item; extern uint8 gToolbarDirtyFlags; +extern uint16 gWindowMapFlashingFlags; void window_dispatch_update_all(); void window_update_all_viewports(); diff --git a/src/windows/guest_list.c b/src/windows/guest_list.c index b8a777233a..a976bcac5c 100644 --- a/src/windows/guest_list.c +++ b/src/windows/guest_list.c @@ -658,7 +658,7 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, if (_window_guest_list_selected_filter != -1) { if (window_guest_list_is_peep_in_filter(peep)) continue; - RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) |= (1 << 0); + gWindowMapFlashingFlags |= (1 << 0); peep->flags |= SPRITE_FLAGS_PEEP_FLASHING; } if (_window_guest_list_tracking_only && !(peep->peep_flags & PEEP_FLAGS_TRACKING)) diff --git a/src/windows/map.c b/src/windows/map.c index d511cd0dab..aa802c9ac1 100644 --- a/src/windows/map.c +++ b/src/windows/map.c @@ -1027,17 +1027,17 @@ static void window_map_paint_peep_overlay(rct_drawpixelinfo *dpi) if ((peep->flags & SPRITE_FLAGS_PEEP_FLASHING) != 0) { if (peep->type == PEEP_TYPE_STAFF) { - if ((RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) & (1 << 3)) != 0) { + if ((gWindowMapFlashingFlags & (1 << 3)) != 0) { colour = 0x8A; left--; - if ((RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) & (1 << 15)) == 0) + if ((gWindowMapFlashingFlags & (1 << 15)) == 0) colour = 0xA; } } else { - if ((RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) & (1 << 1)) != 0) { + if ((gWindowMapFlashingFlags & (1 << 1)) != 0) { colour = 0xAC; left--; - if ((RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) & (1 << 15)) == 0) + if ((gWindowMapFlashingFlags & (1 << 15)) == 0) colour = 0x15; } } diff --git a/src/windows/staff_list.c b/src/windows/staff_list.c index 5ea1483687..55119764ee 100644 --- a/src/windows/staff_list.c +++ b/src/windows/staff_list.c @@ -306,7 +306,7 @@ void window_staff_list_update(rct_window *w) w->list_information_type = 0; } else { widget_invalidate(w, WIDX_STAFF_LIST_HANDYMEN_TAB + RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_STAFF_LIST_SELECTED_TAB, uint8)); - RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_MAP_FLASHING_FLAGS, uint16) |= (1 << 2); + gWindowMapFlashingFlags |= (1 << 2); FOR_ALL_STAFF(spriteIndex, peep) { peep->flags &= ~(SPRITE_FLAGS_PEEP_FLASHING);