- Exhumed: play the menu advance sound when starting a game

This commit is contained in:
Christoph Oelckers 2020-10-10 13:30:23 +02:00
parent 294a806793
commit 91e23b3ab5
5 changed files with 8 additions and 6 deletions

View file

@ -252,11 +252,11 @@ void ChangeLevel(MapRecord* map, int skill)
//
//---------------------------------------------------------------------------
void DeferedStartGame(MapRecord* map, int skill)
void DeferedStartGame(MapRecord* map, int skill, bool nostopsound)
{
g_nextmap = map;
g_nextskill = skill;
gameaction = ga_newgame;
gameaction = nostopsound? ga_newgamenostopsound : ga_newgame;
}
//---------------------------------------------------------------------------

View file

@ -56,7 +56,7 @@ int GetAutomapZoom(int gZoom);
void DrawCrosshair(int deftile, int health, double xdelta, double ydelta, double scale, PalEntry color = 0xffffffff);
void updatePauseStatus();
void DeferedStartGame(MapRecord* map, int skill);
void DeferedStartGame(MapRecord* map, int skill, bool nostopsound = false);
void ChangeLevel(MapRecord* map, int skill);
void CompleteLevel(MapRecord* map);

View file

@ -41,7 +41,8 @@ enum gameaction_t : int
ga_autosave, // autosave the game (for triggering a save from within the game.)
ga_completed, // Level was exited.
ga_nextlevel, // Actually start the next level.
ga_loadgamehidecon
ga_loadgamehidecon,
ga_newgamenostopsound, // start a new game
};
extern gamestate_t gamestate;
extern gameaction_t gameaction;

View file

@ -187,8 +187,9 @@ static void GameTicker()
break;
case ga_newgame:
newGameStarted = true;
FX_StopAllSounds();
case ga_newgamenostopsound:
newGameStarted = true;
FX_SetReverb(0);
gi->FreeLevelData();
C_ClearMessages();

View file

@ -76,7 +76,7 @@ void GameInterface::QuitToTitle()
bool GameInterface::StartGame(FNewGameStartup& gs)
{
auto map = FindMapByLevelNum(gs.Skill); // 0 is training, 1 is the regular game - the game does not have skill levels.
DeferedStartGame(map, 1);
DeferedStartGame(map, 1, true);
return true;
}