1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 14:24:33 +01:00

Fix #12093. Incorrect position and animation of staff tab. (#12094)

Mistake made when refactoring transposed two digits. Additional mistake made when removing a variable that was unused that changed the memory layout of the window. This meant that a part of the code that accessed a different variable in a union fetched the wrong memory. This was a mistake ultimately made during implementation.
This commit is contained in:
Duncan
2020-07-02 13:19:19 +01:00
committed by GitHub
parent 920115448e
commit cd716ca4aa
3 changed files with 4 additions and 6 deletions

View File

@@ -1022,7 +1022,7 @@ void window_staff_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dpi)
return;
}
screenCoords = ScreenCoordsXY{ 20, 14 };
screenCoords = ScreenCoordsXY{ 14, 20 };
Peep* peep = GET_PEEP(w->number);
@@ -1035,7 +1035,7 @@ void window_staff_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dpi)
if (w->page == WINDOW_STAFF_OVERVIEW)
{
eax = w->highlighted_item >> 16;
eax = w->var_496;
eax &= 0xFFFC;
}
ebx += eax;

View File

@@ -80,10 +80,7 @@ struct rct_window
ResearchItem* research_item;
rct_object_entry* object_entry;
const scenario_index_entry* highlighted_scenario;
struct
{
uint16_t var_496;
};
uint16_t var_496;
};
int16_t selected_tab;
int16_t var_4AE;