Skip to content

Commit

Permalink
- make all games return to the main menu when the game is ended with …
Browse files Browse the repository at this point in the history
…F10.

Duke still went to the intro movies which was a bit problematic.
  • Loading branch information
coelckers committed May 4, 2021
1 parent 0659bda commit c679f83
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 31 deletions.
1 change: 0 additions & 1 deletion source/core/gamestruct.h
Expand Up @@ -84,7 +84,6 @@ struct GameInterface
virtual double SmallFontScale() { return 1; }
virtual void SerializeGameState(FSerializer& arc) {}
virtual void DrawPlayerSprite(const DVector2& origin, bool onteam) {}
virtual void QuitToTitle() {}
virtual void SetAmbience(bool on) {}
virtual FString GetCoordString() { return "'stat coord' not implemented"; }
virtual void ExitFromMenu() { throw CExitEvent(0); }
Expand Down
4 changes: 3 additions & 1 deletion source/core/menu/razemenu.cpp
Expand Up @@ -64,6 +64,7 @@
#include "i_net.h"
#include "savegamehelp.h"
#include "gi.h"
#include "raze_music.h"

EXTERN_CVAR(Int, cl_gfxlocalization)
EXTERN_CVAR(Bool, m_quickexit)
Expand Down Expand Up @@ -272,7 +273,8 @@ CCMD(menu_endgame)
{
STAT_Cancel();
M_ClearMenus();
gi->QuitToTitle();
Mus_Stop();
gameaction = ga_mainmenu;
});

M_ActivateMenu(newmenu);
Expand Down
1 change: 0 additions & 1 deletion source/games/blood/src/blood.h
Expand Up @@ -121,7 +121,6 @@ struct GameInterface : ::GameInterface
void MenuOpened() override;
void MenuClosed() override;
bool CanSave() override;
void QuitToTitle() override;
FString GetCoordString() override;
ReservedSpace GetReservedScreenSpace(int viewsize) override;
void UpdateSounds() override;
Expand Down
6 changes: 0 additions & 6 deletions source/games/blood/src/d_menu.cpp
Expand Up @@ -163,12 +163,6 @@ FSavegameInfo GameInterface::GetSaveSig()
return { SAVESIG_BLD, MINSAVEVER_BLD, SAVEVER_BLD };
}

void GameInterface::QuitToTitle()
{
Mus_Stop();
gameaction = ga_mainmenu;
}

END_BLD_NS

using namespace Blood;
Expand Down
6 changes: 0 additions & 6 deletions source/games/duke/src/d_menu.cpp
Expand Up @@ -136,10 +136,4 @@ void GameInterface::DrawPlayerSprite(const DVector2& origin, bool onteam)
DrawTexture(twod, tex, x, y, DTA_FullscreenScale, FSMode_Fit320x200, DTA_TranslationIndex, color, DTA_ScaleX, scale, DTA_ScaleY, scale, TAG_DONE);
}

void GameInterface::QuitToTitle()
{
gameaction = ga_startup;
}


END_DUKE_NS
1 change: 0 additions & 1 deletion source/games/duke/src/duke3d.h
Expand Up @@ -40,7 +40,6 @@ struct GameInterface : public ::GameInterface
FSavegameInfo GetSaveSig() override;
double SmallFontScale() override { return isRR() ? 0.5 : 1.; }
void SerializeGameState(FSerializer& arc) override;
void QuitToTitle() override;
FString GetCoordString() override;
void ExitFromMenu() override;
ReservedSpace GetReservedScreenSpace(int viewsize) override;
Expand Down
5 changes: 0 additions & 5 deletions source/games/exhumed/src/d_menu.cpp
Expand Up @@ -67,11 +67,6 @@ void GameInterface::MenuSound(EMenuSounds snd)
}
}

void GameInterface::QuitToTitle()
{
gameaction = ga_mainmenu;
}

FSavegameInfo GameInterface::GetSaveSig()
{
return { SAVESIG_PS, MINSAVEVER_PS, SAVEVER_PS };
Expand Down
1 change: 0 additions & 1 deletion source/games/exhumed/src/exhumed.h
Expand Up @@ -225,7 +225,6 @@ struct GameInterface : ::GameInterface
void SerializeGameState(FSerializer& arc);
bool CanSave() override;
ReservedSpace GetReservedScreenSpace(int viewsize) override { return { 0, 24 }; }
void QuitToTitle() override;
void UpdateSounds() override;
void ErrorCleanup() override;
void Ticker() override;
Expand Down
7 changes: 0 additions & 7 deletions source/games/sw/src/d_menu.cpp
Expand Up @@ -61,13 +61,6 @@ BEGIN_SW_NS
//
//----------------------------------------------------------------------------

void GameInterface::QuitToTitle()
{
Mus_Stop();
gameaction = ga_mainmenu;
}


void GameInterface::MenuSound(EMenuSounds snd)
{
switch (snd)
Expand Down
3 changes: 1 addition & 2 deletions source/games/sw/src/game.h
Expand Up @@ -2250,8 +2250,7 @@ struct GameInterface : ::GameInterface
void SetAmbience(bool on) override { if (on) StartAmbientSound(); else StopAmbientSound(); }
FString GetCoordString() override;
ReservedSpace GetReservedScreenSpace(int viewsize) override;
void QuitToTitle() override;
void UpdateSounds() override;
void UpdateSounds() override;
void ErrorCleanup() override;
void GetInput(InputPacket* input, ControlInfo* const hidInput) override;
void DrawBackground(void) override;
Expand Down

0 comments on commit c679f83

Please sign in to comment.