Rename getScenarioEditorScene to disambiguate

This commit is contained in:
Aaron van Geffen committed 2026-07-03 12:35:22 +02:00
1 parent cfadbe53e8
commit c50b46fc39
7 files changed
+18 -18

No files matched your search

+1 -1
View File
@@ -305,7 +305,7 @@ namespace OpenRCT2::Ui::FileBrowser
SetAndSaveConfigPath(Config::Get().general.lastSaveLandscapeDirectory, pathBuffer);
auto* sceneMgr = GetContext()->GetSceneManager();
auto* editorScene = static_cast<EditorScene*>(sceneMgr->getEditorScene());
auto* editorScene = static_cast<EditorScene*>(sceneMgr->getScenarioEditorScene());
sceneMgr->setActiveScene(editorScene);
if (editorScene->LoadLandscape(pathBuffer))
{
+2 -2
View File
@@ -235,11 +235,11 @@ namespace OpenRCT2::Ui::Windows
switch (selectedIndex)
{
case DDIDX_SCENARIO_EDITOR:
sceneMgr->setActiveScene(sceneMgr->getEditorScene());
sceneMgr->setActiveScene(sceneMgr->getScenarioEditorScene());
break;
case DDIDX_CONVERT_SAVED_GAME:
{
auto* editorScene = static_cast<EditorScene*>(sceneMgr->getEditorScene());
auto* editorScene = static_cast<EditorScene*>(sceneMgr->getScenarioEditorScene());
editorScene->ConvertSaveToScenario();
break;
}
+1 -1
View File
@@ -1086,7 +1086,7 @@ namespace OpenRCT2
case StartupAction::edit:
{
auto* editorScene = static_cast<EditorScene*>(_sceneManager->getEditorScene());
auto* editorScene = static_cast<EditorScene*>(_sceneManager->getScenarioEditorScene());
_sceneManager->setActiveScene(editorScene);
if (String::sizeOf(gOpenRCT2StartupActionPath) == 0)
{
+1 -1
View File
@@ -363,7 +363,7 @@ void GameLoadInit()
// TODO: move this to caller sites??
auto* sceneMgr = context->GetSceneManager();
if (sceneMgr->getActiveScene() != sceneMgr->getEditorScene()) // HACK
if (sceneMgr->getActiveScene() != sceneMgr->getScenarioEditorScene()) // HACK
sceneMgr->setActiveScene(sceneMgr->getGameScene());
// Invalidate scrolling text cache to prevent stale text from previous park
+10 -10
View File
@@ -25,10 +25,10 @@ namespace OpenRCT2
private:
IScene* _activeScene = nullptr;
IContext* _sceneContext = nullptr;
std::unique_ptr<EditorScene> _editorScene;
std::unique_ptr<GameScene> _gameScene;
std::unique_ptr<IntroScene> _introScene;
std::unique_ptr<PreloaderScene> _preloaderScene;
std::unique_ptr<EditorScene> _scenarioEditorScene;
std::unique_ptr<TitleScene> _titleScene;
std::unique_ptr<TrackDesignerScene> _trackDesignerScene;
std::unique_ptr<TrackManagerScene> _trackManagerScene;
@@ -44,15 +44,6 @@ namespace OpenRCT2
return _activeScene;
}
IScene* getEditorScene() override
{
if (auto* scene = _editorScene.get())
return scene;
_editorScene = std::make_unique<EditorScene>(*_sceneContext);
return _editorScene.get();
}
IScene* getGameScene() override
{
if (auto* scene = _gameScene.get())
@@ -80,6 +71,15 @@ namespace OpenRCT2
return _preloaderScene.get();
}
IScene* getScenarioEditorScene() override
{
if (auto* scene = _scenarioEditorScene.get())
return scene;
_scenarioEditorScene = std::make_unique<EditorScene>(*_sceneContext);
return _scenarioEditorScene.get();
}
IScene* getTitleScene() override
{
if (auto* scene = _titleScene.get())
+1 -1
View File
@@ -20,10 +20,10 @@ namespace OpenRCT2
virtual ~ISceneManager() = default;
virtual IScene* getActiveScene() = 0;
virtual IScene* getEditorScene() = 0;
virtual IScene* getGameScene() = 0;
virtual IScene* getIntroScene() = 0;
virtual IScene* getPreloaderScene() = 0;
virtual IScene* getScenarioEditorScene() = 0;
virtual IScene* getTitleScene() = 0;
virtual IScene* getTrackDesignerScene() = 0;
virtual IScene* getTrackManagerScene() = 0;
+2 -2
View File
@@ -100,7 +100,7 @@ static void ConvertSaveToScenarioCallback(ModalResult result, const utf8* path)
ContextResetSubsystems();
auto* sceneMgr = GetContext()->GetSceneManager();
auto* scene = static_cast<EditorScene*>(sceneMgr->getEditorScene());
auto* scene = static_cast<EditorScene*>(sceneMgr->getScenarioEditorScene());
scene->OpenEditorWindows();
scene->FinaliseMainView();
@@ -156,7 +156,7 @@ void EditorScene::AfterLoadCleanup()
{
// TODO: replace with dedicated scene
auto* sceneMgr = _context.GetSceneManager();
sceneMgr->setActiveScene(sceneMgr->getEditorScene());
sceneMgr->setActiveScene(sceneMgr->getScenarioEditorScene());
getGameState().editorStep = Editor::Step::landscapeEditor;
gScreenAge = 0;