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

Method UpdateInn

src/scene_map.cpp:508–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508void Scene_Map::UpdateInn() {
509 // Allow message box to render during inn sequence.
510 if (Game_Message::IsMessageActive()) {
511 Game_Message::Update();
512 return;
513 }
514
515 if (!inn_started) {
516 Transition::instance().InitErase(Transition::TransitionFadeOut, Scene::instance.get());
517 inn_started = true;
518 inn_timer = Game_Clock::GetFrameTime();
519
520 AsyncNext([=]() { StartInn(); });
521 return;
522 }
523
524 // Do not use Game_System::BgmPlayedOnce here as it does not report looping for WAV correctly
525 if (Audio().BGM_IsPlaying() && !Audio().BGM_PlayedOnce() && (Game_Clock::GetFrameTime() - inn_timer < 10s)) {
526 return;
527 }
528
529 Main_Data::game_system->BgmStop();
530 FinishInn();
531}

Callers

nothing calls this directly

Calls 6

InitEraseMethod · 0.80
BgmStopMethod · 0.80
UpdateFunction · 0.70
getMethod · 0.45
BGM_IsPlayingMethod · 0.45
BGM_PlayedOnceMethod · 0.45

Tested by

no test coverage detected