MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ImportS6

Function ImportS6

test/tests/S6ImportExportTests.cpp:71–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71static bool ImportS6(MemoryStream& stream, std::unique_ptr<IContext>& context, bool retainSpatialIndices)
72{
73 stream.SetPosition(0);
74
75 auto& objManager = context->GetObjectManager();
76
77 auto importer = ParkImporter::CreateS6(context->GetObjectRepository());
78 auto loadResult = importer->LoadFromStream(&stream, false);
79 objManager.LoadObjects(loadResult.RequiredObjects);
80
81 MapAnimations::ClearAll();
82 // TODO: Have a separate GameState and exchange once loaded.
83 auto& gameState = getGameState();
84 importer->Import(gameState);
85
86 GameInit(retainSpatialIndices);
87
88 return true;
89}
90
91static bool ImportPark(MemoryStream& stream, std::unique_ptr<IContext>& context, bool retainSpatialIndices)
92{

Callers 1

TESTFunction · 0.85

Calls 5

GameInitFunction · 0.85
LoadObjectsMethod · 0.80
SetPositionMethod · 0.45
LoadFromStreamMethod · 0.45
ImportMethod · 0.45

Tested by

no test coverage detected