1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 08:14:38 +01:00

Move gMapSize to GameState_t

This commit is contained in:
Harry-Hopkinson
2024-02-12 21:32:08 +00:00
parent 72ca04633e
commit b755c873e5
25 changed files with 128 additions and 90 deletions

View File

@@ -10,6 +10,7 @@
#include "ClearAction.h"
#include "../Context.h"
#include "../GameState.h"
#include "../core/MemoryStream.h"
#include "../drawing/Drawing.h"
#include "../localisation/StringIds.h"
@@ -216,10 +217,11 @@ money64 ClearAction::ClearSceneryFromTile(const CoordsXY& tilePos, bool executin
void ClearAction::ResetClearLargeSceneryFlag()
{
auto& gameState = OpenRCT2::GetGameState();
// TODO: Improve efficiency of this
for (int32_t y = 0; y < gMapSize.y; y++)
for (int32_t y = 0; y < gameState.MapSize.y; y++)
{
for (int32_t x = 0; x < gMapSize.x; x++)
for (int32_t x = 0; x < gameState.MapSize.x; x++)
{
auto tileElement = MapGetFirstElementAt(TileCoordsXY{ x, y });
do