MCPcopy Create free account
hub / github.com/EasyRPG/Player / Exit

Method Exit

src/player.cpp:409–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409void Player::Exit() {
410 if (player_config.settings_autosave.Get()) {
411 Scene_Settings::SaveConfig(true);
412 }
413
414 Graphics::UpdateSceneCallback();
415#ifdef EMSCRIPTEN
416 BitmapRef surface = DisplayUi->GetDisplaySurface();
417 std::string message = "It's now safe to turn off\n your browser.";
418 DisplayUi->CleanDisplay();
419 Text::Draw(*surface, 84, DisplayUi->GetHeight() / 2 - 16, *Font::DefaultBitmapFont(), Color(221, 123, 64, 255), message);
420 DisplayUi->UpdateDisplay();
421
422 auto ret = FileFinder::Root().OpenOutputStream("/tmp/message.png", std::ios_base::binary | std::ios_base::out | std::ios_base::trunc);
423 if (ret) Output::TakeScreenshot(ret);
424#endif
425 Player::ResetGameObjects();
426 Font::Dispose();
427 Graphics::Quit();
428 Output::Quit();
429 FileFinder::Quit();
430 DisplayUi.reset();
431}
432
433Game_Config Player::ParseCommandLine() {
434 debug_flag = false;

Callers

nothing calls this directly

Calls 7

CleanDisplayMethod · 0.80
OpenOutputStreamMethod · 0.80
ColorClass · 0.70
GetMethod · 0.45
GetHeightMethod · 0.45
UpdateDisplayMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected