mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 13:03:11 +01:00
Integrate gWindowUpdateTicks
This commit is contained in:
@@ -921,7 +921,7 @@ static int cc_load_object(const utf8 **argv, int argc) {
|
||||
scenery_set_default_placement_configuration();
|
||||
window_new_ride_init_vars();
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_UPDATE_TICKS, uint16) = 0;
|
||||
gWindowUpdateTicks = 0;
|
||||
gfx_invalidate_screen();
|
||||
console_writeline("Object file loaded.");
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ int gTextBoxFrameNo = 0;
|
||||
bool gUsingWidgetTextBox = 0;
|
||||
bool gLoadSaveTitleSequenceSave = 0;
|
||||
|
||||
uint16 gWindowUpdateTicks;
|
||||
uint8 gToolbarDirtyFlags;
|
||||
uint16 gWindowMapFlashingFlags;
|
||||
|
||||
@@ -164,9 +165,9 @@ void window_update_all()
|
||||
// gfx_draw_all_dirty_blocks();
|
||||
|
||||
// 1000 tick update
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_UPDATE_TICKS, sint16) += gTicksSinceLastUpdate;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_UPDATE_TICKS, sint16) >= 1000) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_UPDATE_TICKS, sint16) = 0;
|
||||
gWindowUpdateTicks += gTicksSinceLastUpdate;
|
||||
if (gWindowUpdateTicks >= 1000) {
|
||||
gWindowUpdateTicks = 0;
|
||||
for (rct_window* w = RCT2_LAST_WINDOW; w >= g_window_list; w--)
|
||||
window_event_unknown_07_call(w);
|
||||
}
|
||||
|
||||
@@ -533,6 +533,7 @@ extern rct_window * gWindowNextSlot;
|
||||
// rct2: 0x00F635EE
|
||||
extern ride_list_item _window_track_list_item;
|
||||
|
||||
extern uint16 gWindowUpdateTicks;
|
||||
extern uint8 gToolbarDirtyFlags;
|
||||
extern uint16 gWindowMapFlashingFlags;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user