| 15 | auto MainMenu::onExitClicked() -> void { Abyss::AbyssEngine::getInstance().quit(); } |
| 16 | |
| 17 | MainMenu::MainMenu() { |
| 18 | if (playedIntroVideos >= 2) { |
| 19 | return; |
| 20 | } |
| 21 | constexpr std::string_view webm = "/data/hd/global/video/blizzardlogos.webm"; |
| 22 | constexpr std::string_view flac = "/data/hd/local/video/blizzardlogos.flac"; |
| 23 | if (Abyss::AbyssEngine::getInstance().fileExists(webm)) { |
| 24 | Abyss::AbyssEngine::getInstance().playVideoAndAudio(webm, flac); |
| 25 | playMainThemeMusic(); |
| 26 | playedIntroVideos = 2; |
| 27 | } else { |
| 28 | Abyss::AbyssEngine::getInstance().playVideo(Common::ResourcePaths::Videos::BlizardStartup1); |
| 29 | playedIntroVideos = 1; |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | void MainMenu::update(const std::chrono::duration<double> deltaTime) { |
| 34 | if (playedIntroVideos < 2) { |
nothing calls this directly
no test coverage detected