mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- make all games return to the main menu when the game is ended with F10.
Duke still went to the intro movies which was a bit problematic.
This commit is contained in:
parent
0659bda6b6
commit
c679f83f75
10 changed files with 4 additions and 31 deletions
|
@ -84,7 +84,6 @@ struct GameInterface
|
||||||
virtual double SmallFontScale() { return 1; }
|
virtual double SmallFontScale() { return 1; }
|
||||||
virtual void SerializeGameState(FSerializer& arc) {}
|
virtual void SerializeGameState(FSerializer& arc) {}
|
||||||
virtual void DrawPlayerSprite(const DVector2& origin, bool onteam) {}
|
virtual void DrawPlayerSprite(const DVector2& origin, bool onteam) {}
|
||||||
virtual void QuitToTitle() {}
|
|
||||||
virtual void SetAmbience(bool on) {}
|
virtual void SetAmbience(bool on) {}
|
||||||
virtual FString GetCoordString() { return "'stat coord' not implemented"; }
|
virtual FString GetCoordString() { return "'stat coord' not implemented"; }
|
||||||
virtual void ExitFromMenu() { throw CExitEvent(0); }
|
virtual void ExitFromMenu() { throw CExitEvent(0); }
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
#include "i_net.h"
|
#include "i_net.h"
|
||||||
#include "savegamehelp.h"
|
#include "savegamehelp.h"
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
|
#include "raze_music.h"
|
||||||
|
|
||||||
EXTERN_CVAR(Int, cl_gfxlocalization)
|
EXTERN_CVAR(Int, cl_gfxlocalization)
|
||||||
EXTERN_CVAR(Bool, m_quickexit)
|
EXTERN_CVAR(Bool, m_quickexit)
|
||||||
|
@ -272,7 +273,8 @@ CCMD(menu_endgame)
|
||||||
{
|
{
|
||||||
STAT_Cancel();
|
STAT_Cancel();
|
||||||
M_ClearMenus();
|
M_ClearMenus();
|
||||||
gi->QuitToTitle();
|
Mus_Stop();
|
||||||
|
gameaction = ga_mainmenu;
|
||||||
});
|
});
|
||||||
|
|
||||||
M_ActivateMenu(newmenu);
|
M_ActivateMenu(newmenu);
|
||||||
|
|
|
@ -121,7 +121,6 @@ struct GameInterface : ::GameInterface
|
||||||
void MenuOpened() override;
|
void MenuOpened() override;
|
||||||
void MenuClosed() override;
|
void MenuClosed() override;
|
||||||
bool CanSave() override;
|
bool CanSave() override;
|
||||||
void QuitToTitle() override;
|
|
||||||
FString GetCoordString() override;
|
FString GetCoordString() override;
|
||||||
ReservedSpace GetReservedScreenSpace(int viewsize) override;
|
ReservedSpace GetReservedScreenSpace(int viewsize) override;
|
||||||
void UpdateSounds() override;
|
void UpdateSounds() override;
|
||||||
|
|
|
@ -163,12 +163,6 @@ FSavegameInfo GameInterface::GetSaveSig()
|
||||||
return { SAVESIG_BLD, MINSAVEVER_BLD, SAVEVER_BLD };
|
return { SAVESIG_BLD, MINSAVEVER_BLD, SAVEVER_BLD };
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameInterface::QuitToTitle()
|
|
||||||
{
|
|
||||||
Mus_Stop();
|
|
||||||
gameaction = ga_mainmenu;
|
|
||||||
}
|
|
||||||
|
|
||||||
END_BLD_NS
|
END_BLD_NS
|
||||||
|
|
||||||
using namespace Blood;
|
using namespace Blood;
|
||||||
|
|
|
@ -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);
|
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
|
END_DUKE_NS
|
||||||
|
|
|
@ -40,7 +40,6 @@ struct GameInterface : public ::GameInterface
|
||||||
FSavegameInfo GetSaveSig() override;
|
FSavegameInfo GetSaveSig() override;
|
||||||
double SmallFontScale() override { return isRR() ? 0.5 : 1.; }
|
double SmallFontScale() override { return isRR() ? 0.5 : 1.; }
|
||||||
void SerializeGameState(FSerializer& arc) override;
|
void SerializeGameState(FSerializer& arc) override;
|
||||||
void QuitToTitle() override;
|
|
||||||
FString GetCoordString() override;
|
FString GetCoordString() override;
|
||||||
void ExitFromMenu() override;
|
void ExitFromMenu() override;
|
||||||
ReservedSpace GetReservedScreenSpace(int viewsize) override;
|
ReservedSpace GetReservedScreenSpace(int viewsize) override;
|
||||||
|
|
|
@ -67,11 +67,6 @@ void GameInterface::MenuSound(EMenuSounds snd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameInterface::QuitToTitle()
|
|
||||||
{
|
|
||||||
gameaction = ga_mainmenu;
|
|
||||||
}
|
|
||||||
|
|
||||||
FSavegameInfo GameInterface::GetSaveSig()
|
FSavegameInfo GameInterface::GetSaveSig()
|
||||||
{
|
{
|
||||||
return { SAVESIG_PS, MINSAVEVER_PS, SAVEVER_PS };
|
return { SAVESIG_PS, MINSAVEVER_PS, SAVEVER_PS };
|
||||||
|
|
|
@ -225,7 +225,6 @@ struct GameInterface : ::GameInterface
|
||||||
void SerializeGameState(FSerializer& arc);
|
void SerializeGameState(FSerializer& arc);
|
||||||
bool CanSave() override;
|
bool CanSave() override;
|
||||||
ReservedSpace GetReservedScreenSpace(int viewsize) override { return { 0, 24 }; }
|
ReservedSpace GetReservedScreenSpace(int viewsize) override { return { 0, 24 }; }
|
||||||
void QuitToTitle() override;
|
|
||||||
void UpdateSounds() override;
|
void UpdateSounds() override;
|
||||||
void ErrorCleanup() override;
|
void ErrorCleanup() override;
|
||||||
void Ticker() override;
|
void Ticker() override;
|
||||||
|
|
|
@ -61,13 +61,6 @@ BEGIN_SW_NS
|
||||||
//
|
//
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
void GameInterface::QuitToTitle()
|
|
||||||
{
|
|
||||||
Mus_Stop();
|
|
||||||
gameaction = ga_mainmenu;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void GameInterface::MenuSound(EMenuSounds snd)
|
void GameInterface::MenuSound(EMenuSounds snd)
|
||||||
{
|
{
|
||||||
switch (snd)
|
switch (snd)
|
||||||
|
|
|
@ -2250,8 +2250,7 @@ struct GameInterface : ::GameInterface
|
||||||
void SetAmbience(bool on) override { if (on) StartAmbientSound(); else StopAmbientSound(); }
|
void SetAmbience(bool on) override { if (on) StartAmbientSound(); else StopAmbientSound(); }
|
||||||
FString GetCoordString() override;
|
FString GetCoordString() override;
|
||||||
ReservedSpace GetReservedScreenSpace(int viewsize) override;
|
ReservedSpace GetReservedScreenSpace(int viewsize) override;
|
||||||
void QuitToTitle() override;
|
void UpdateSounds() override;
|
||||||
void UpdateSounds() override;
|
|
||||||
void ErrorCleanup() override;
|
void ErrorCleanup() override;
|
||||||
void GetInput(InputPacket* input, ControlInfo* const hidInput) override;
|
void GetInput(InputPacket* input, ControlInfo* const hidInput) override;
|
||||||
void DrawBackground(void) override;
|
void DrawBackground(void) override;
|
||||||
|
|
Loading…
Reference in a new issue