From 862ef3018cc7c3e27d8b0f34cc1d42e31ffc7095 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 1 Dec 2018 17:00:11 +0100 Subject: [PATCH] Use gCurrentRealTimeTicks whenever appropriate. --- src/openrct2-ui/windows/GameBottomToolbar.cpp | 2 +- src/openrct2-ui/windows/Guest.cpp | 2 +- src/openrct2-ui/windows/Ride.cpp | 2 +- src/openrct2-ui/windows/RideList.cpp | 2 +- src/openrct2/GameState.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index 1418f4663a..a049b530ad 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -486,7 +486,7 @@ static void window_game_bottom_toolbar_draw_park_rating( bar_width = (factor * 114) / 255; gfx_fill_rect_inset(dpi, x + 1, y + 1, x + 114, y + 9, w->colours[1], INSET_RECT_F_30); - if (!(colour & IMAGE_TYPE_REMAP_2_PLUS) || game_is_paused() || (gCurrentTicks & 8)) + if (!(colour & IMAGE_TYPE_REMAP_2_PLUS) || game_is_paused() || (gCurrentRealTimeTicks & 8)) { if (bar_width > 2) gfx_fill_rect_inset(dpi, x + 2, y + 2, x + bar_width - 1, y + 8, colour & 0x7FFFFFFF, 0); diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 66c0aac2b5..ec842a3670 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1378,7 +1378,7 @@ static void window_guest_stats_bars_paint( int32_t blink_flag = colour & BAR_BLINK; colour &= ~BAR_BLINK; - if (!blink_flag || game_is_paused() || (gCurrentTicks & 8) == 0) + if (!blink_flag || game_is_paused() || (gCurrentRealTimeTicks & 8) == 0) { value *= 118; value >>= 8; diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index abf11263c6..e1a93cf2b7 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -3785,7 +3785,7 @@ static void window_ride_maintenance_draw_bar( if (colour & BAR_BLINK) { colour &= ~BAR_BLINK; - if (game_is_not_paused() && (gCurrentTicks & 8)) + if (game_is_not_paused() && (gCurrentRealTimeTicks & 8)) return; } diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index 22966b91dc..cd1ac2b525 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -302,7 +302,7 @@ static void window_ride_list_resize(rct_window* w) // Refreshing the list can be a very intensive operation // owing to its use of ride_has_any_track_elements(). // This makes sure it's only refreshed every 64 ticks. - if (!(gCurrentTicks & 0x3f)) + if (!(gCurrentRealTimeTicks & 0x3f)) { window_ride_list_refresh_list(w); } diff --git a/src/openrct2/GameState.cpp b/src/openrct2/GameState.cpp index f88f790794..a461069af5 100644 --- a/src/openrct2/GameState.cpp +++ b/src/openrct2/GameState.cpp @@ -168,7 +168,7 @@ void GameState::Update() // the flickering frequency is reduced by 4, compared to the original // it was done due to inability to reproduce original frequency // and decision that the original one looks too fast - if (gCurrentTicks % 4 == 0) + if (gCurrentRealTimeTicks % 4 == 0) gWindowMapFlashingFlags ^= (1 << 15); // Handle guest map flashing