- fixed errors in SW merge.

This commit is contained in:
Christoph Oelckers 2019-11-30 10:07:25 +01:00
parent d5c3991c2e
commit 9cb6c65223
2 changed files with 10 additions and 11 deletions

View file

@ -94,6 +94,7 @@ Things required to make savegames work:
#include "gameconfigfile.h" #include "gameconfigfile.h"
#include "printf.h" #include "printf.h"
#include "m_argv.h" #include "m_argv.h"
#include "debugbreak.h"
//#include "crc32.h" //#include "crc32.h"
@ -3355,7 +3356,7 @@ SWBOOL DoQuickSave(short save_num)
SWBOOL DoQuickLoad() SWBOOL DoQuickLoad()
{ {
KB_ClearKeysDown(); inputState.ClearKeysDown();
PauseAction(); PauseAction();
@ -3474,16 +3475,14 @@ FunctionKeys(PLAYERp pp)
inputState.ClearKeyStatus(KEYSC_F6); inputState.ClearKeyStatus(KEYSC_F6);
if (!TEST(pp->Flags, PF_DEAD)) if (!TEST(pp->Flags, PF_DEAD))
{ {
inputState.SetKeyStatus(sc_Escape);
if (QuickLoadNum < 0) if (QuickLoadNum < 0)
{ {
KEY_PRESSED(KEYSC_ESC) = 1; inputState.SetKeyStatus(sc_Escape);
ControlPanelType = ct_savemenu; ControlPanelType = ct_savemenu;
} }
else else
{ {
KB_ClearKeysDown(); inputState.ClearAllInput();
KB_FlushKeyboardQueue();
DoQuickSave(QuickLoadNum); DoQuickSave(QuickLoadNum);
ResumeAction(); ResumeAction();
} }
@ -3499,7 +3498,7 @@ FunctionKeys(PLAYERp pp)
{ {
if (QuickLoadNum < 0) if (QuickLoadNum < 0)
{ {
KEY_PRESSED(KEYSC_ESC) = 1; inputState.SetKeyStatus(sc_Escape);
ControlPanelType = ct_loadmenu; ControlPanelType = ct_loadmenu;
} }
else else
@ -4296,9 +4295,9 @@ void getinput(SW_PACKET *loc)
SET(loc->bits, prev_weapon + 1); SET(loc->bits, prev_weapon + 1);
} }
if (buttonMap.ButtonDown(gamefunc_Alt_Weapon_Mode)) if (buttonMap.ButtonDown(gamefunc_Alt_Weapon))
{ {
buttonMap.ClearButton(gamefunc_Alt_Weapon_Mode); buttonMap.ClearButton(gamefunc_Alt_Weapon);
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
short const which_weapon = u->WeaponNum + 1; short const which_weapon = u->WeaponNum + 1;
SET(loc->bits, which_weapon); SET(loc->bits, which_weapon);

View file

@ -882,7 +882,7 @@ static int MNU_SelectButtonFunction(const char *buttonname, int *currentfunc)
else if (I_MenuDown()) else if (I_MenuDown())
{ {
I_MenuDownClear(); I_MenuDownClear();
*currentfunc = min(NUMGAMEFUNCTIONS, *currentfunc + 1); *currentfunc = std::min<int>(NUMGAMEFUNCTIONS, *currentfunc + 1);
} }