diff --git a/src/windows/game_top_toolbar.c b/src/windows/game_top_toolbar.c index 79b47e9139..4241bfa49b 100644 --- a/src/windows/game_top_toolbar.c +++ b/src/windows/game_top_toolbar.c @@ -189,8 +189,6 @@ static void window_game_top_toolbar_mouseup() switch (widgetIndex) { case WIDX_PAUSE: game_do_command(0, 1, 0, 0, GAME_COMMAND_TOGGLE_PAUSE, 0, 0); - // Not sure where this was done in the original code - w->pressed_widgets ^= (1 << WIDX_PAUSE); break; // case WIDX_FASTFORWARD: // // This is an excellent place to add in debugging statements and @@ -258,8 +256,6 @@ static void window_game_top_toolbar_mouseup() */ static void window_game_top_toolbar_mousedown(int widgetIndex, rct_window*w, rct_widget* widget) { - rct_viewport *mainViewport; - switch (widgetIndex) { case WIDX_FILE_MENU: gDropdownItemsFormat[0] = STR_LOAD_GAME; @@ -455,6 +451,11 @@ static void window_game_top_toolbar_invalidate() // else // w->pressed_widgets &= ~(1 << WIDX_FASTFORWARD); + if (!(RCT2_GLOBAL(0x009DEA6E, uint32) & 1)) + w->pressed_widgets &= ~(1 << WIDX_PAUSE); + else + w->pressed_widgets |= (1 << WIDX_PAUSE); + // Zoomed out/in disable. Not sure where this code is in the original. if (window_get_main()->viewport->zoom == 0){ w->disabled_widgets |= (1 << WIDX_ZOOM_IN); @@ -513,12 +514,14 @@ static void window_game_top_toolbar_scenery_tool_down(short x, short y, rct_wind sint16 grid_x, grid_y, grid_z; uint8 item_colour; + uint8 model_type; int ebp = selected_tab; { - int eax = x, ebx = y, ecx = 0, edx = 0, esi = 0, edi = 0, ebp = selected_tab; + int eax = x, ebx = y, ecx = 0, edx = 0, esi = 0, edi = 0; RCT2_CALLFUNC_X(0x6E1F34, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp); item_colour = edi; + model_type = (ebx & 0xFF00) >> 8; grid_x = eax; grid_y = ecx; grid_z = edx; @@ -532,7 +535,7 @@ static void window_game_top_toolbar_scenery_tool_down(short x, short y, rct_wind // The return value will be banner id but the input is colour int banner_id = item_colour; - int ebx = 1; + int ebx = (model_type << 8) | 1; { int esi = 0, eax = grid_x, ecx = grid_y, edx = grid_z;