mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-18 23:21:43 +00:00
- removed quitevent.
This was some meticulously preserved relic of bad old DOS times used to block OS facilities to close an app. Since this has been worked around at a lower level already the variable was essentially without function but some quite bad code depended on it.
This commit is contained in:
parent
d8c74a8b00
commit
8a98f9b3ca
12 changed files with 17 additions and 73 deletions
|
@ -1291,11 +1291,7 @@ RESTART:
|
|||
ready2send = 1;
|
||||
while (!gQuitGame)
|
||||
{
|
||||
if (handleevents() && quitevent)
|
||||
{
|
||||
inputState.SetKeyStatus(sc_Escape, 1);
|
||||
quitevent = 0;
|
||||
}
|
||||
handleevents();
|
||||
netUpdate();
|
||||
MUSIC_Update();
|
||||
inputState.SetBindsEnabled(gInputMode == kInputGame);
|
||||
|
|
|
@ -49,6 +49,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "i_specialpaths.h"
|
||||
#include "view.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "menu/menu.h"
|
||||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
|
@ -293,14 +294,7 @@ void CDemo::ProcessKeys(void)
|
|||
{
|
||||
switch (nKey)
|
||||
{
|
||||
case 1:
|
||||
if (!CGameMenuMgr::m_bActive)
|
||||
{
|
||||
gGameMenuMgr.Push(&menuMain, -1);
|
||||
at2 = 1;
|
||||
}
|
||||
break;
|
||||
case 0x58:
|
||||
case sc_F12:
|
||||
gViewIndex = connectpoint2[gViewIndex];
|
||||
if (gViewIndex == -1)
|
||||
gViewIndex = connecthead;
|
||||
|
@ -321,21 +315,12 @@ void CDemo::Playback(void)
|
|||
inputState.SetBindsEnabled(false);
|
||||
ready2send = 0;
|
||||
int v4 = 0;
|
||||
if (!CGameMenuMgr::m_bActive)
|
||||
{
|
||||
gGameMenuMgr.Push(&menuMain, -1);
|
||||
at2 = 1;
|
||||
}
|
||||
gNetFifoClock = totalclock;
|
||||
gViewMode = 3;
|
||||
_DEMOPLAYBACK:
|
||||
while (at1 && !gQuitGame)
|
||||
{
|
||||
if (handleevents() && quitevent)
|
||||
{
|
||||
inputState.SetKeyStatus(sc_Escape, 1);
|
||||
quitevent = 0;
|
||||
}
|
||||
handleevents();
|
||||
MUSIC_Update();
|
||||
while (totalclock >= gNetFifoClock && !gQuitGame)
|
||||
{
|
||||
|
@ -407,8 +392,6 @@ _DEMOPLAYBACK:
|
|||
if (G_FPSLimit())
|
||||
{
|
||||
viewDrawScreen();
|
||||
if (gInputMode == kInputMenu && CGameMenuMgr::m_bActive)
|
||||
gGameMenuMgr.Draw();
|
||||
videoNextPage();
|
||||
}
|
||||
if (TestBitString(gotpic, 2342))
|
||||
|
|
|
@ -542,7 +542,7 @@ void netGetPackets(void)
|
|||
gStartNewGame = 1;
|
||||
break;
|
||||
case 255:
|
||||
inputState.SetKeyStatus(sc_Escape, 1);
|
||||
inputState.SetKeyStatus(sc_Escape);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1007,11 +1007,13 @@ void netInitialize(bool bConsole)
|
|||
while (numplayers < gNetPlayers)
|
||||
{
|
||||
handleevents();
|
||||
#if 0
|
||||
if (quitevent)
|
||||
{
|
||||
netServerDisconnect();
|
||||
QuitGame();
|
||||
}
|
||||
#endif
|
||||
if (!bConsole && inputState.GetKeyStatus(sc_Escape))
|
||||
{
|
||||
netServerDisconnect();
|
||||
|
@ -1168,11 +1170,13 @@ void netInitialize(bool bConsole)
|
|||
while (bWaitServer)
|
||||
{
|
||||
handleevents();
|
||||
#if 0
|
||||
if (quitevent)
|
||||
{
|
||||
netClientDisconnect();
|
||||
QuitGame();
|
||||
}
|
||||
#endif
|
||||
if (!bConsole && inputState.GetKeyStatus(sc_Escape))
|
||||
{
|
||||
netClientDisconnect();
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
extern int32_t g_maskDrawMode;
|
||||
#endif
|
||||
|
||||
extern char quitevent, appactive;
|
||||
extern char appactive;
|
||||
extern char modechange;
|
||||
extern char nogl;
|
||||
|
||||
|
|
|
@ -306,7 +306,6 @@ static int32_t defsparser(scriptfile *script)
|
|||
}
|
||||
#endif
|
||||
handleevents();
|
||||
if (quitevent) return 0;
|
||||
tokn = getatoken(script,basetokens,ARRAY_SIZE(basetokens));
|
||||
cmdtokptr = script->ltextptr;
|
||||
switch (tokn)
|
||||
|
|
|
@ -100,7 +100,7 @@ unsigned char syncstate;
|
|||
int32_t inputchecked = 0;
|
||||
bool screenshot_requested;
|
||||
|
||||
char quitevent=0, appactive=1, novideo=0;
|
||||
char appactive=1, novideo=0;
|
||||
|
||||
// video
|
||||
static SDL_Surface *sdl_surface/*=NULL*/;
|
||||
|
|
|
@ -5720,12 +5720,6 @@ static void G_Startup(void)
|
|||
for (i=0; i<MAXPLAYERS; i++)
|
||||
g_player[i].pingcnt = 0;
|
||||
|
||||
if (quitevent)
|
||||
{
|
||||
G_Shutdown();
|
||||
return;
|
||||
}
|
||||
|
||||
Net_GetPackets();
|
||||
|
||||
if (numplayers > 1)
|
||||
|
@ -6031,8 +6025,6 @@ int GameInterface::app_main()
|
|||
|
||||
system_getcvars();
|
||||
|
||||
if (quitevent) return 4;
|
||||
|
||||
if (g_networkMode != NET_DEDICATED_SERVER && validmodecnt > 0)
|
||||
{
|
||||
if (videoSetGameMode(ScreenMode, ScreenWidth, ScreenHeight, ScreenBPP, 1) < 0)
|
||||
|
@ -6195,11 +6187,7 @@ MAIN_LOOP_RESTART:
|
|||
|
||||
do //main loop
|
||||
{
|
||||
if (gameHandleEvents() && quitevent)
|
||||
{
|
||||
inputState.SetKeyStatus(sc_Escape, 1);
|
||||
quitevent = 0;
|
||||
}
|
||||
gameHandleEvents();
|
||||
|
||||
// only allow binds to function if the player is actually in a game (not in a menu, typing, et cetera) or demo
|
||||
inputState.SetBindsEnabled(!!(myplayer.gm & (MODE_GAME|MODE_DEMO)));
|
||||
|
|
|
@ -432,7 +432,6 @@ static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
|
|||
|
||||
case WM_CLOSE:
|
||||
if (mode == TAB_CONFIG) done = 0;
|
||||
else quitevent++;
|
||||
return TRUE;
|
||||
|
||||
case WM_DESTROY:
|
||||
|
@ -456,7 +455,6 @@ static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
|
|||
{
|
||||
case WIN_STARTWIN_CANCEL:
|
||||
if (mode == TAB_CONFIG) done = 0;
|
||||
else quitevent++;
|
||||
return TRUE;
|
||||
case WIN_STARTWIN_START:
|
||||
done = 1;
|
||||
|
|
|
@ -7157,12 +7157,6 @@ static void G_Startup(void)
|
|||
for (i=0; i<MAXPLAYERS; i++)
|
||||
g_player[i].playerreadyflag = 0;
|
||||
|
||||
if (quitevent)
|
||||
{
|
||||
G_Shutdown();
|
||||
return;
|
||||
}
|
||||
|
||||
Net_GetPackets();
|
||||
|
||||
if (numplayers > 1)
|
||||
|
@ -7416,8 +7410,6 @@ int GameInterface::app_main()
|
|||
i = 1-i;
|
||||
}
|
||||
|
||||
if (quitevent) return 4;
|
||||
|
||||
Anim_Init();
|
||||
|
||||
const char *defsfile = G_DefFile();
|
||||
|
@ -7628,11 +7620,7 @@ MAIN_LOOP_RESTART:
|
|||
|
||||
do //main loop
|
||||
{
|
||||
if (handleevents() && quitevent)
|
||||
{
|
||||
inputState.SetKeyStatus(sc_Escape, 1);
|
||||
quitevent = 0;
|
||||
}
|
||||
handleevents();
|
||||
|
||||
Net_GetPackets();
|
||||
|
||||
|
|
|
@ -320,12 +320,12 @@ playanm(short anim_num)
|
|||
switch (ANIMnum)
|
||||
{
|
||||
case ANIM_INTRO:
|
||||
if (I_GeneralTrigger() || quitevent)
|
||||
if (I_GeneralTrigger())
|
||||
I_GeneralTriggerClear();
|
||||
goto ENDOFANIMLOOP;
|
||||
break;
|
||||
case ANIM_SERP:
|
||||
if (I_EscapeTrigger() || quitevent)
|
||||
if (I_EscapeTrigger())
|
||||
I_EscapeTriggerClear();
|
||||
goto ENDOFANIMLOOP;
|
||||
break;
|
||||
|
|
|
@ -842,11 +842,6 @@ void InitGame()
|
|||
while (initmultiplayerscycle())
|
||||
{
|
||||
handleevents();
|
||||
if (quitevent)
|
||||
{
|
||||
QuitFlag = TRUE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@ -1650,7 +1645,6 @@ void LogoLevel(void)
|
|||
while (TRUE)
|
||||
{
|
||||
handleevents();
|
||||
if (quitevent) { QuitFlag = TRUE; break; }
|
||||
|
||||
// taken from top of faketimerhandler
|
||||
// limits checks to max of 40 times a second
|
||||
|
@ -1778,7 +1772,7 @@ void SybexScreen(void)
|
|||
videoNextPage();
|
||||
|
||||
ResetKeys();
|
||||
while (!KeyPressed() && !quitevent) handleevents();
|
||||
while (!KeyPressed()) handleevents();
|
||||
}
|
||||
|
||||
// CTW REMOVED END
|
||||
|
@ -1961,8 +1955,6 @@ void MenuLevel(void)
|
|||
handleevents();
|
||||
OSD_DispatchQueued();
|
||||
|
||||
if (quitevent) QuitFlag = TRUE;
|
||||
|
||||
// taken from top of faketimerhandler
|
||||
// limits checks to max of 40 times a second
|
||||
if (totalclock >= ototalclock + synctics)
|
||||
|
@ -2645,8 +2637,6 @@ void Control()
|
|||
handleevents();
|
||||
OSD_DispatchQueued();
|
||||
|
||||
if (quitevent) QuitFlag = TRUE;
|
||||
|
||||
NewLevel();
|
||||
}
|
||||
|
||||
|
@ -2903,8 +2893,6 @@ void RunLevel(void)
|
|||
D_ProcessEvents();
|
||||
faketimerhandler();
|
||||
|
||||
if (quitevent) QuitFlag = TRUE;
|
||||
|
||||
MoveLoop();
|
||||
|
||||
|
||||
|
|
|
@ -631,7 +631,7 @@ waitforeverybody(void)
|
|||
handleevents();
|
||||
getpackets();
|
||||
|
||||
if (quitevent || (wfe_ExitCallback && wfe_ExitCallback()))
|
||||
if (wfe_ExitCallback && wfe_ExitCallback()))
|
||||
{
|
||||
// allow exit
|
||||
//if (inputState.GetKeyStatus(KEYSC_ESC))
|
||||
|
|
Loading…
Reference in a new issue