Skip to content

Commit

Permalink
Play music during game start and loading screens
Browse files Browse the repository at this point in the history
  • Loading branch information
frabert committed Sep 14, 2018
1 parent 4306e72 commit cd5e440
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/engine/GameSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ void GameSession::switchToWorld(const std::string& worldFile)
auto strippedWorldName = Utils::uppered(Utils::stripExtension(worldFile));
engine->getHud().getLoadingScreen().reset("LOADING_" + strippedWorldName + ".TGA");
engine->getHud().getLoadingScreen().setHidden(false);
engine->getAudioWorld().playMusicTheme("SYS_Loading");

auto& session = engine->getSession();
auto oldWorld = engine->getMainWorld();
Expand Down
5 changes: 5 additions & 0 deletions src/target/REGoth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ void REGoth::init(int _argc, char** _argv)
{
menuMain.onCustomAction("NEW_GAME");
}
else
{
m_pEngine->getAudioWorld().playMusicTheme("SYS_Menu");
m_pEngine->getAudioWorld().playSound("GAMESTART");
}

m_timeOffset = bx::getHPCounter();

Expand Down

0 comments on commit cd5e440

Please sign in to comment.