forked from rosebudai/OpenRCT2-Web
Move most gScenario* globals to GameState_t
This commit is contained in:
1 parent
d4b0c2e115
commit
115e7389a9
23 files changed
+308
-278
No files matched your search
@@ -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