- hooked up SW's intermission handling.

This commit is contained in:
Christoph Oelckers 2021-04-29 16:10:04 +02:00
parent aa148d602c
commit 5959543380
2 changed files with 24 additions and 30 deletions

View file

@ -142,14 +142,6 @@ void GameInterface::Render()
void GameInterface::NextLevel(MapRecord* map, int skill) void GameInterface::NextLevel(MapRecord* map, int skill)
{ {
#if 0
// Loading is so fast on modern systems that this only serves as an irritant, not an asset.
loadscreen(map, [=](bool)
{
enterlevel(map, 0);
gameaction = ga_level;
});
#endif
enterlevel(map, 0); enterlevel(map, 0);
} }

View file

@ -88,10 +88,6 @@ CVAR(Bool, sw_bunnyrockets, false, CVAR_SERVERINFO | CVAR_CHEAT); // This is a
BEGIN_SW_NS BEGIN_SW_NS
void Logo(const CompletionFunc& completion);
void StatScreen(int FinishAnim, CompletionFunc completion);
void pClearSpriteList(PLAYERp pp); void pClearSpriteList(PLAYERp pp);
extern int sw_snd_scratch; extern int sw_snd_scratch;
@ -538,32 +534,37 @@ static void PlayOrderSound()
void GameInterface::LevelCompleted(MapRecord *map, int skill) void GameInterface::LevelCompleted(MapRecord* map, int skill)
{ {
//ResetPalette(mpp); //ResetPalette(mpp);
COVER_SetReverb(0); // Reset reverb COVER_SetReverb(0); // Reset reverb
Player[myconnectindex].Reverb = 0; Player[myconnectindex].Reverb = 0;
StopSound(); StopSound();
STAT_Update(map == nullptr); STAT_Update(map == nullptr);
#if 0 SummaryInfo info{};
// else if (gNet.MultiGameType != MULTI_GAME_COMMBAT)
StatScreen(FinishAnim, [=](bool) info.kills = Player->Kills;
{ info.maxkills = TotalKillable;
info.secrets = Player->SecretsFound;
info.maxsecrets = LevelSecrets;
info.time = PlayClock / 120;
ShowIntermission(currentLevel, map, &info, [=](bool)
{
if (map == nullptr) if (map == nullptr)
{ {
FinishAnim = false; FinishAnim = false;
PlaySong(nullptr, ThemeSongs[0], ThemeTrack[0]); PlaySong(nullptr, ThemeSongs[0], ThemeTrack[0]);
if (SW_SHAREWARE) if (isShareware())
{ {
PlayOrderSound(); PlayOrderSound();
gameaction = ga_creditsmenu; gameaction = ga_creditsmenu;
} }
else gameaction = ga_mainmenu; else gameaction = ga_mainmenu;
} }
else gameaction = ga_nextlevel; else gameaction = ga_nextlevel;
}); });
#endif
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
@ -591,6 +592,7 @@ void GameInterface::NewGame(MapRecord *map, int skill, bool)
ShadowWarrior::NewGame = true; ShadowWarrior::NewGame = true;
InitLevel(map); InitLevel(map);
InitRunLevel(); InitRunLevel();
gameaction = ga_level;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------