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

Function SaveGame

src/openrct2/Game.cpp:468–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468void SaveGame()
469{
470 if (!gFirstTimeSaving && !gIsAutosaveLoaded)
471 {
472#ifndef __EMSCRIPTEN__
473 const auto savePath = Path::WithExtension(gScenarioSavePath, ".park");
474 SaveGameWithName(savePath);
475#else
476 const auto savePath = Path::WithExtension("save", ".park");
477 SaveGameWithName(savePath);
478 EmscriptenSaveGame(false, false, LoadSaveType::park);
479#endif
480 }
481 else
482 {
483 SaveGameAs();
484 }
485}
486
487void SaveGameCmd(u8string_view name /* = {} */)
488{

Callers 2

onDropdownMethod · 0.85
ShortcutQuickSaveGameFunction · 0.85

Calls 3

WithExtensionFunction · 0.85
SaveGameWithNameFunction · 0.85
SaveGameAsFunction · 0.85

Tested by

no test coverage detected