From 3dba3984bf167d03e1a29f0b3d47d6483ec9fbf1 Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Tue, 7 Jun 2022 09:34:44 +0100 Subject: [PATCH] Remove map_variables --- src/openrct2-ui/windows/Map.cpp | 8 +++++--- src/openrct2/interface/Window.h | 9 --------- src/openrct2/interface/Window_internal.h | 1 - 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/openrct2-ui/windows/Map.cpp b/src/openrct2-ui/windows/Map.cpp index 8d517d5ce9..371bfa8864 100644 --- a/src/openrct2-ui/windows/Map.cpp +++ b/src/openrct2-ui/windows/Map.cpp @@ -136,6 +136,8 @@ static constexpr const ScreenCoordsXY MiniMapOffsets[] = { class MapWindow final : public Window { + uint8_t rotation; + public: MapWindow() { @@ -152,7 +154,7 @@ public: InitScrollWidgets(); - map.rotation = get_current_rotation(); + rotation = get_current_rotation(); InitMap(); gWindowSceneryRotation = 0; @@ -318,9 +320,9 @@ public: void OnUpdate() override { - if (get_current_rotation() != map.rotation) + if (get_current_rotation() != rotation) { - map.rotation = get_current_rotation(); + rotation = get_current_rotation(); InitMap(); CentreMapOnViewPoint(); } diff --git a/src/openrct2/interface/Window.h b/src/openrct2/interface/Window.h index d0f6b4a2d6..56e4c6b969 100644 --- a/src/openrct2/interface/Window.h +++ b/src/openrct2/interface/Window.h @@ -293,15 +293,6 @@ struct news_variables uint16_t var_488; }; -struct map_variables -{ - int16_t rotation; - int16_t var_482; - uint16_t var_484; - uint16_t var_486; - uint16_t var_488; -}; - struct ride_variables { int16_t view; diff --git a/src/openrct2/interface/Window_internal.h b/src/openrct2/interface/Window_internal.h index 36ed878251..0465568156 100644 --- a/src/openrct2/interface/Window_internal.h +++ b/src/openrct2/interface/Window_internal.h @@ -60,7 +60,6 @@ struct rct_window campaign_variables campaign; new_ride_variables new_ride; news_variables news; - map_variables map; ride_variables ride; track_list_variables track_list; error_variables error;