MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / saveLandscape

Function saveLandscape

src/OpenLoco/src/Game.cpp:316–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314 }
315
316 bool saveLandscape(std::string filename)
317 {
318 // 0x0043C4B3
319 auto path = fs::u8path(filename).replace_extension(S5::extensionSC5);
320 _activeSavePath = path.u8string();
321
322 bool saveResult = !S5::exportGameStateToFile(path, S5::SaveFlags::scenario);
323 if (saveResult)
324 {
325 Ui::Windows::Error::open(StringIds::landscape_save_failed);
326 }
327
328 return saveResult;
329 }
330
331 std::string getActiveSavePath()
332 {

Callers 2

confirmSaveGameFunction · 0.85
loadsaveMenuDropdownFunction · 0.85

Calls 2

exportGameStateToFileFunction · 0.85
openFunction · 0.50

Tested by

no test coverage detected