mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 22:13:07 +01:00
Move most gScenario* globals to GameState_t
This commit is contained in:
committed by
GitHub
parent
d4b0c2e115
commit
115e7389a9
@@ -93,6 +93,7 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator* enumerato
|
||||
context->Initialise();
|
||||
|
||||
auto& objManager = context->GetObjectManager();
|
||||
auto& gameState = GetGameState();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -102,7 +103,6 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator* enumerato
|
||||
objManager.LoadObjects(loadResult.RequiredObjects);
|
||||
|
||||
// TODO: Have a separate GameState and exchange once loaded.
|
||||
auto& gameState = GetGameState();
|
||||
importer->Import(gameState);
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
@@ -114,7 +114,7 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator* enumerato
|
||||
if (sourceFileType == FileExtension::SC4 || sourceFileType == FileExtension::SC6)
|
||||
{
|
||||
// We are converting a scenario, so reset the park
|
||||
ScenarioBegin();
|
||||
ScenarioBegin(gameState);
|
||||
}
|
||||
|
||||
try
|
||||
@@ -125,8 +125,6 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator* enumerato
|
||||
// correct initial view
|
||||
WindowCloseByClass(WindowClass::MainWindow);
|
||||
|
||||
auto& gameState = GetGameState();
|
||||
|
||||
exporter->Export(gameState, destinationPath);
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
|
||||
Reference in New Issue
Block a user