MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / quit

Method quit

src/Engine/Game.cpp:320–329  ·  view source on GitHub ↗

* Stops the state machine and the game is shut down. */

Source from the content-addressed store, hash-verified

318 * Stops the state machine and the game is shut down.
319 */
320void Game::quit()
321{
322 // Always save ironman
323 if (_save != 0 && _save->isIronman() && !_save->getName().empty())
324 {
325 std::string filename = CrossPlatform::sanitizeFilename(Language::wstrToFs(_save->getName())) + ".sav";
326 _save->save(filename);
327 }
328 _quit = true;
329}
330
331/**
332 * Changes the audio volume of the music and

Callers 2

handleMethod · 0.80
btnQuitClickMethod · 0.80

Calls 5

sanitizeFilenameFunction · 0.85
isIronmanMethod · 0.80
emptyMethod · 0.45
getNameMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected