1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Remove ScenerySetDefaultPlacementConfiguration from _legacy.cpp

This commit is contained in:
Aaron van Geffen
2024-07-31 15:54:16 +02:00
parent b0b048f3d5
commit d1ca17adef
12 changed files with 26 additions and 29 deletions

View File

@@ -12,6 +12,7 @@
#include "../interface/Window.h"
#include <memory>
#include <openrct2-ui/windows/Window.h>
#include <openrct2/Context.h>
#include <openrct2/Diagnostic.h>
#include <openrct2/Game.h>
@@ -24,7 +25,6 @@
#include <openrct2/core/String.hpp>
#include <openrct2/entity/EntityRegistry.h>
#include <openrct2/interface/Viewport.h>
#include <openrct2/interface/Window.h>
#include <openrct2/localisation/StringIds.h>
#include <openrct2/management/NewsItem.h>
#include <openrct2/object/ObjectManager.h>
@@ -437,7 +437,7 @@ namespace OpenRCT2::Title
ResetAllSpriteQuadrantPlacements();
auto intent = Intent(INTENT_ACTION_REFRESH_NEW_RIDES);
ContextBroadcastIntent(&intent);
ScenerySetDefaultPlacementConfiguration();
Ui::Windows::WindowScenerySetDefaultPlacementConfiguration();
News::InitQueue();
LoadPalette();
gScreenAge = 0;

View File

@@ -163,7 +163,7 @@ static Widget _editorBottomToolbarWidgets[] = {
{
WindowCloseAll();
SetAllSceneryItemsInvented();
ScenerySetDefaultPlacementConfiguration();
WindowScenerySetDefaultPlacementConfiguration();
GetGameState().EditorStep = EditorStep::LandscapeEditor;
ContextOpenWindow(WindowClass::Map);
GfxInvalidateScreen();

View File

@@ -384,14 +384,13 @@ namespace OpenRCT2::Editor
windowManager->SetMainView(gameState.SavedView, gameState.SavedViewZoom, gameState.SavedViewRotation);
ResetAllSpriteQuadrantPlacements();
ScenerySetDefaultPlacementConfiguration();
windowManager->BroadcastIntent(Intent(INTENT_ACTION_SET_DEFAULT_SCENERY_CONFIG));
windowManager->BroadcastIntent(Intent(INTENT_ACTION_REFRESH_NEW_RIDES));
windowManager->BroadcastIntent(Intent(INTENT_ACTION_CLEAR_TILE_INSPECTOR_CLIPBOARD));
gWindowUpdateTicks = 0;
LoadPalette();
windowManager->BroadcastIntent(Intent(INTENT_ACTION_CLEAR_TILE_INSPECTOR_CLIPBOARD));
}
/**

View File

@@ -501,7 +501,10 @@ void FinishObjectSelection()
else
{
SetAllSceneryItemsInvented();
ScenerySetDefaultPlacementConfiguration();
auto intent = Intent(INTENT_ACTION_SET_DEFAULT_SCENERY_CONFIG);
ContextBroadcastIntent(&intent);
gameState.EditorStep = EditorStep::LandscapeEditor;
GfxInvalidateScreen();
}

View File

@@ -369,10 +369,6 @@ void GameLoadInit()
}
ResetEntitySpatialIndices();
ResetAllSpriteQuadrantPlacements();
ScenerySetDefaultPlacementConfiguration();
auto intent = Intent(INTENT_ACTION_REFRESH_NEW_RIDES);
ContextBroadcastIntent(&intent);
gWindowUpdateTicks = 0;
gCurrentRealTimeTicks = 0;
@@ -381,8 +377,9 @@ void GameLoadInit()
if (!gOpenRCT2Headless)
{
intent = Intent(INTENT_ACTION_CLEAR_TILE_INSPECTOR_CLIPBOARD);
ContextBroadcastIntent(&intent);
windowManager->BroadcastIntent(Intent(INTENT_ACTION_SET_DEFAULT_SCENERY_CONFIG));
windowManager->BroadcastIntent(Intent(INTENT_ACTION_REFRESH_NEW_RIDES));
windowManager->BroadcastIntent(Intent(INTENT_ACTION_CLEAR_TILE_INSPECTOR_CLIPBOARD));
}
gGameSpeed = 1;

View File

@@ -83,10 +83,12 @@ namespace OpenRCT2
GetGameState().NextGuestNumber = 1;
ContextInit();
ScenerySetDefaultPlacementConfiguration();
auto intent = Intent(INTENT_ACTION_CLEAR_TILE_INSPECTOR_CLIPBOARD);
ContextBroadcastIntent(&intent);
auto sceneryIntent = Intent(INTENT_ACTION_SET_DEFAULT_SCENERY_CONFIG);
ContextBroadcastIntent(&sceneryIntent);
auto clipboardIntent = Intent(INTENT_ACTION_CLEAR_TILE_INSPECTOR_CLIPBOARD);
ContextBroadcastIntent(&clipboardIntent);
LoadPalette();

View File

@@ -1273,10 +1273,12 @@ static int32_t ConsoleCommandLoadObject(InteractiveConsole& console, const argum
ResearchResetCurrentItem();
gSilentResearch = false;
}
ScenerySetDefaultPlacementConfiguration();
auto intent = Intent(INTENT_ACTION_REFRESH_NEW_RIDES);
ContextBroadcastIntent(&intent);
auto sceneryIntent = Intent(INTENT_ACTION_SET_DEFAULT_SCENERY_CONFIG);
ContextBroadcastIntent(&sceneryIntent);
auto ridesIntent = Intent(INTENT_ACTION_REFRESH_NEW_RIDES);
ContextBroadcastIntent(&ridesIntent);
gWindowUpdateTicks = 0;
GfxInvalidateScreen();

View File

@@ -94,7 +94,10 @@ void ScenarioReset(GameState_t& gameState)
gameState.ScenarioRand.seed(s);
ResearchResetCurrentItem();
ScenerySetDefaultPlacementConfiguration();
auto intent = Intent(INTENT_ACTION_SET_DEFAULT_SCENERY_CONFIG);
ContextBroadcastIntent(&intent);
News::InitQueue();
gameState.Park.Rating = Park::CalculateParkRating();

View File

@@ -410,9 +410,3 @@ bool SceneryToolIsActive()
return false;
}
void ScenerySetDefaultPlacementConfiguration()
{
auto intent = Intent(INTENT_ACTION_SET_DEFAULT_SCENERY_CONFIG);
ContextBroadcastIntent(&intent);
}

View File

@@ -69,7 +69,6 @@ extern const CoordsXY SceneryQuadrantOffsets[];
extern money64 gClearSceneryCost;
void SceneryUpdateTile(const CoordsXY& sceneryPos);
void ScenerySetDefaultPlacementConfiguration();
void SceneryRemoveGhostToolPlacement();
struct WallSceneryEntry;

View File

@@ -57,7 +57,6 @@ static std::unique_ptr<IContext> localStartGame(const std::string& parkPath)
ResetEntitySpatialIndices();
ResetAllSpriteQuadrantPlacements();
ScenerySetDefaultPlacementConfiguration();
LoadPalette();
EntityTweener::Get().Reset();
MapAnimationAutoCreate();

View File

@@ -65,7 +65,6 @@ static void GameInit(bool retainSpatialIndices)
ResetEntitySpatialIndices();
ResetAllSpriteQuadrantPlacements();
ScenerySetDefaultPlacementConfiguration();
LoadPalette();
EntityTweener::Get().Reset();
MapAnimationAutoCreate();