MCPcopy Create free account
hub / github.com/AbyssEngine/AbyssEngineOld / MainMenu

Method MainMenu

src/OD2/Scenes/MainMenu/MainMenu.cpp:17–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15auto MainMenu::onExitClicked() -> void { Abyss::AbyssEngine::getInstance().quit(); }
16
17MainMenu::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
33void MainMenu::update(const std::chrono::duration<double> deltaTime) {
34 if (playedIntroVideos < 2) {

Callers

nothing calls this directly

Calls 3

playVideoAndAudioMethod · 0.80
playVideoMethod · 0.80
fileExistsMethod · 0.45

Tested by

no test coverage detected