mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-07 08:21:45 +00:00
- fixed compilation and unhooked the Redneck Rampage menu so that it can be replaced.
This commit is contained in:
parent
cd4ff92266
commit
59ebb10512
20 changed files with 126 additions and 287 deletions
|
@ -14,6 +14,7 @@
|
||||||
#include "inputstate.h"
|
#include "inputstate.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "zstring.h"
|
#include "zstring.h"
|
||||||
|
#include "vectors.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUGGINGAIDS
|
#ifdef DEBUGGINGAIDS
|
||||||
|
@ -211,7 +212,7 @@ struct GameInterface
|
||||||
virtual void StartGame(FGameStartup& gs) {}
|
virtual void StartGame(FGameStartup& gs) {}
|
||||||
virtual FSavegameInfo GetSaveSig() { return { "", 0, 0}; }
|
virtual FSavegameInfo GetSaveSig() { return { "", 0, 0}; }
|
||||||
virtual bool DrawSpecialScreen(const DVector2 &origin, int tilenum) { return false; }
|
virtual bool DrawSpecialScreen(const DVector2 &origin, int tilenum) { return false; }
|
||||||
virtual void DrawCenteredTextScreen(const DVector2 &origin, const char *text, int position);
|
virtual void DrawCenteredTextScreen(const DVector2& origin, const char* text, int position) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
extern GameInterface* gi;
|
extern GameInterface* gi;
|
||||||
|
|
|
@ -302,6 +302,13 @@ public:
|
||||||
int32_t mouseReadAbs(vec2_t* const pResult);
|
int32_t mouseReadAbs(vec2_t* const pResult);
|
||||||
void GetMouseDelta(ControlInfo* info);
|
void GetMouseDelta(ControlInfo* info);
|
||||||
|
|
||||||
|
void ClearAllInput()
|
||||||
|
{
|
||||||
|
ClearKeysDown();
|
||||||
|
keyFlushChars();
|
||||||
|
keyFlushScans();
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -629,17 +629,17 @@ int FListMenuItemPatch::GetWidth()
|
||||||
|
|
||||||
void ImageScreen::Drawer()
|
void ImageScreen::Drawer()
|
||||||
{
|
{
|
||||||
if (mDesc->mType == 0)
|
if (mDesc->type == 0)
|
||||||
{
|
{
|
||||||
auto tileindexp = NameToTileIndex.CheckKey(mDesc->mText);
|
auto tileindexp = NameToTileIndex.CheckKey(FName(mDesc->text, true));
|
||||||
int tileindex;
|
int tileindex;
|
||||||
if (tileindexp == nullptr)
|
if (tileindexp == nullptr)
|
||||||
{
|
{
|
||||||
// If this isn't a name, try a literal tile index;
|
// If this isn't a name, try a literal tile index;
|
||||||
auto c = mDesc->mMenuName.GetChars();
|
auto c = mDesc->text.GetChars();
|
||||||
if (*c == '#') tileindex = (int)strtoll(c+1, nullptr, 0);
|
if (*c == '#') tileindex = (int)strtoll(c+1, nullptr, 0);
|
||||||
// Error out if the screen cannot be found, this is always a definition error that needs to be reported.
|
// Error out if the screen cannot be found, this is always a definition error that needs to be reported.
|
||||||
else I_Error("Invalid menu screen '%s'", mDesc->mMenuName.GetChars());
|
else I_Error("Invalid menu screen '%s'", mDesc->text.GetChars());
|
||||||
}
|
}
|
||||||
else tileindex = *tileindexp;
|
else tileindex = *tileindexp;
|
||||||
if (!gi->DrawSpecialScreen(origin, tileindex)) // allows the front end to do custom handling for a given image.
|
if (!gi->DrawSpecialScreen(origin, tileindex)) // allows the front end to do custom handling for a given image.
|
||||||
|
@ -649,6 +649,6 @@ void ImageScreen::Drawer()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gi->DrawCenteredTextScreen(origin, mDesc->mText, mDesc->type);
|
gi->DrawCenteredTextScreen(origin, mDesc->text, mDesc->type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -377,6 +377,7 @@ void M_StartControlPanel (bool makeSound)
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonMap.ResetButtonStates ();
|
buttonMap.ResetButtonStates ();
|
||||||
|
inputState.ClearAllKeyStatus();
|
||||||
for (int i = 0; i < NUM_MKEYS; ++i)
|
for (int i = 0; i < NUM_MKEYS; ++i)
|
||||||
{
|
{
|
||||||
MenuButtons[i].ReleaseKey(0);
|
MenuButtons[i].ReleaseKey(0);
|
||||||
|
|
|
@ -71,8 +71,6 @@
|
||||||
#include "savegamehelp.h"
|
#include "savegamehelp.h"
|
||||||
#include "sjson.h"
|
#include "sjson.h"
|
||||||
|
|
||||||
CVARD(Bool, mus_restartonload, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "restart the music when loading a saved game with the same map or not") // only implemented for Blood - todo: generalize
|
|
||||||
|
|
||||||
MusPlayingInfo mus_playing;
|
MusPlayingInfo mus_playing;
|
||||||
MusicAliasMap MusicAliases;
|
MusicAliasMap MusicAliases;
|
||||||
MidiDeviceMap MidiDevices;
|
MidiDeviceMap MidiDevices;
|
||||||
|
@ -80,6 +78,8 @@ MusicVolumeMap MusicVolumes;
|
||||||
MusicAliasMap LevelMusicAliases;
|
MusicAliasMap LevelMusicAliases;
|
||||||
bool MusicPaused;
|
bool MusicPaused;
|
||||||
static bool mus_blocked;
|
static bool mus_blocked;
|
||||||
|
static FString lastStartedMusic;
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -257,6 +257,7 @@ bool S_StartMusic (const char *m_id)
|
||||||
|
|
||||||
bool S_ChangeMusic(const char* musicname, int order, bool looping, bool force)
|
bool S_ChangeMusic(const char* musicname, int order, bool looping, bool force)
|
||||||
{
|
{
|
||||||
|
lastStartedMusic = musicname; // remember the last piece of music that was requested to be played.
|
||||||
if (musicname == nullptr || musicname[0] == 0)
|
if (musicname == nullptr || musicname[0] == 0)
|
||||||
{
|
{
|
||||||
// Don't choke if the map doesn't have a song attached
|
// Don't choke if the map doesn't have a song attached
|
||||||
|
@ -269,16 +270,6 @@ bool S_ChangeMusic(const char* musicname, int order, bool looping, bool force)
|
||||||
|
|
||||||
FString DEH_Music;
|
FString DEH_Music;
|
||||||
|
|
||||||
FName* aliasp = MusicAliases.CheckKey(musicname);
|
|
||||||
if (aliasp != nullptr)
|
|
||||||
{
|
|
||||||
if (*aliasp == NAME_None)
|
|
||||||
{
|
|
||||||
return true; // flagged to be ignored
|
|
||||||
}
|
|
||||||
musicname = aliasp->GetChars();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mus_playing.name.IsEmpty() &&
|
if (!mus_playing.name.IsEmpty() &&
|
||||||
mus_playing.handle != nullptr &&
|
mus_playing.handle != nullptr &&
|
||||||
stricmp(mus_playing.name, musicname) == 0 &&
|
stricmp(mus_playing.name, musicname) == 0 &&
|
||||||
|
@ -577,10 +568,11 @@ int Mus_Play(const char *mapname, const char *fn, bool loop)
|
||||||
mapname = lastMusicLevel.GetChars();
|
mapname = lastMusicLevel.GetChars();
|
||||||
fn = lastMusic.GetChars();
|
fn = lastMusic.GetChars();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow per level music substitution.
|
// Allow per level music substitution.
|
||||||
// Unlike some other engines like ZDoom or even Blood which use definition files, the music names in Duke Nukem are being defined in a CON script, making direct replacement a lot harder.
|
|
||||||
// For most cases using $musicalias would be sufficient, but that method only works if a level actually has some music defined at all.
|
// For most cases using $musicalias would be sufficient, but that method only works if a level actually has some music defined at all.
|
||||||
// This way it can be done with an add-on definition lump even in cases like Redneck Rampage where no music definitions exist or where music gets reused for multiple levels but replacement is wanted individually.
|
// This way it can be done with an add-on definition lump even in cases like Redneck Rampage where no music definitions exist
|
||||||
|
// or where music gets reused for multiple levels but replacement is wanted individually.
|
||||||
if (mapname && *mapname)
|
if (mapname && *mapname)
|
||||||
{
|
{
|
||||||
if (*mapname == '/') mapname++;
|
if (*mapname == '/') mapname++;
|
||||||
|
@ -588,6 +580,24 @@ int Mus_Play(const char *mapname, const char *fn, bool loop)
|
||||||
if (check) fn = check->GetChars();
|
if (check) fn = check->GetChars();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Now perform music aliasing. This also needs to be done before checking identities because multiple names can map to the same song.
|
||||||
|
FName* aliasp = MusicAliases.CheckKey(fn);
|
||||||
|
if (aliasp != nullptr)
|
||||||
|
{
|
||||||
|
if (*aliasp == NAME_None)
|
||||||
|
{
|
||||||
|
return true; // flagged to be ignored
|
||||||
|
}
|
||||||
|
fn = aliasp->GetChars();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mus_restartonload)
|
||||||
|
{
|
||||||
|
// If the currently playing piece of music is the same, do not restart. Note that there's still edge cases where this may fail to detect identities.
|
||||||
|
if (mus_playing.handle != nullptr && lastStartedMusic.CompareNoCase(fn) == 0 && mus_playing.loop)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
S_ChangeMusic(fn, 0, loop, true);
|
S_ChangeMusic(fn, 0, loop, true);
|
||||||
return mus_playing.handle != nullptr;
|
return mus_playing.handle != nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,6 +256,7 @@ int G_ValidateSavegame(FileReader &fr, FString *savetitle)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
|
@ -1080,8 +1080,6 @@ static int32_t VM_ResetPlayer(int const playerNum, int32_t vmFlags, int32_t cons
|
||||||
}
|
}
|
||||||
else if (!(resetFlags & 1))
|
else if (!(resetFlags & 1))
|
||||||
{
|
{
|
||||||
inputState.ClearKeyStatus(sc_Space);
|
|
||||||
I_AdvanceTriggerClear();
|
|
||||||
M_StartControlPanel(false);
|
M_StartControlPanel(false);
|
||||||
M_SetMenu(NAME_ConfirmPlayerReset);
|
M_SetMenu(NAME_ConfirmPlayerReset);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1553,7 +1553,6 @@ static void Menu_PreDraw(MenuID_t cm, MenuEntry_t *entry, const vec2_t origin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case MENU_CREDITS4: // JBF 20031220
|
case MENU_CREDITS4: // JBF 20031220
|
||||||
{
|
{
|
||||||
#define MENU_YOFFSET 40
|
#define MENU_YOFFSET 40
|
||||||
|
|
|
@ -1004,31 +1004,6 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (I_EscapeTrigger() && ud.overhead_on == 0
|
|
||||||
&& ud.show_help == 0
|
|
||||||
&& g_player[myconnectindex].ps->newowner == -1)
|
|
||||||
{
|
|
||||||
if ((g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU &&
|
|
||||||
g_player[myconnectindex].ps->newowner == -1 &&
|
|
||||||
(g_player[myconnectindex].ps->gm&MODE_TYPE) != MODE_TYPE)
|
|
||||||
{
|
|
||||||
I_EscapeTriggerClear();
|
|
||||||
S_PauseSounds(true);
|
|
||||||
|
|
||||||
Menu_Open(myconnectindex);
|
|
||||||
|
|
||||||
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2) ready2send = 0;
|
|
||||||
|
|
||||||
if (g_player[myconnectindex].ps->gm&MODE_GAME) Menu_Change(MENU_MAIN_INGAME);
|
|
||||||
else Menu_Change(MENU_MAIN);
|
|
||||||
screenpeek = myconnectindex;
|
|
||||||
|
|
||||||
S_MenuSound();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && cl_crosshair && ud.camerasprite == -1)
|
if (g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && cl_crosshair && ud.camerasprite == -1)
|
||||||
{
|
{
|
||||||
ud.returnvar[0] = (160<<16) - (g_player[myconnectindex].ps->look_ang<<15);
|
ud.returnvar[0] = (160<<16) - (g_player[myconnectindex].ps->look_ang<<15);
|
||||||
|
|
|
@ -9142,13 +9142,13 @@ next_sprite:
|
||||||
|
|
||||||
static void G_DoEffectorLights(void) // STATNUM 14
|
static void G_DoEffectorLights(void) // STATNUM 14
|
||||||
{
|
{
|
||||||
int32_t i;
|
#ifdef POLYMER
|
||||||
|
int32_t i;
|
||||||
|
|
||||||
for (SPRITES_OF(STAT_LIGHT, i))
|
for (SPRITES_OF(STAT_LIGHT, i))
|
||||||
{
|
{
|
||||||
switch (sprite[i].lotag)
|
switch (sprite[i].lotag)
|
||||||
{
|
{
|
||||||
#ifdef POLYMER
|
|
||||||
case SE_49_POINT_LIGHT:
|
case SE_49_POINT_LIGHT:
|
||||||
{
|
{
|
||||||
if (!A_CheckSpriteFlags(i, SFLAG_NOLIGHT) && videoGetRenderMode() == REND_POLYMER &&
|
if (!A_CheckSpriteFlags(i, SFLAG_NOLIGHT) && videoGetRenderMode() == REND_POLYMER &&
|
||||||
|
@ -9310,9 +9310,9 @@ static void G_DoEffectorLights(void) // STATNUM 14
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif // POLYMER
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // POLYMER
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
|
|
|
@ -40,7 +40,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "namesdyn.h"
|
#include "namesdyn.h"
|
||||||
#include "../../glbackend/glbackend.h"
|
#include "../../glbackend/glbackend.h"
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
|
||||||
|
BEGIN_RR_NS
|
||||||
|
|
||||||
#define MENU_MARGIN_REGULAR 40
|
#define MENU_MARGIN_REGULAR 40
|
||||||
#define MENU_MARGIN_WIDE 32
|
#define MENU_MARGIN_WIDE 32
|
||||||
|
@ -142,8 +143,7 @@ static void Menu_DrawBackground(const DVector2 &origin)
|
||||||
|
|
||||||
static void Menu_DrawTopBar(const DVector2 &origin)
|
static void Menu_DrawTopBar(const DVector2 &origin)
|
||||||
{
|
{
|
||||||
if ((G_GetLogoFlags() & LOGO_NOTITLEBAR) == 0)
|
rotatesprite_fs(int(origin.X*65536) + (MENU_MARGIN_CENTER<<16), int(origin.Y*65536) + (19<<16), MF_Redfont.cursorScale, 0,MENUBAR,16,0,10);
|
||||||
rotatesprite_fs(int(origin.X*65536) + (MENU_MARGIN_CENTER<<16), int(origin.Y*65536) + (19<<16), MF_Redfont.cursorScale, 0,MENUBAR,16,0,10);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Menu_DrawTopBarCaption(const char *caption, const DVector2 &origin)
|
static void Menu_DrawTopBarCaption(const char *caption, const DVector2 &origin)
|
||||||
|
@ -163,7 +163,7 @@ static void Menu_DrawTopBarCaption(const char *caption, const DVector2 &origin)
|
||||||
static void Menu_GetFmt(const MenuFont_t* font, uint8_t const status, int32_t* s, int32_t* z)
|
static void Menu_GetFmt(const MenuFont_t* font, uint8_t const status, int32_t* s, int32_t* z)
|
||||||
{
|
{
|
||||||
if (status & MT_Selected)
|
if (status & MT_Selected)
|
||||||
*s = VM_OnEventWithReturn(EVENT_MENUSHADESELECTED, -1, myconnectindex, sintable[((int32_t)totalclock << 5) & 2047] >> 12);
|
*s = sintable[((int32_t)totalclock << 5) & 2047] >> 12;
|
||||||
else
|
else
|
||||||
*s = font->shade_deselected;
|
*s = font->shade_deselected;
|
||||||
// sum shade values
|
// sum shade values
|
||||||
|
@ -335,7 +335,7 @@ class MainMenu : public RedneckListMenu
|
||||||
void PreDraw() override
|
void PreDraw() override
|
||||||
{
|
{
|
||||||
RedneckListMenu::PreDraw();
|
RedneckListMenu::PreDraw();
|
||||||
rotatesprite_fs(origin.x + ((MENU_MARGIN_CENTER-5)<<16), origin.y + ((57+l)<<16), 16592L,0,RRRA? THREEDEE : INGAMEDUKETHREEDEE,0,0,10);
|
rotatesprite_fs(int((origin.X + MENU_MARGIN_CENTER-5) * 65536), int((origin.Y + 57) * 65536), 16592L,0,RRRA? THREEDEE : INGAMEDUKETHREEDEE,0,0,10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ void GameInterface::StartGame(FGameStartup& gs)
|
||||||
}
|
}
|
||||||
|
|
||||||
ud.m_player_skill = gs.Skill + 1;
|
ud.m_player_skill = gs.Skill + 1;
|
||||||
ud.skill_voice = S_PlaySound(skillsound);
|
g_skillSoundVoice = S_PlaySound(skillsound);
|
||||||
ud.m_respawn_monsters = (gs.Skill == 3);
|
ud.m_respawn_monsters = (gs.Skill == 3);
|
||||||
ud.m_monsters_off = ud.monsters_off = 0;
|
ud.m_monsters_off = ud.monsters_off = 0;
|
||||||
ud.m_respawn_items = 0;
|
ud.m_respawn_items = 0;
|
||||||
|
@ -443,9 +443,9 @@ FSavegameInfo GameInterface::GetSaveSig()
|
||||||
void GameInterface::DrawCenteredTextScreen(const DVector2 &origin, const char *text, int position)
|
void GameInterface::DrawCenteredTextScreen(const DVector2 &origin, const char *text, int position)
|
||||||
{
|
{
|
||||||
Menu_DrawBackground(origin);
|
Menu_DrawBackground(origin);
|
||||||
G_ScreenText(MF_Bluefont.tilenum, int(origin.X + 160) * 65536), int((origin.Y + position) * 65536), MF_Bluefont.zoom, 0, 0, text, 0, MF_Bluefont.pal,
|
G_ScreenText(MF_Bluefont.tilenum, int((origin.X + 160) * 65536), int((origin.Y + position) * 65536), MF_Bluefont.zoom, 0, 0, text, 0, MF_Bluefont.pal,
|
||||||
2 | 8 | 16 | ROTATESPRITE_FULL16, 0, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y,
|
2 | 8 | 16 | ROTATESPRITE_FULL16, 0, MF_Bluefont.emptychar.x, MF_Bluefont.emptychar.y, MF_Bluefont.between.x, MF_Bluefont.between.y,
|
||||||
MF_Bluefont.textflags | f | TEXT_XCENTER, 0, 0, xdim - 1, ydim - 1);
|
MF_Bluefont.textflags | TEXT_XCENTER, 0, 0, xdim - 1, ydim - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -55,12 +55,12 @@ static int32_t demorec_seeds=1, demo_hasseeds;
|
||||||
|
|
||||||
static void Demo_RestoreModes(int32_t menu)
|
static void Demo_RestoreModes(int32_t menu)
|
||||||
{
|
{
|
||||||
if (menu)
|
if (menu)
|
||||||
Menu_Open(myconnectindex);
|
M_StartControlPanel(false);
|
||||||
else
|
else
|
||||||
Menu_Close(myconnectindex);
|
M_ClearMenus();
|
||||||
|
|
||||||
g_player[myconnectindex].ps->gm &= ~MODE_GAME;
|
g_player[myconnectindex].ps->gm &= ~MODE_GAME;
|
||||||
g_player[myconnectindex].ps->gm |= MODE_DEMO;
|
g_player[myconnectindex].ps->gm |= MODE_DEMO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -489,7 +489,7 @@ RECHECK:
|
||||||
fadepal(0,0,0, 0,252,28);
|
fadepal(0,0,0, 0,252,28);
|
||||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
|
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
|
||||||
G_DrawBackground();
|
G_DrawBackground();
|
||||||
M_DisplayMenus();
|
//M_DisplayMenus();
|
||||||
videoNextPage();
|
videoNextPage();
|
||||||
fadepal(0,0,0, 252,0,-28);
|
fadepal(0,0,0, 252,0,-28);
|
||||||
ud.reccnt = 0;
|
ud.reccnt = 0;
|
||||||
|
@ -523,8 +523,8 @@ RECHECK:
|
||||||
{
|
{
|
||||||
FX_StopAllSounds();
|
FX_StopAllSounds();
|
||||||
S_ClearSoundLocks();
|
S_ClearSoundLocks();
|
||||||
Menu_Open(myconnectindex);
|
M_StartControlPanel(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ready2send = 0;
|
ready2send = 0;
|
||||||
bigi = 0;
|
bigi = 0;
|
||||||
|
@ -664,7 +664,7 @@ RECHECK:
|
||||||
corrupt:
|
corrupt:
|
||||||
OSD_Printf(OSD_ERROR "Demo %d is corrupt (code %d).\n", g_whichDemo-1, corruptcode);
|
OSD_Printf(OSD_ERROR "Demo %d is corrupt (code %d).\n", g_whichDemo-1, corruptcode);
|
||||||
nextdemo:
|
nextdemo:
|
||||||
Menu_Open(myconnectindex);
|
M_StartControlPanel(false);
|
||||||
nextdemo_nomenu:
|
nextdemo_nomenu:
|
||||||
foundemo = 0;
|
foundemo = 0;
|
||||||
ud.reccnt = 0;
|
ud.reccnt = 0;
|
||||||
|
@ -862,16 +862,6 @@ nextdemo_nomenu:
|
||||||
goto RECHECK;
|
goto RECHECK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (I_EscapeTrigger() && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0 && (g_player[myconnectindex].ps->gm&MODE_TYPE) == 0)
|
|
||||||
{
|
|
||||||
I_EscapeTriggerClear();
|
|
||||||
FX_StopAllSounds();
|
|
||||||
S_ClearSoundLocks();
|
|
||||||
Menu_Open(myconnectindex);
|
|
||||||
Menu_Change(MENU_MAIN);
|
|
||||||
S_MenuSound();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Demo_IsProfiling())
|
if (Demo_IsProfiling())
|
||||||
{
|
{
|
||||||
// Do nothing: sampletimer() is reached from M_DisplayMenus() ->
|
// Do nothing: sampletimer() is reached from M_DisplayMenus() ->
|
||||||
|
@ -884,15 +874,15 @@ nextdemo_nomenu:
|
||||||
if ((g_player[myconnectindex].ps->gm&MODE_TYPE) != MODE_TYPE)
|
if ((g_player[myconnectindex].ps->gm&MODE_TYPE) != MODE_TYPE)
|
||||||
{
|
{
|
||||||
g_player[myconnectindex].ps->gm = 0;
|
g_player[myconnectindex].ps->gm = 0;
|
||||||
Menu_Open(myconnectindex);
|
M_StartControlPanel(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ud.recstat != 2)
|
//if (ud.recstat != 2)
|
||||||
M_DisplayMenus();
|
//M_DisplayMenus();
|
||||||
|
|
||||||
if ((g_netServer || ud.multimode > 1) && !Menu_IsTextInput(m_currentMenu))
|
if ((g_netServer || ud.multimode > 1))// && !Menu_IsTextInput(m_currentMenu))
|
||||||
{
|
{
|
||||||
ControlInfo noshareinfo;
|
ControlInfo noshareinfo;
|
||||||
CONTROL_GetInput(&noshareinfo);
|
CONTROL_GetInput(&noshareinfo);
|
||||||
|
|
|
@ -158,7 +158,14 @@ struct GameInterface : ::GameInterface
|
||||||
bool mouseInactiveConditional(bool condition) override;
|
bool mouseInactiveConditional(bool condition) override;
|
||||||
FString statFPS() override;
|
FString statFPS() override;
|
||||||
GameStats getStats() override;
|
GameStats getStats() override;
|
||||||
|
void DrawNativeMenuText(int fontnum, int state, int xpos, int ypos, float fontscale, const char* text, int flags);
|
||||||
|
void MenuOpened() override;
|
||||||
|
void MenuSound(::GameInterface::EMenuSounds snd) override;
|
||||||
|
void MenuClosed() override;
|
||||||
|
bool CanSave() override;
|
||||||
|
void StartGame(FGameStartup& gs) override;
|
||||||
FSavegameInfo GetSaveSig() override;
|
FSavegameInfo GetSaveSig() override;
|
||||||
|
void DrawCenteredTextScreen(const DVector2& origin, const char* text, int position) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
END_RR_NS
|
END_RR_NS
|
||||||
|
|
|
@ -46,6 +46,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "m_argv.h"
|
#include "m_argv.h"
|
||||||
#include "filesystem/filesystem.h"
|
#include "filesystem/filesystem.h"
|
||||||
#include "statistics.h"
|
#include "statistics.h"
|
||||||
|
#include "c_dispatch.h"
|
||||||
|
|
||||||
// Uncomment to prevent anything except mirrors from drawing. It is sensible to
|
// Uncomment to prevent anything except mirrors from drawing. It is sensible to
|
||||||
// also uncomment ENGINE_CLEAR_SCREEN in build/src/engine_priv.h.
|
// also uncomment ENGINE_CLEAR_SCREEN in build/src/engine_priv.h.
|
||||||
|
@ -6230,82 +6231,6 @@ void G_HandleLocalKeys(void)
|
||||||
typebuf[0] = 0;
|
typebuf[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputState.UnboundKeyPressed(sc_F1)/* || (ud.show_help && I_AdvanceTrigger())*/)
|
|
||||||
{
|
|
||||||
inputState.ClearKeyStatus(sc_F1);
|
|
||||||
|
|
||||||
Menu_Change(MENU_STORY);
|
|
||||||
S_PauseSounds(true);
|
|
||||||
Menu_Open(myconnectindex);
|
|
||||||
|
|
||||||
if ((!g_netServer && ud.multimode < 2))
|
|
||||||
{
|
|
||||||
ready2send = 0;
|
|
||||||
totalclock = ototalclock;
|
|
||||||
screenpeek = myconnectindex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// if((!net_server && ud.multimode < 2))
|
|
||||||
{
|
|
||||||
if (ud.recstat != 2 && (!RRRA || ud.player_skill != 4) && (!RR || RRRA || ud.player_skill != 5) && inputState.UnboundKeyPressed(sc_F2))
|
|
||||||
{
|
|
||||||
inputState.ClearKeyStatus(sc_F2);
|
|
||||||
|
|
||||||
FAKE_F2:
|
|
||||||
if (sprite[g_player[myconnectindex].ps->i].extra <= 0)
|
|
||||||
{
|
|
||||||
P_DoQuote(QUOTE_SAVE_DEAD,g_player[myconnectindex].ps);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Menu_Change(MENU_SAVE);
|
|
||||||
|
|
||||||
S_PauseSounds(true);
|
|
||||||
Menu_Open(myconnectindex);
|
|
||||||
|
|
||||||
if ((!g_netServer && ud.multimode < 2))
|
|
||||||
{
|
|
||||||
ready2send = 0;
|
|
||||||
totalclock = ototalclock;
|
|
||||||
screenpeek = myconnectindex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((!RRRA || ud.player_skill != 4) && (!RR || RRRA || ud.player_skill != 5) && inputState.UnboundKeyPressed(sc_F3))
|
|
||||||
{
|
|
||||||
inputState.ClearKeyStatus(sc_F3);
|
|
||||||
|
|
||||||
FAKE_F3:
|
|
||||||
Menu_Change(MENU_LOAD);
|
|
||||||
S_PauseSounds(true);
|
|
||||||
Menu_Open(myconnectindex);
|
|
||||||
|
|
||||||
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2)
|
|
||||||
{
|
|
||||||
ready2send = 0;
|
|
||||||
totalclock = ototalclock;
|
|
||||||
}
|
|
||||||
|
|
||||||
screenpeek = myconnectindex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inputState.UnboundKeyPressed(sc_F4))
|
|
||||||
{
|
|
||||||
inputState.ClearKeyStatus(sc_F4);
|
|
||||||
|
|
||||||
S_PauseSounds(true);
|
|
||||||
Menu_Open(myconnectindex);
|
|
||||||
|
|
||||||
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2)
|
|
||||||
{
|
|
||||||
ready2send = 0;
|
|
||||||
totalclock = ototalclock;
|
|
||||||
}
|
|
||||||
|
|
||||||
Menu_Change(MENU_SOUND_INGAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((buttonMap.ButtonDown(gamefunc_Quick_Save) || g_doQuickSave == 1) && (!RRRA || ud.player_skill != 4) && (!RR || RRRA || ud.player_skill != 5) && (g_player[myconnectindex].ps->gm&MODE_GAME))
|
if ((buttonMap.ButtonDown(gamefunc_Quick_Save) || g_doQuickSave == 1) && (!RRRA || ud.player_skill != 4) && (!RR || RRRA || ud.player_skill != 5) && (g_player[myconnectindex].ps->gm&MODE_GAME))
|
||||||
{
|
{
|
||||||
|
@ -6313,8 +6238,11 @@ FAKE_F3:
|
||||||
|
|
||||||
g_doQuickSave = 0;
|
g_doQuickSave = 0;
|
||||||
|
|
||||||
if (!g_lastusersave.isValid())
|
if (!g_lastusersave.isValid())
|
||||||
goto FAKE_F2;
|
{
|
||||||
|
C_DoCommand("opensavemenu");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
inputState.keyFlushChars();
|
inputState.keyFlushChars();
|
||||||
|
|
||||||
|
@ -6375,9 +6303,11 @@ FAKE_F3:
|
||||||
|
|
||||||
g_doQuickSave = 0;
|
g_doQuickSave = 0;
|
||||||
|
|
||||||
if (g_quickload == nullptr || !g_quickload->isValid())
|
if (g_quickload == nullptr || !g_quickload->isValid())
|
||||||
goto FAKE_F3;
|
{
|
||||||
else if (g_quickload->isValid())
|
C_DoCommand("openloadmenu");
|
||||||
|
}
|
||||||
|
else if (g_quickload->isValid())
|
||||||
{
|
{
|
||||||
inputState.keyFlushChars();
|
inputState.keyFlushChars();
|
||||||
inputState.ClearKeysDown();
|
inputState.ClearKeysDown();
|
||||||
|
@ -6387,36 +6317,6 @@ FAKE_F3:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputState.UnboundKeyPressed(sc_F10))
|
|
||||||
{
|
|
||||||
inputState.ClearKeyStatus(sc_F10);
|
|
||||||
|
|
||||||
Menu_Change(MENU_QUIT_INGAME);
|
|
||||||
S_PauseSounds(true);
|
|
||||||
Menu_Open(myconnectindex);
|
|
||||||
|
|
||||||
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2)
|
|
||||||
{
|
|
||||||
ready2send = 0;
|
|
||||||
totalclock = ototalclock;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inputState.UnboundKeyPressed(sc_F11))
|
|
||||||
{
|
|
||||||
inputState.ClearKeyStatus(sc_F11);
|
|
||||||
|
|
||||||
Menu_Change(MENU_COLCORR_INGAME);
|
|
||||||
S_PauseSounds(true);
|
|
||||||
Menu_Open(myconnectindex);
|
|
||||||
|
|
||||||
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2)
|
|
||||||
{
|
|
||||||
ready2send = 0;
|
|
||||||
totalclock = ototalclock;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ud.overhead_on != 0)
|
if (ud.overhead_on != 0)
|
||||||
{
|
{
|
||||||
int const timerOffset = ((int) totalclock - nonsharedtimer);
|
int const timerOffset = ((int) totalclock - nonsharedtimer);
|
||||||
|
@ -7381,9 +7281,9 @@ void G_BackToMenu(void)
|
||||||
if (ud.recstat == 1) G_CloseDemoWrite();
|
if (ud.recstat == 1) G_CloseDemoWrite();
|
||||||
ud.warp_on = 0;
|
ud.warp_on = 0;
|
||||||
g_player[myconnectindex].ps->gm = 0;
|
g_player[myconnectindex].ps->gm = 0;
|
||||||
Menu_Open(myconnectindex);
|
M_StartControlPanel(false);
|
||||||
Menu_Change(MENU_MAIN);
|
M_SetMenu(NAME_MainMenu);
|
||||||
inputState.keyFlushChars();
|
inputState.keyFlushChars();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int G_EndOfLevel(void)
|
static int G_EndOfLevel(void)
|
||||||
|
@ -7426,9 +7326,9 @@ static int G_EndOfLevel(void)
|
||||||
if (!VOLUMEALL)
|
if (!VOLUMEALL)
|
||||||
G_DoOrderScreen();
|
G_DoOrderScreen();
|
||||||
g_player[myconnectindex].ps->gm = 0;
|
g_player[myconnectindex].ps->gm = 0;
|
||||||
Menu_Open(myconnectindex);
|
M_StartControlPanel(false);
|
||||||
Menu_Change(MENU_MAIN);
|
M_SetMenu(NAME_MainMenu);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -7719,8 +7619,6 @@ MAIN_LOOP_RESTART:
|
||||||
for (int & q : user_quote_time)
|
for (int & q : user_quote_time)
|
||||||
q = 0;
|
q = 0;
|
||||||
|
|
||||||
Menu_Change(MENU_MAIN);
|
|
||||||
|
|
||||||
//if (g_networkMode != NET_DEDICATED_SERVER)
|
//if (g_networkMode != NET_DEDICATED_SERVER)
|
||||||
{
|
{
|
||||||
G_GetCrosshairColor();
|
G_GetCrosshairColor();
|
||||||
|
|
|
@ -1063,11 +1063,9 @@ static int32_t VM_ResetPlayer(int const playerNum, int32_t vmFlags)
|
||||||
{
|
{
|
||||||
if (g_quickload && g_quickload->isValid() && ud.recstat != 2)
|
if (g_quickload && g_quickload->isValid() && ud.recstat != 2)
|
||||||
{
|
{
|
||||||
Menu_Open(playerNum);
|
M_StartControlPanel(false);
|
||||||
inputState.ClearKeyStatus(sc_Space);
|
M_SetMenu(NAME_ConfirmPlayerReset);
|
||||||
I_AdvanceTriggerClear();
|
}
|
||||||
Menu_Change(MENU_RESETPLAYER);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
g_player[playerNum].ps->gm = MODE_RESTART;
|
g_player[playerNum].ps->gm = MODE_RESTART;
|
||||||
vmFlags |= VM_NOEXECUTE;
|
vmFlags |= VM_NOEXECUTE;
|
||||||
|
|
|
@ -36,13 +36,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
BEGIN_RR_NS
|
BEGIN_RR_NS
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
// common positions
|
// common positions
|
||||||
#define MENU_MARGIN_REGULAR 40
|
#define MENU_MARGIN_REGULAR 40
|
||||||
#define MENU_MARGIN_WIDE 32
|
#define MENU_MARGIN_WIDE 32
|
||||||
#define MENU_MARGIN_CENTER 160
|
#define MENU_MARGIN_CENTER 160
|
||||||
#define MENU_HEIGHT_CENTER 100
|
#define MENU_HEIGHT_CENTER 100
|
||||||
|
|
||||||
int32_t g_skillSoundVoice = -1;
|
|
||||||
|
|
||||||
#define USERMAPENTRYLENGTH 25
|
#define USERMAPENTRYLENGTH 25
|
||||||
|
|
||||||
|
@ -179,19 +180,6 @@ they effectively stand in for curly braces as struct initializers.
|
||||||
// common font types
|
// common font types
|
||||||
// tilenums are set after namesdyn runs
|
// tilenums are set after namesdyn runs
|
||||||
|
|
||||||
// emptychar x,y between x,y zoom cursorLeft cursorCenter cursorScale textflags
|
|
||||||
// tilenum shade_deselected shade_disabled pal pal_selected pal_deselected pal_disabled
|
|
||||||
MenuFont_t MF_Redfont = { { 5<<16, 15<<16 }, { 0, 0 }, 65536, 20<<16, 110<<16, 65536, 65536, 65536, TEXT_BIGALPHANUM | TEXT_UPPERCASE,
|
|
||||||
-1, 10, 0, 0, 0, 0, 1,
|
|
||||||
0, 0, 1 };
|
|
||||||
MenuFont_t MF_Bluefont = { { 5<<16, 7<<16 }, { 0, 0 }, 65536, 10<<16, 110<<16, 32768, 65536, 65536, 0,
|
|
||||||
-1, 10, 0, 0, 10, 10, 16,
|
|
||||||
0, 0, 16 };
|
|
||||||
MenuFont_t MF_Minifont = { { 4<<16, 5<<16 }, { 1<<16, 1<<16 }, 65536, 10<<16, 110<<16, 32768, 65536, 65536, 0,
|
|
||||||
-1, 10, 0, 0, 2, 2, 0,
|
|
||||||
0, 0, 16 };
|
|
||||||
|
|
||||||
|
|
||||||
static MenuMenuFormat_t MMF_Top_Main = { { MENU_MARGIN_CENTER<<16, 55<<16, }, -(170<<16) };
|
static MenuMenuFormat_t MMF_Top_Main = { { MENU_MARGIN_CENTER<<16, 55<<16, }, -(170<<16) };
|
||||||
static MenuMenuFormat_t MMF_Top_Episode = { { MENU_MARGIN_CENTER<<16, 48<<16, }, -(190<<16) };
|
static MenuMenuFormat_t MMF_Top_Episode = { { MENU_MARGIN_CENTER<<16, 48<<16, }, -(190<<16) };
|
||||||
static MenuMenuFormat_t MMF_Top_Skill = { { MENU_MARGIN_CENTER<<16, 58<<16, }, -(190<<16) };
|
static MenuMenuFormat_t MMF_Top_Skill = { { MENU_MARGIN_CENTER<<16, 58<<16, }, -(190<<16) };
|
||||||
|
@ -7445,14 +7433,6 @@ void M_DisplayMenus(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameInterface::mouseInactiveConditional(bool condition)
|
#endif
|
||||||
{
|
|
||||||
return MOUSEINACTIVECONDITIONAL(condition);
|
|
||||||
}
|
|
||||||
|
|
||||||
FSavegameInfo GameInterface::GetSaveSig()
|
|
||||||
{
|
|
||||||
return { SAVESIG_RR, MINSAVEVER_RR, SAVEVER_RR };
|
|
||||||
}
|
|
||||||
|
|
||||||
END_RR_NS
|
END_RR_NS
|
||||||
|
|
|
@ -27,6 +27,31 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
BEGIN_RR_NS
|
BEGIN_RR_NS
|
||||||
|
|
||||||
|
// a subset of screentext parameters, restricted because menus require accessibility
|
||||||
|
typedef struct MenuFont_t
|
||||||
|
{
|
||||||
|
// int32_t xspace, yline;
|
||||||
|
vec2_t emptychar, between;
|
||||||
|
int32_t zoom;
|
||||||
|
int32_t cursorLeftPosition, cursorCenterPosition, cursorScale, cursorScale2, cursorScale3;
|
||||||
|
int32_t textflags;
|
||||||
|
int16_t tilenum;
|
||||||
|
// selected shade glows, deselected shade is used by Blood, disabled shade is used by SW
|
||||||
|
int8_t shade_deselected, shade_disabled;
|
||||||
|
uint8_t pal;
|
||||||
|
uint8_t pal_selected, pal_deselected, pal_disabled;
|
||||||
|
uint8_t pal_selected_right, pal_deselected_right, pal_disabled_right;
|
||||||
|
|
||||||
|
int32_t get_yline() const { return mulscale16(emptychar.y, zoom); }
|
||||||
|
} MenuFont_t;
|
||||||
|
|
||||||
|
extern MenuFont_t MF_Redfont, MF_Bluefont, MF_Minifont;
|
||||||
|
|
||||||
|
void Menu_Init(void);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
|
|
||||||
enum MenuIndex_t {
|
enum MenuIndex_t {
|
||||||
MENU_NULL = INT32_MIN, // sentinel for "do nothing"
|
MENU_NULL = INT32_MIN, // sentinel for "do nothing"
|
||||||
MENU_CLOSE = -2, // sentinel for "close the menu"/"no menu"
|
MENU_CLOSE = -2, // sentinel for "close the menu"/"no menu"
|
||||||
|
@ -141,25 +166,6 @@ typedef enum MenuAnimationType_t
|
||||||
MA_Advance,
|
MA_Advance,
|
||||||
} MenuAnimationType_t;
|
} MenuAnimationType_t;
|
||||||
|
|
||||||
// a subset of screentext parameters, restricted because menus require accessibility
|
|
||||||
typedef struct MenuFont_t
|
|
||||||
{
|
|
||||||
// int32_t xspace, yline;
|
|
||||||
vec2_t emptychar, between;
|
|
||||||
int32_t zoom;
|
|
||||||
int32_t cursorLeftPosition, cursorCenterPosition, cursorScale, cursorScale2, cursorScale3;
|
|
||||||
int32_t textflags;
|
|
||||||
int16_t tilenum;
|
|
||||||
// selected shade glows, deselected shade is used by Blood, disabled shade is used by SW
|
|
||||||
int8_t shade_deselected, shade_disabled;
|
|
||||||
uint8_t pal;
|
|
||||||
uint8_t pal_selected, pal_deselected, pal_disabled;
|
|
||||||
uint8_t pal_selected_right, pal_deselected_right, pal_disabled_right;
|
|
||||||
|
|
||||||
int32_t get_yline() const { return mulscale16(emptychar.y, zoom); }
|
|
||||||
} MenuFont_t;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef enum MenuEntryType_t
|
typedef enum MenuEntryType_t
|
||||||
{
|
{
|
||||||
|
@ -505,6 +511,8 @@ extern int32_t m_mousewake_watchpoint, m_menuchange_watchpoint;
|
||||||
# define MOUSEINACTIVECONDITIONAL(condition) (!MOUSEACTIVECONDITION && (condition))
|
# define MOUSEINACTIVECONDITIONAL(condition) (!MOUSEACTIVECONDITION && (condition))
|
||||||
# define MOUSEWATCHPOINTCONDITIONAL(condition) ((condition) || m_mousewake_watchpoint || m_menuchange_watchpoint == 3)
|
# define MOUSEWATCHPOINTCONDITIONAL(condition) ((condition) || m_mousewake_watchpoint || m_menuchange_watchpoint == 3)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
END_RR_NS
|
END_RR_NS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -36,6 +36,7 @@ static int32_t g_whichPalForPlayer = 9;
|
||||||
|
|
||||||
static uint8_t precachehightile[2][MAXTILES>>3];
|
static uint8_t precachehightile[2][MAXTILES>>3];
|
||||||
static int32_t g_precacheCount;
|
static int32_t g_precacheCount;
|
||||||
|
int32_t g_skillSoundVoice = -1;
|
||||||
|
|
||||||
|
|
||||||
static void flag_precache(int32_t tile, int32_t type)
|
static void flag_precache(int32_t tile, int32_t type)
|
||||||
|
@ -1948,7 +1949,7 @@ end_vol4a:
|
||||||
pPlayer->zoom = 768;
|
pPlayer->zoom = 768;
|
||||||
#endif
|
#endif
|
||||||
pPlayer->gm = 0;
|
pPlayer->gm = 0;
|
||||||
Menu_Close(0);
|
M_ClearMenus();
|
||||||
|
|
||||||
//AddLog("Newgame");
|
//AddLog("Newgame");
|
||||||
|
|
||||||
|
@ -2474,7 +2475,6 @@ int G_EnterLevel(int gameMode)
|
||||||
for (TRAVERSE_CONNECT(i))
|
for (TRAVERSE_CONNECT(i))
|
||||||
{
|
{
|
||||||
g_player[i].ps->gm = MODE_GAME;
|
g_player[i].ps->gm = MODE_GAME;
|
||||||
Menu_Close(i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gameMode & MODE_RESTART)
|
else if (gameMode & MODE_RESTART)
|
||||||
|
|
|
@ -1035,37 +1035,6 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (I_EscapeTrigger() && ud.overhead_on == 0
|
|
||||||
&& ud.show_help == 0
|
|
||||||
&& g_player[myconnectindex].ps->newowner == -1)
|
|
||||||
{
|
|
||||||
if ((g_player[myconnectindex].ps->gm&MODE_MENU) == MODE_MENU && g_currentMenu <= MENU_MAIN_INGAME)
|
|
||||||
{
|
|
||||||
I_EscapeTriggerClear();
|
|
||||||
S_PlaySound(EXITMENUSOUND);
|
|
||||||
Menu_Change(MENU_CLOSE);
|
|
||||||
if (!ud.pause_on)
|
|
||||||
S_PauseSounds(false);
|
|
||||||
}
|
|
||||||
else if ((g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU &&
|
|
||||||
g_player[myconnectindex].ps->newowner == -1 &&
|
|
||||||
(g_player[myconnectindex].ps->gm&MODE_TYPE) != MODE_TYPE)
|
|
||||||
{
|
|
||||||
I_EscapeTriggerClear();
|
|
||||||
S_PauseSounds(true);
|
|
||||||
|
|
||||||
Menu_Open(myconnectindex);
|
|
||||||
|
|
||||||
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2) ready2send = 0;
|
|
||||||
|
|
||||||
if (g_player[myconnectindex].ps->gm&MODE_GAME) Menu_Change(MENU_MAIN_INGAME);
|
|
||||||
else Menu_Change(MENU_MAIN);
|
|
||||||
screenpeek = myconnectindex;
|
|
||||||
|
|
||||||
S_MenuSound();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && cl_crosshair && ud.camerasprite == -1)
|
if (g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && cl_crosshair && ud.camerasprite == -1)
|
||||||
{
|
{
|
||||||
int32_t a = CROSSHAIR;
|
int32_t a = CROSSHAIR;
|
||||||
|
@ -1171,8 +1140,8 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
{
|
{
|
||||||
if (g_player[myconnectindex].ps->gm&MODE_TYPE)
|
if (g_player[myconnectindex].ps->gm&MODE_TYPE)
|
||||||
Net_SendMessage();
|
Net_SendMessage();
|
||||||
else
|
//else
|
||||||
M_DisplayMenus();
|
//M_DisplayMenus();
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -738,9 +738,6 @@ void S_Callback(intptr_t num)
|
||||||
dnum++;
|
dnum++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void S_ClearSoundLocks(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool A_CheckSoundPlaying(int spriteNum, int soundNum)
|
bool A_CheckSoundPlaying(int spriteNum, int soundNum)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue