mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
integrate variable: gWindowMapFlashingFlags
This commit is contained in:
parent
d293616bbc
commit
3fcb337c7b
8 changed files with 20 additions and 18 deletions
|
@ -7,7 +7,8 @@
|
|||
<LocalDebuggerCommand>$(TargetDir)\openrct2.exe</LocalDebuggerCommand>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
|
||||
<LocalDebuggerCommandArguments>intro</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerCommandArguments>
|
||||
</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
|
||||
|
|
|
@ -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
|
||||
|
|
18
src/game.c
18
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();
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue