diff --git a/source/core/gamestruct.h b/source/core/gamestruct.h index f6a0dd697..c32603825 100644 --- a/source/core/gamestruct.h +++ b/source/core/gamestruct.h @@ -87,7 +87,7 @@ struct GameInterface virtual const char *CheckCheatMode() { return nullptr; } virtual const char* GenericCheat(int player, int cheat) = 0; virtual void NextLevel(MapRecord* map, int skill) {} - virtual void NewGame(MapRecord* map, int skill) {} + virtual void NewGame(MapRecord* map, int skill, bool special = false) {} virtual void LevelCompleted(MapRecord* map, int skill) {} virtual bool DrawAutomapPlayer(int x, int y, int z, int a, double const smoothratio) { return false; } virtual void SetTileProps(int tile, int surf, int vox, int shade) {} diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 1ffdc6293..8a7ed3e12 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -197,7 +197,7 @@ static void GameTicker() C_FlushDisplay(); gameaction = ga_level; BackupSaveGame = ""; - gi->NewGame(g_nextmap, g_nextskill); + gi->NewGame(g_nextmap, g_nextskill, ga == ga_newgamenostopsound); break; case ga_startup: diff --git a/source/games/blood/src/blood.cpp b/source/games/blood/src/blood.cpp index 8f4c3bb31..0c7d38cd2 100644 --- a/source/games/blood/src/blood.cpp +++ b/source/games/blood/src/blood.cpp @@ -249,7 +249,7 @@ void NewLevel(MapRecord *sng, int skill) } -void GameInterface::NewGame(MapRecord *sng, int skill) +void GameInterface::NewGame(MapRecord *sng, int skill, bool) { gGameOptions.uGameFlags = 0; cheatReset(); diff --git a/source/games/blood/src/blood.h b/source/games/blood/src/blood.h index 2154cbf29..5c253f635 100644 --- a/source/games/blood/src/blood.h +++ b/source/games/blood/src/blood.h @@ -119,7 +119,7 @@ struct GameInterface : ::GameInterface void Startup() override; void Render() override; const char* GenericCheat(int player, int cheat) override; - void NewGame(MapRecord *sng, int skill) override; + void NewGame(MapRecord *sng, int skill, bool) override; void NextLevel(MapRecord* map, int skill) override; void LevelCompleted(MapRecord* map, int skill) override; bool DrawAutomapPlayer(int x, int y, int z, int a, double const smoothratio) override; diff --git a/source/games/duke/src/duke3d.h b/source/games/duke/src/duke3d.h index d117348d0..8628373d7 100644 --- a/source/games/duke/src/duke3d.h +++ b/source/games/duke/src/duke3d.h @@ -54,7 +54,7 @@ struct GameInterface : public ::GameInterface const char* GenericCheat(int player, int cheat) override; const char* CheckCheatMode() override; void NextLevel(MapRecord* map, int skill) override; - void NewGame(MapRecord* map, int skill) override; + void NewGame(MapRecord* map, int skill, bool) override; void LevelCompleted(MapRecord* map, int skill) override; bool DrawAutomapPlayer(int x, int y, int z, int a, double const smoothratio) override; int playerKeyMove() override { return 40; } diff --git a/source/games/duke/src/gameloop.cpp b/source/games/duke/src/gameloop.cpp index 917bdf3f7..3b5791477 100644 --- a/source/games/duke/src/gameloop.cpp +++ b/source/games/duke/src/gameloop.cpp @@ -183,7 +183,7 @@ void GameInterface::NextLevel(MapRecord* map, int skill) // //--------------------------------------------------------------------------- -void GameInterface::NewGame(MapRecord* map, int skill) +void GameInterface::NewGame(MapRecord* map, int skill, bool) { // Hmm... What about the other players? ps[0].last_extra = gs.max_player_health; diff --git a/source/games/exhumed/src/exhumed.h b/source/games/exhumed/src/exhumed.h index cb4ae4118..87bdc393e 100644 --- a/source/games/exhumed/src/exhumed.h +++ b/source/games/exhumed/src/exhumed.h @@ -243,7 +243,7 @@ struct GameInterface : ::GameInterface void GetInput(InputPacket* packet, ControlInfo* const hidInput) override; void Startup() override; const char* GenericCheat(int player, int cheat) override; - void NewGame(MapRecord *map, int skill) override; + void NewGame(MapRecord *map, int skill, bool) override; void LevelCompleted(MapRecord *map, int skill) override; void NextLevel(MapRecord *map, int skill) override; bool DrawAutomapPlayer(int x, int y, int z, int a, double const smoothratio) override; diff --git a/source/games/exhumed/src/gameloop.cpp b/source/games/exhumed/src/gameloop.cpp index 949670c75..154c7b69b 100644 --- a/source/games/exhumed/src/gameloop.cpp +++ b/source/games/exhumed/src/gameloop.cpp @@ -212,12 +212,13 @@ void GameInterface::NextLevel(MapRecord *map, int skill) } -void GameInterface::NewGame(MapRecord *map, int skill) +void GameInterface::NewGame(MapRecord *map, int skill, bool frommenu) { // start a new game on the given level InitNewGame(); if (map->levelNumber == 1) STAT_StartNewGame("Exhumed", 1); - Intermission(nullptr, map); + if (frommenu) Intermission(nullptr, map); + else NextLevel(map, skill); } void GameInterface::LevelCompleted(MapRecord *map, int skill) diff --git a/source/games/sw/src/game.cpp b/source/games/sw/src/game.cpp index e77e64f6c..eea3e0f38 100644 --- a/source/games/sw/src/game.cpp +++ b/source/games/sw/src/game.cpp @@ -607,7 +607,7 @@ void GameInterface::NextLevel(MapRecord *map, int skill) // //--------------------------------------------------------------------------- -void GameInterface::NewGame(MapRecord *map, int skill) +void GameInterface::NewGame(MapRecord *map, int skill, bool) { if (skill != -1) Skill = skill; ShadowWarrior::NewGame = true; diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index e9ab4c651..c7dda49e2 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -2246,7 +2246,7 @@ struct GameInterface : ::GameInterface const char* GenericCheat(int player, int cheat) override; void LevelCompleted(MapRecord *map, int skill) override; void NextLevel(MapRecord *map, int skill) override; - void NewGame(MapRecord *map, int skill) override; + void NewGame(MapRecord *map, int skill, bool) override; bool DrawAutomapPlayer(int x, int y, int z, int a, double const smoothratio) override; int playerKeyMove() override { return 35; } void WarpToCoords(int x, int y, int z, int a, int h) override;