mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- hooked up the input system and did a major cleanup.
Much of the old system is no longer needed with all buttons being handled as keys. Mouse axis movement is not working yet.
This commit is contained in:
parent
141887263d
commit
a870df840e
44 changed files with 205 additions and 467 deletions
|
@ -811,8 +811,6 @@ void LocalKeys(void)
|
|||
gPlayerMsg.Set(*CombatMacros[fk]);
|
||||
gPlayerMsg.Send();
|
||||
}
|
||||
inputState.keyFlushScans();
|
||||
inputState.ClearKeyStatus(key);
|
||||
buttonMap.ClearButton(gamefunc_See_Chase_View);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -38,24 +38,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
int32_t ctrlCheckAllInput(void)
|
||||
{
|
||||
return (
|
||||
inputState.keyBufferWaiting() ||
|
||||
inputState.MouseGetButtons()
|
||||
//JOYSTICK_GetButtons()
|
||||
);
|
||||
}
|
||||
|
||||
void ctrlClearAllInput(void)
|
||||
{
|
||||
inputState.keyFlushChars();
|
||||
inputState.ClearKeysDown();
|
||||
inputState.MouseClearAllButtonss();
|
||||
//JOYSTICK_ClearAllButtons()
|
||||
;
|
||||
}
|
||||
|
||||
GINPUT gInput;
|
||||
bool bSilentAim = false;
|
||||
|
||||
|
|
|
@ -106,8 +106,6 @@ struct GINPUT
|
|||
extern GINPUT gInput;
|
||||
extern bool bSilentAim;
|
||||
|
||||
int32_t ctrlCheckAllInput(void);
|
||||
void ctrlClearAllInput(void);
|
||||
void ctrlInit();
|
||||
void ctrlGetInput();
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ char Wait(int nTicks)
|
|||
while (totalclock < nTicks)
|
||||
{
|
||||
gameHandleEvents();
|
||||
char key = inputState.keyGetScan();
|
||||
auto key = inputState.keyGetScan();
|
||||
if (key)
|
||||
{
|
||||
if (key == sc_Escape) // sc_Escape
|
||||
|
@ -253,7 +253,7 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav)
|
|||
gameHandleEvents();
|
||||
ClockTicks nStartTime = totalclock;
|
||||
|
||||
ctrlClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
int nFrame = 0;
|
||||
do
|
||||
|
@ -262,7 +262,7 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav)
|
|||
if (scale((int)(totalclock-nStartTime), nFrameRate, kTicRate) < nFrame)
|
||||
continue;
|
||||
|
||||
if (ctrlCheckAllInput())
|
||||
if (inputState.CheckAllInput())
|
||||
break;
|
||||
|
||||
videoClearScreen(0);
|
||||
|
@ -275,13 +275,12 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav)
|
|||
|
||||
videoNextPage();
|
||||
|
||||
ctrlClearAllInput();
|
||||
nFrame++;
|
||||
Smacker_GetNextFrame(hSMK);
|
||||
} while(nFrame < nFrames);
|
||||
|
||||
Smacker_Close(hSMK);
|
||||
ctrlClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
soundEngine->StopAllChannels();
|
||||
videoSetPalette(0, 0, 8+2);
|
||||
tileDelete(kSMKTile);
|
||||
|
|
|
@ -29,10 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
#define BGSTRETCH (hud_bgstretch ? 1024 : 0)
|
||||
|
||||
#define WIN_IS_PRESSED ( inputState.GetKeyStatus( sc_RightWin ) || inputState.GetKeyStatus( sc_LeftWin ) )
|
||||
#define ALT_IS_PRESSED ( inputState.GetKeyStatus( sc_RightAlt ) || inputState.GetKeyStatus( sc_LeftAlt ) )
|
||||
#define SHIFTS_IS_PRESSED ( inputState.GetKeyStatus( sc_RightShift ) || inputState.GetKeyStatus( sc_LeftShift ) )
|
||||
|
||||
#define TRAVERSE_SPRITE_SECT(l, o, n) (o) = (l); ((o) != -1) && ((n) = nextspritesect[o]); (o) = (n)
|
||||
#define TRAVERSE_SPRITE_STAT(l, o, n) (o) = (l); ((o) != -1) && ((n) = nextspritestat[o]); (o) = (n)
|
||||
#define TRAVERSE_CONNECT(i) i = 0; i != -1; i = connectpoint2[i]
|
||||
|
|
|
@ -90,23 +90,16 @@ extern int32_t qsetmode;
|
|||
|
||||
extern int32_t g_logFlushWindow;
|
||||
|
||||
void I_GetEvent();
|
||||
void I_StartTic();
|
||||
|
||||
inline int32_t handleevents(void)
|
||||
{
|
||||
timerUpdateClock();
|
||||
I_GetEvent();
|
||||
I_StartTic();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t handleevents_peekkeys(void);
|
||||
|
||||
int32_t initinput(void);
|
||||
void uninitinput(void);
|
||||
|
||||
void mouseGrabInput(bool grab);
|
||||
void mouseLockToWindow(bool a);
|
||||
void mouseMoveToCenter(void);
|
||||
|
||||
extern int32_t inputchecked;
|
||||
|
||||
|
@ -115,7 +108,6 @@ void getScreen(uint8_t* imgBuf);
|
|||
|
||||
int32_t wm_msgbox(const char *name, const char *fmt, ...) ATTRIBUTE((format(printf,2,3)));
|
||||
int32_t wm_ynbox(const char *name, const char *fmt, ...) ATTRIBUTE((format(printf,2,3)));
|
||||
void wm_setapptitle(const char *name);
|
||||
|
||||
#include "print.h"
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ bool FGrpFile::Open(bool quiet)
|
|||
fileinfo[i].NameWithZero[12] = '\0'; // Be sure filename is null-terminated
|
||||
Lumps[i].LumpNameSetup(fileinfo[i].NameWithZero);
|
||||
}
|
||||
//if (!quiet) Printf(", %d lumps\n", NumLumps);
|
||||
if (!quiet) Printf(", %d lumps\n", NumLumps);
|
||||
delete[] fileinfo;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
*/
|
||||
|
||||
#include "resourcefile.h"
|
||||
#include "printf.h"
|
||||
//#include "w_wad.h"
|
||||
//#include "doomtype.h"
|
||||
|
||||
|
@ -103,7 +104,7 @@ bool FPakFile::Open(bool quiet)
|
|||
|
||||
Lumps.Resize(NumLumps);
|
||||
|
||||
//if (!quiet) Printf(", %d lumps\n", NumLumps);
|
||||
if (!quiet) Printf(", %d lumps\n", NumLumps);
|
||||
|
||||
for(uint32_t i = 0; i < NumLumps; i++)
|
||||
{
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
*/
|
||||
#include <algorithm>
|
||||
#include "resourcefile.h"
|
||||
#include "printf.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -144,7 +145,7 @@ bool FRFFFile::Open(bool quiet)
|
|||
|
||||
Lumps.Grow(NumLumps);
|
||||
|
||||
//if (!quiet) Printf(", %d lumps\n", NumLumps);
|
||||
if (!quiet) Printf(", %d lumps\n", NumLumps);
|
||||
for (uint32_t i = 0; i < NumLumps; ++i)
|
||||
{
|
||||
Lumps.Reserve(1);
|
||||
|
|
|
@ -279,6 +279,7 @@ bool FZipFile::Open(bool quiet)
|
|||
// Resize the lump record array to its actual size
|
||||
NumLumps -= skipped;
|
||||
free(directory);
|
||||
if (!quiet) Printf(", %d lumps\n", NumLumps);
|
||||
|
||||
PostProcessArchive(&Lumps[0], sizeof(FZipLump));
|
||||
return true;
|
||||
|
|
|
@ -50,6 +50,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "inputstate.h"
|
||||
#include "v_video.h"
|
||||
#include "st_start.h"
|
||||
#include "s_music.h"
|
||||
#ifndef NETCODE_DISABLE
|
||||
#include "enet.h"
|
||||
#endif
|
||||
|
@ -530,6 +531,7 @@ int RunGame()
|
|||
I_Error("app_main: There was a problem initializing the Build engine: %s\n", engineerrstr);
|
||||
}
|
||||
|
||||
mouseGrabInput(true); // the intros require the mouse to be grabbed.
|
||||
return gi->app_main();
|
||||
}
|
||||
|
||||
|
|
|
@ -32,30 +32,12 @@ bool mouseInactiveConditional(bool condition)
|
|||
return condition;
|
||||
}
|
||||
|
||||
int32_t I_CheckAllInput(void)
|
||||
{
|
||||
return
|
||||
inputState.keyBufferWaiting()
|
||||
|| inputState.MouseGetButtons()
|
||||
//|| JOYSTICK_GetButtons()
|
||||
;
|
||||
}
|
||||
void I_ClearAllInput(void)
|
||||
{
|
||||
inputState.keyFlushChars();
|
||||
inputState.ClearKeysDown();
|
||||
inputState.MouseClearAllButtonss();
|
||||
//JOYSTICK_ClearAllButtons();
|
||||
buttonMap.ResetButtonStates();
|
||||
}
|
||||
|
||||
|
||||
int32_t I_TextSubmit(void)
|
||||
{
|
||||
return
|
||||
inputState.GetKeyStatus(sc_Enter)
|
||||
|| inputState.GetKeyStatus(sc_kpad_Enter)
|
||||
|| mouseInactiveConditional(inputState.MouseGetButtons()&LEFT_MOUSE)
|
||||
|| inputState.GetKeyStatus(KEY_MOUSE1)
|
||||
/*|| (JOYSTICK_GetGameControllerButtons()&(1<<GAMECONTROLLER_BUTTON_A))*/;
|
||||
}
|
||||
|
||||
|
@ -64,7 +46,7 @@ void I_TextSubmitClear(void)
|
|||
inputState.keyFlushChars();
|
||||
inputState.ClearKeyStatus(sc_kpad_Enter);
|
||||
inputState.ClearKeyStatus(sc_Enter);
|
||||
inputState.MouseClearButton(LEFT_MOUSE);
|
||||
inputState.ClearKeyStatus(KEY_MOUSE1);
|
||||
//JOYSTICK_ClearGameControllerButton(1<<GAMECONTROLLER_BUTTON_A);
|
||||
}
|
||||
|
||||
|
@ -85,7 +67,7 @@ int32_t I_ReturnTrigger(void)
|
|||
{
|
||||
return
|
||||
inputState.GetKeyStatus(sc_Escape)
|
||||
|| (inputState.MouseGetButtons()&RIGHT_MOUSE)
|
||||
|| inputState.GetKeyStatus(KEY_MOUSE2)
|
||||
/*|| (JOYSTICK_GetGameControllerButtons()&(1<<GAMECONTROLLER_BUTTON_B))*/;
|
||||
}
|
||||
|
||||
|
@ -93,46 +75,10 @@ void I_ReturnTriggerClear(void)
|
|||
{
|
||||
inputState.keyFlushChars();
|
||||
inputState.ClearKeyStatus(sc_Escape);
|
||||
inputState.MouseClearButton(RIGHT_MOUSE);
|
||||
inputState.ClearKeyStatus(KEY_MOUSE2);
|
||||
//JOYSTICK_ClearGameControllerButton(1<<GAMECONTROLLER_BUTTON_B);
|
||||
}
|
||||
|
||||
int32_t I_GeneralTrigger(void)
|
||||
{
|
||||
return
|
||||
I_AdvanceTrigger()
|
||||
|| I_ReturnTrigger()
|
||||
|| buttonMap.ButtonDown(gamefunc_Open)
|
||||
|| mouseInactiveConditional(buttonMap.ButtonDown(gamefunc_Fire))
|
||||
|| buttonMap.ButtonDown(gamefunc_Crouch)
|
||||
/*|| (JOYSTICK_GetGameControllerButtons()&(1<<GAMECONTROLLER_BUTTON_START))*/;
|
||||
}
|
||||
|
||||
void I_GeneralTriggerClear(void)
|
||||
{
|
||||
I_AdvanceTriggerClear();
|
||||
I_ReturnTriggerClear();
|
||||
buttonMap.ClearButton(gamefunc_Open);
|
||||
buttonMap.ClearButton(gamefunc_Fire);
|
||||
buttonMap.ClearButton(gamefunc_Crouch);
|
||||
//JOYSTICK_ClearGameControllerButton(1<<GAMECONTROLLER_BUTTON_START);
|
||||
}
|
||||
|
||||
|
||||
int32_t I_EscapeTrigger(void)
|
||||
{
|
||||
return
|
||||
inputState.GetKeyStatus(sc_Escape)
|
||||
/*|| (JOYSTICK_GetGameControllerButtons()&(1<<GAMECONTROLLER_BUTTON_START))*/;
|
||||
}
|
||||
|
||||
void I_EscapeTriggerClear(void)
|
||||
{
|
||||
inputState.keyFlushChars();
|
||||
inputState.ClearKeyStatus(sc_Escape);
|
||||
//JOYSTICK_ClearGameControllerButton(1<<GAMECONTROLLER_BUTTON_START);
|
||||
}
|
||||
|
||||
|
||||
int32_t I_EnterText(char *t, int32_t maxlength, int32_t flags)
|
||||
{
|
||||
|
|
|
@ -30,8 +30,6 @@ enum {
|
|||
extern char typebuf[TYPEBUFSIZE];
|
||||
|
||||
|
||||
extern int32_t I_CheckAllInput(void);
|
||||
extern void I_ClearAllInput(void);
|
||||
|
||||
// Advance = Selecting a menu option || Saying "Yes" || Going forward in Help/Credits
|
||||
// Return = Closing a sub-menu || Saying "No"
|
||||
|
@ -40,12 +38,6 @@ extern void I_ClearAllInput(void);
|
|||
|
||||
extern int32_t I_AdvanceTrigger(void);
|
||||
extern void I_AdvanceTriggerClear(void);
|
||||
extern int32_t I_ReturnTrigger(void);
|
||||
extern void I_ReturnTriggerClear(void);
|
||||
extern int32_t I_GeneralTrigger(void);
|
||||
extern void I_GeneralTriggerClear(void);
|
||||
extern int32_t I_EscapeTrigger(void);
|
||||
extern void I_EscapeTriggerClear(void);
|
||||
|
||||
|
||||
enum EnterTextFlags_t {
|
||||
|
|
|
@ -72,22 +72,8 @@ void InputState::GetMouseDelta(ControlInfo * info)
|
|||
|
||||
void InputState::AddEvent(const event_t *ev)
|
||||
{
|
||||
// Set the old mouseBits. Yet another piece of cruft that needs to go away.
|
||||
if (ev->type == EV_KeyDown || ev->type == EV_KeyUp)
|
||||
{
|
||||
switch (ev->data1)
|
||||
{
|
||||
case KEY_MOUSE1 : mouseSetBit(LEFT_MOUSE, ev->type == EV_KeyDown); handleevents_updatemousestate(ev->type); break;
|
||||
case KEY_MOUSE2 : mouseSetBit(RIGHT_MOUSE, ev->type == EV_KeyDown); break;
|
||||
case KEY_MOUSE3 : mouseSetBit(MIDDLE_MOUSE, ev->type == EV_KeyDown); break;
|
||||
case KEY_MOUSE4 : mouseSetBit(THUMB_MOUSE, ev->type == EV_KeyDown); break;
|
||||
case KEY_MWHEELUP: mouseSetBit(WHEELUP_MOUSE, ev->type == EV_KeyDown); break;
|
||||
case KEY_MWHEELDOWN: mouseSetBit(WHEELDOWN_MOUSE, ev->type == EV_KeyDown); break;
|
||||
case KEY_MWHEELLEFT: mouseSetBit(WHEELLEFT_MOUSE, ev->type == EV_KeyDown); break;
|
||||
case KEY_MWHEELRIGHT: mouseSetBit(WHEELRIGHT_MOUSE, ev->type == EV_KeyDown); break;
|
||||
case KEY_MOUSE5: mouseSetBit(THUMB2_MOUSE, ev->type == EV_KeyDown); break;
|
||||
default: break;
|
||||
}
|
||||
keySetState(ev->data1, ev->type == EV_KeyDown);
|
||||
if (ev->data2) keySetChar(ev->data2);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
extern char appactive;
|
||||
|
||||
typedef uint8_t kb_scancode;
|
||||
typedef uint16_t kb_scancode;
|
||||
extern int GUICapture;
|
||||
|
||||
// This encapsulates the entire game-readable input state which previously was spread out across several files.
|
||||
|
@ -72,8 +72,8 @@ class InputState
|
|||
|
||||
uint8_t KeyStatus[NUM_KEYS];
|
||||
|
||||
char g_keyFIFO[KEYFIFOSIZ];
|
||||
char g_keyAsciiFIFO[KEYFIFOSIZ];
|
||||
kb_scancode g_keyFIFO[KEYFIFOSIZ];
|
||||
char16_t g_keyAsciiFIFO[KEYFIFOSIZ];
|
||||
uint8_t g_keyFIFOpos;
|
||||
uint8_t g_keyFIFOend;
|
||||
uint8_t g_keyAsciiPos;
|
||||
|
@ -81,9 +81,6 @@ class InputState
|
|||
|
||||
kb_scancode KB_LastScan;
|
||||
|
||||
int g_mouseBits;
|
||||
uint8_t g_mouseClickState;
|
||||
|
||||
vec2_t g_mousePos;
|
||||
vec2_t g_mouseAbs;
|
||||
|
||||
|
@ -148,12 +145,6 @@ public:
|
|||
return ((g_keyAsciiEnd + 1) & (KEYFIFOSIZ - 1)) == g_keyAsciiPos;
|
||||
}
|
||||
|
||||
void keyBufferInsert(char code)
|
||||
{
|
||||
g_keyAsciiFIFO[g_keyAsciiEnd] = code;
|
||||
g_keyAsciiEnd = ((g_keyAsciiEnd + 1) & (KEYFIFOSIZ - 1));
|
||||
}
|
||||
|
||||
void keySetState(int32_t key, int32_t state)
|
||||
{
|
||||
if (state && !GetKeyStatus(key))
|
||||
|
@ -162,8 +153,6 @@ public:
|
|||
}
|
||||
|
||||
SetKeyStatus(key, state);
|
||||
event_t ev = { (uint8_t)(state ? EV_KeyDown : EV_KeyUp), 0, (int16_t)key };
|
||||
|
||||
if (state)
|
||||
{
|
||||
g_keyFIFO[g_keyFIFOend] = key;
|
||||
|
@ -172,14 +161,13 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
char keyGetScan(void)
|
||||
kb_scancode keyGetScan()
|
||||
{
|
||||
if (g_keyFIFOpos == g_keyFIFOend)
|
||||
return 0;
|
||||
|
||||
char const c = g_keyFIFO[g_keyFIFOpos];
|
||||
auto const c = g_keyFIFO[g_keyFIFOpos];
|
||||
g_keyFIFOpos = ((g_keyFIFOpos + 2) & (KEYFIFOSIZ - 1));
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
|
@ -205,7 +193,7 @@ public:
|
|||
|
||||
void keySetChar(int key)
|
||||
{
|
||||
g_keyAsciiFIFO[g_keyAsciiEnd] = key;
|
||||
g_keyAsciiFIFO[g_keyAsciiEnd] = (char16_t)key;
|
||||
g_keyAsciiEnd = ((g_keyAsciiEnd + 1) & (KEYFIFOSIZ - 1));
|
||||
}
|
||||
|
||||
|
@ -242,46 +230,8 @@ public:
|
|||
ClearAllKeyStatus();
|
||||
}
|
||||
|
||||
void mouseSetBit(int val, int state)
|
||||
{
|
||||
if (state) g_mouseBits |= val;
|
||||
else g_mouseBits &=~val;
|
||||
}
|
||||
|
||||
void handleevents_updatemousestate(uint8_t state)
|
||||
{
|
||||
g_mouseClickState = state == EV_KeyUp ? MOUSE_RELEASED : MOUSE_PRESSED;
|
||||
}
|
||||
|
||||
void AddEvent(const event_t* ev);
|
||||
|
||||
int32_t mouseReadButtons(void)
|
||||
{
|
||||
return (!g_mouseEnabled || !appactive || !g_mouseInsideWindow || GUICapture) ? 0 : g_mouseBits;
|
||||
}
|
||||
|
||||
int mouseClickState()
|
||||
{
|
||||
return g_mouseClickState;
|
||||
}
|
||||
|
||||
void clearMouseClickState()
|
||||
{
|
||||
g_mouseClickState = MOUSE_IDLE;
|
||||
}
|
||||
|
||||
|
||||
int32_t mouseAdvanceClickState(void)
|
||||
{
|
||||
switch (g_mouseClickState)
|
||||
{
|
||||
case MOUSE_PRESSED: g_mouseClickState = MOUSE_HELD; return 1;
|
||||
case MOUSE_RELEASED: g_mouseClickState = MOUSE_IDLE; return 1;
|
||||
case MOUSE_HELD: return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MouseSetPos(int x, int y)
|
||||
{
|
||||
g_mousePos = { x, y };
|
||||
|
@ -301,9 +251,6 @@ public:
|
|||
// fixme: This needs to be tracked.
|
||||
return false;
|
||||
}
|
||||
int32_t MouseGetButtons(void) { return mouseReadButtons(); }
|
||||
inline void MouseClearButton(int32_t b) { g_mouseBits &= ~b; }
|
||||
inline void MouseClearAllButtonss(void) { g_mouseBits = 0; }
|
||||
int32_t mouseReadAbs(vec2_t* const pResult);
|
||||
void GetMouseDelta(ControlInfo* info);
|
||||
|
||||
|
@ -312,6 +259,14 @@ public:
|
|||
ClearKeysDown();
|
||||
keyFlushChars();
|
||||
keyFlushScans();
|
||||
buttonMap.ResetButtonStates(); // this is important. If all input is cleared, the buttons must be cleared as well.
|
||||
}
|
||||
|
||||
bool CheckAllInput()
|
||||
{
|
||||
auto res = keyGetScan();
|
||||
ClearAllInput();
|
||||
return res;
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -339,5 +294,6 @@ inline void CONTROL_GetInput(ControlInfo* info)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define WIN_IS_PRESSED ( inputState.WinPressed() )
|
||||
#define ALT_IS_PRESSED ( inputState.AltPressed() )
|
||||
#define SHIFTS_IS_PRESSED ( inputState.ShiftPressed() )
|
||||
|
|
|
@ -238,7 +238,7 @@ int32_t Anim_Play(const char *fn)
|
|||
uint16_t soundidx = 0; // custom anim sounds
|
||||
int32_t running = 1, i;
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
#ifdef USE_LIBVPX
|
||||
uint16_t framenum = 0;
|
||||
|
@ -389,13 +389,13 @@ int32_t Anim_Play(const char *fn)
|
|||
palfadedelta = 0;
|
||||
videoShowFrame(0);
|
||||
|
||||
// I_ClearAllInput();
|
||||
// inputState.ClearAllInput();
|
||||
|
||||
do
|
||||
{
|
||||
gameHandleEvents();
|
||||
|
||||
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, g_player[screenpeek].ps->i, screenpeek, I_GeneralTrigger()))
|
||||
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, g_player[screenpeek].ps->i, screenpeek, inputState.CheckAllInput()))
|
||||
{
|
||||
running = 0;
|
||||
break;
|
||||
|
@ -409,7 +409,6 @@ int32_t Anim_Play(const char *fn)
|
|||
animvpx_restore_glstate();
|
||||
animvpx_uninit_codec(&codec);
|
||||
|
||||
I_ClearAllInput();
|
||||
return !running; // done with playing VP8!
|
||||
}
|
||||
#endif
|
||||
|
@ -482,7 +481,7 @@ int32_t Anim_Play(const char *fn)
|
|||
TileFiles.tileSetExternal(TILE_ANIM, 200, 320, ANIM_DrawFrame(i));
|
||||
tileInvalidate(TILE_ANIM, 0, 1 << 4); // JBF 20031228
|
||||
|
||||
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, g_player[screenpeek].ps->i, screenpeek, I_GeneralTrigger()))
|
||||
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, g_player[screenpeek].ps->i, screenpeek, inputState.CheckAllInput()))
|
||||
{
|
||||
running = 0;
|
||||
goto end_anim_restore_gl;
|
||||
|
@ -526,7 +525,7 @@ int32_t Anim_Play(const char *fn)
|
|||
|
||||
videoNextPage();
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
ototalclock += anim->framedelay;
|
||||
|
||||
|
@ -550,7 +549,7 @@ end_anim_restore_gl:
|
|||
gltexapplyprops();
|
||||
#endif
|
||||
end_anim:
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
anim->animbuf = nullptr;
|
||||
ANIM_FreeAnim();
|
||||
|
||||
|
|
|
@ -505,7 +505,7 @@ void GameInterface::MenuClosed()
|
|||
if (gm & MODE_GAME)
|
||||
{
|
||||
if (gm & MODE_MENU)
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
// The following lines are here so that you cannot close the menu when no game is running.
|
||||
gm &= ~MODE_MENU;
|
||||
|
|
|
@ -517,7 +517,7 @@ RECHECK:
|
|||
}
|
||||
}
|
||||
|
||||
if (foundemo == 0 || in_menu || I_CheckAllInput() || numplayers > 1)
|
||||
if (foundemo == 0 || in_menu || inputState.CheckAllInput() || numplayers > 1)
|
||||
{
|
||||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
|
@ -527,7 +527,7 @@ RECHECK:
|
|||
ready2send = 0;
|
||||
bigi = 0;
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
// OSD_Printf("ticcnt=%d, total=%d\n", g_demo_cnt, g_demo_totalCnt);
|
||||
while (g_demo_cnt < g_demo_totalCnt || foundemo==0)
|
||||
|
@ -791,7 +791,7 @@ nextdemo_nomenu:
|
|||
// draw status
|
||||
Demo_DisplayProfStatus();
|
||||
|
||||
if (I_GeneralTrigger())
|
||||
if (inputState.CheckAllInput())
|
||||
Demo_StopProfiling();
|
||||
}
|
||||
else
|
||||
|
@ -897,7 +897,7 @@ nextdemo_nomenu:
|
|||
|
||||
if (VOLUMEONE)
|
||||
{
|
||||
if (ud.show_help == 0 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
||||
if ((g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
||||
rotatesprite_fs((320-50)<<16, 9<<16, 65536L, 0, BETAVERSION, 0, 0, 2+8+16+128);
|
||||
}
|
||||
|
||||
|
|
|
@ -687,7 +687,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
|||
|
||||
VM_OnEvent(EVENT_DISPLAYSTART, pPlayer->i, playerNum);
|
||||
|
||||
if ((ud.overhead_on == 2 && !automapping) || ud.show_help || (pPlayer->cursectnum == -1 && videoGetRenderMode() != REND_CLASSIC))
|
||||
if ((ud.overhead_on == 2 && !automapping) || (pPlayer->cursectnum == -1 && videoGetRenderMode() != REND_CLASSIC))
|
||||
return;
|
||||
|
||||
if (r_usenewaspect)
|
||||
|
@ -4635,8 +4635,7 @@ void G_HandleLocalKeys(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!ALT_IS_PRESSED && !SHIFTS_IS_PRESSED && !WIN_IS_PRESSED)
|
||||
else
|
||||
{
|
||||
if ((g_netServer || ud.multimode > 1) && buttonMap.ButtonDown(gamefunc_SendMessage))
|
||||
{
|
||||
|
@ -4674,6 +4673,7 @@ void G_HandleLocalKeys(void)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0 // fixme: We should not query Esc here, this needs to be done differently
|
||||
if (I_EscapeTrigger() && ud.overhead_on && myplayer.newowner == -1)
|
||||
{
|
||||
I_EscapeTriggerClear();
|
||||
|
@ -4682,6 +4682,7 @@ void G_HandleLocalKeys(void)
|
|||
ud.scrollmode = 0;
|
||||
G_UpdateScreenArea();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (buttonMap.ButtonDown(gamefunc_Map))
|
||||
{
|
||||
|
@ -6066,7 +6067,7 @@ MAIN_LOOP_RESTART:
|
|||
|
||||
int const moveClock = (int)totalclock;
|
||||
|
||||
if (((ud.show_help == 0 && !GUICapture && (myplayer.gm & MODE_MENU) != MODE_MENU) || ud.recstat == 2 || (g_netServer || ud.multimode > 1))
|
||||
if (((!GUICapture && (myplayer.gm & MODE_MENU) != MODE_MENU) || ud.recstat == 2 || (g_netServer || ud.multimode > 1))
|
||||
&& (myplayer.gm & MODE_GAME))
|
||||
{
|
||||
G_MoveLoop();
|
||||
|
|
|
@ -181,7 +181,7 @@ typedef struct {
|
|||
|
||||
char overhead_on,last_overhead,showweapons;
|
||||
char god,warp_on,cashman,eog,showallmap;
|
||||
char show_help,scrollmode,noclip;
|
||||
char scrollmode,noclip;
|
||||
char display_bonus_screen;
|
||||
char show_level_text;
|
||||
|
||||
|
@ -344,7 +344,7 @@ static inline int32_t calc_smoothratio_demo(ClockTicks totalclk, ClockTicks otot
|
|||
|
||||
static inline int32_t calc_smoothratio(ClockTicks totalclk, ClockTicks ototalclk)
|
||||
{
|
||||
if (!((ud.show_help == 0 && (!g_netServer && ud.multimode < 2) && ((g_player[myconnectindex].ps->gm & MODE_MENU) == 0)) ||
|
||||
if (!(((!g_netServer && ud.multimode < 2) && ((g_player[myconnectindex].ps->gm & MODE_MENU) == 0)) ||
|
||||
(g_netServer || ud.multimode > 1) ||
|
||||
ud.recstat == 2) ||
|
||||
ud.pause_on)
|
||||
|
|
|
@ -1238,7 +1238,7 @@ void Screen_Play(void)
|
|||
{
|
||||
bool running = true;
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
// This needs to be disabled during the loop.
|
||||
auto r2dover = rotatesprite_2doverride;
|
||||
|
@ -1254,11 +1254,11 @@ void Screen_Play(void)
|
|||
|
||||
videoClearScreen(0);
|
||||
|
||||
if (VM_OnEventWithReturn(EVENT_SCREEN, -1, myconnectindex, I_CheckAllInput()))
|
||||
if (VM_OnEventWithReturn(EVENT_SCREEN, -1, myconnectindex, inputState.CheckAllInput()))
|
||||
running = false;
|
||||
|
||||
videoNextPage();
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
} while (running);
|
||||
rotatesprite_2doverride = r2dover;
|
||||
}
|
||||
|
@ -4146,7 +4146,7 @@ badindex:
|
|||
}
|
||||
|
||||
tw = vm.pPlayer->palette;
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
Anim_Play(quoteMgr.GetQuote(nQuote));
|
||||
P_SetGamePalette(vm.pPlayer, tw, 2 + 16);
|
||||
dispatch();
|
||||
|
@ -4154,7 +4154,7 @@ badindex:
|
|||
|
||||
vInstruction(CON_STARTSCREEN):
|
||||
insptr++;
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
Screen_Play();
|
||||
dispatch();
|
||||
|
||||
|
|
|
@ -1383,7 +1383,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
|
|||
case USERDEFS_CASHMAN: labelNum = ud.cashman; break;
|
||||
case USERDEFS_EOG: labelNum = ud.eog; break;
|
||||
case USERDEFS_SHOWALLMAP: labelNum = ud.showallmap; break;
|
||||
case USERDEFS_SHOW_HELP: labelNum = ud.show_help; break;
|
||||
case USERDEFS_SHOW_HELP: labelNum = 0; break;
|
||||
case USERDEFS_SCROLLMODE: labelNum = ud.scrollmode; break;
|
||||
case USERDEFS_CLIPPING: labelNum = ud.noclip; break;
|
||||
// case USERDEFS_USER_NAME: labelNum = ud.user_name[MAXPLAYERS][32]; break;
|
||||
|
@ -1571,7 +1571,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
|
|||
case USERDEFS_CASHMAN: ud.cashman = iSet; break;
|
||||
case USERDEFS_EOG: ud.eog = iSet; break;
|
||||
case USERDEFS_SHOWALLMAP: ud.showallmap = iSet; break;
|
||||
case USERDEFS_SHOW_HELP: ud.show_help = iSet; break;
|
||||
case USERDEFS_SHOW_HELP: break;
|
||||
case USERDEFS_SCROLLMODE: ud.scrollmode = iSet; break;
|
||||
case USERDEFS_CLIPPING: ud.noclip = iSet; break;
|
||||
// case USERDEFS_USER_NAME: ud.user_name[MAXPLAYERS][32] = lValue; break;
|
||||
|
|
|
@ -32,10 +32,6 @@ BEGIN_DUKE_NS
|
|||
|
||||
#define BGSTRETCH (hud_bgstretch ? 1024 : 0)
|
||||
|
||||
#define WIN_IS_PRESSED ( inputState.WinPressed() )
|
||||
#define ALT_IS_PRESSED ( inputState.AltPressed() )
|
||||
#define SHIFTS_IS_PRESSED ( inputState.ShiftPressed() )
|
||||
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
#define RANDOMSCRAP(s, i) A_InsertSprite(s->sectnum,s->x+(krand()&255)-128,s->y+(krand()&255)-128,s->z-ZOFFSET3-(krand()&8191),\
|
||||
SCRAP6+(krand()&15),-8,48,48,krand()&2047,(krand()&63)+64,-512-(krand()&2047),i,5)
|
||||
|
|
|
@ -3066,7 +3066,7 @@ void P_GetInput(int const playerNum)
|
|||
localInput.bits |= (mouseaim << SK_AIMMODE);
|
||||
localInput.bits |= (g_gameQuit << SK_GAMEQUIT);
|
||||
localInput.bits |= inputState.GetKeyStatus(sc_Pause) << SK_PAUSE;
|
||||
localInput.bits |= ((uint32_t)inputState.GetKeyStatus(sc_Escape)) << SK_ESCAPE;
|
||||
//localInput.bits |= ((uint32_t)inputState.GetKeyStatus(sc_Escape)) << SK_ESCAPE; fixme.This needs to be done differently
|
||||
|
||||
if (buttonMap.ButtonDown(gamefunc_Dpad_Select))
|
||||
{
|
||||
|
|
|
@ -669,7 +669,6 @@ void P_ResetPlayer(int playerNum)
|
|||
{
|
||||
auto &p = *g_player[playerNum].ps;
|
||||
|
||||
ud.show_help = 0;
|
||||
ud.showallmap = 0;
|
||||
|
||||
p.access_spritenum = -1;
|
||||
|
|
|
@ -55,24 +55,21 @@ int32_t g_noLogo = 0;
|
|||
#ifndef EDUKE32_STANDALONE
|
||||
static void G_HandleEventsWhileNoInput(void)
|
||||
{
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
while (!I_GeneralTrigger())
|
||||
while (!inputState.CheckAllInput())
|
||||
gameHandleEvents();
|
||||
|
||||
I_ClearAllInput();
|
||||
}
|
||||
|
||||
static int32_t G_PlaySoundWhileNoInput(int32_t soundnum)
|
||||
{
|
||||
S_PlaySound(soundnum);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
while (S_CheckSoundPlaying(soundnum))
|
||||
{
|
||||
gameHandleEvents();
|
||||
if (I_GeneralTrigger())
|
||||
if (inputState.CheckAllInput())
|
||||
{
|
||||
I_ClearAllInput();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -811,33 +808,6 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
}
|
||||
}
|
||||
|
||||
if (ud.show_help)
|
||||
{
|
||||
switch (ud.show_help)
|
||||
{
|
||||
case 1:
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, TEXTSTORY, 0, 0, 10+64);
|
||||
break;
|
||||
case 2:
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, F1HELP, 0, 0, 10+64);
|
||||
break;
|
||||
}
|
||||
|
||||
if (I_ReturnTrigger())
|
||||
{
|
||||
I_ReturnTriggerClear();
|
||||
ud.show_help = 0;
|
||||
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2)
|
||||
{
|
||||
ready2send = 1;
|
||||
totalclock = ototalclock;
|
||||
}
|
||||
G_UpdateScreenArea();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
i = pp->cursectnum;
|
||||
if (i > -1)
|
||||
{
|
||||
|
@ -1092,7 +1062,7 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
#ifndef EDUKE32_TOUCH_DEVICES
|
||||
if (VOLUMEONE)
|
||||
{
|
||||
if (ud.show_help == 0 && g_showShareware > 0 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
||||
if (g_showShareware > 0 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
||||
rotatesprite_fs((320-50)<<16, 9<<16, 65536L, 0, BETAVERSION, 0, 0, 2+8+16+128);
|
||||
}
|
||||
#endif
|
||||
|
@ -1160,9 +1130,8 @@ void fadepal(int32_t r, int32_t g, int32_t b, int32_t start, int32_t end, int32_
|
|||
// (end-start)/step + 1 iterations
|
||||
do
|
||||
{
|
||||
if (I_GeneralTrigger())
|
||||
if (inputState.CheckAllInput())
|
||||
{
|
||||
I_ClearAllInput();
|
||||
videoFadePalette(r, g, b, end); // have to set to end fade value if we break!
|
||||
return;
|
||||
}
|
||||
|
@ -1186,9 +1155,8 @@ static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t
|
|||
// (end-start)/step + 1 iterations
|
||||
do
|
||||
{
|
||||
if (I_GeneralTrigger())
|
||||
if (inputState.CheckAllInput())
|
||||
{
|
||||
I_ClearAllInput();
|
||||
videoFadePalette(r, g, b, end); // have to set to end fade value if we break!
|
||||
return;
|
||||
}
|
||||
|
@ -1217,15 +1185,15 @@ void gameDisplayTENScreen()
|
|||
// g_player[myconnectindex].ps->palette = palette;
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
|
||||
fadepal(0, 0, 0, 0, 252, 28);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
totalclock = 0;
|
||||
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, TENSCREEN, 0, 0, 2 + 8 + 64 + BGSTRETCH);
|
||||
fadepaltile(0, 0, 0, 252, 0, -28, TENSCREEN);
|
||||
while (!I_GeneralTrigger() && totalclock < 2400)
|
||||
while (!inputState.CheckAllInput() && totalclock < 2400)
|
||||
gameHandleEvents();
|
||||
|
||||
fadepaltile(0, 0, 0, 0, 252, 28, TENSCREEN);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
#ifdef __ANDROID__
|
||||
inExtraScreens = 0;
|
||||
#endif
|
||||
|
@ -1241,17 +1209,17 @@ void gameDisplaySharewareScreens()
|
|||
// g_player[myconnectindex].ps->palette = palette;
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
|
||||
fadepal(0, 0, 0, 0, 252, 28);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, 3291, 0, 0, 2 + 8 + 64 + BGSTRETCH);
|
||||
fadepaltile(0, 0, 0, 252, 0, -28, 3291);
|
||||
while (!I_GeneralTrigger())
|
||||
while (!inputState.CheckAllInput())
|
||||
gameHandleEvents();
|
||||
|
||||
fadepaltile(0, 0, 0, 0, 252, 28, 3291);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, 3290, 0, 0, 2 + 8 + 64 + BGSTRETCH);
|
||||
fadepaltile(0, 0, 0, 252, 0, -28, 3290);
|
||||
while (!I_GeneralTrigger())
|
||||
while (!inputState.CheckAllInput())
|
||||
gameHandleEvents();
|
||||
|
||||
#ifdef __ANDROID__
|
||||
|
@ -1273,7 +1241,7 @@ void G_DisplayExtraScreens(void)
|
|||
|
||||
void gameDisplay3DRScreen()
|
||||
{
|
||||
if (!I_GeneralTrigger() && g_noLogoAnim == 0)
|
||||
if (!inputState.CheckAllInput() && g_noLogoAnim == 0)
|
||||
{
|
||||
Net_GetPackets();
|
||||
|
||||
|
@ -1281,7 +1249,7 @@ void gameDisplay3DRScreen()
|
|||
{
|
||||
Anim_Play("3dr.anm");
|
||||
G_FadePalette(0, 0, 0, 252);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1295,7 +1263,7 @@ void gameDisplay3DRScreen()
|
|||
fadepaltile(0, 0, 0, 252, 0, -28, DREALMS);
|
||||
totalclock = 0;
|
||||
|
||||
while (totalclock < (120 * 7) && !I_GeneralTrigger())
|
||||
while (totalclock < (120 * 7) && !inputState.CheckAllInput())
|
||||
{
|
||||
if (G_FPSLimit())
|
||||
{
|
||||
|
@ -1336,7 +1304,7 @@ void gameDisplayTitleScreen(void)
|
|||
#ifndef EDUKE32_SIMPLE_MENU
|
||||
totalclock < (860 + 120) &&
|
||||
#endif
|
||||
!I_GeneralTrigger())
|
||||
!inputState.CheckAllInput())
|
||||
{
|
||||
if (G_FPSLimit())
|
||||
{
|
||||
|
@ -1432,7 +1400,7 @@ void G_DisplayLogo(void)
|
|||
|
||||
ready2send = 0;
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
videoSetViewableArea(0, 0, xdim-1, ydim-1);
|
||||
videoClearScreen(0L);
|
||||
|
@ -1455,12 +1423,12 @@ void G_DisplayLogo(void)
|
|||
#endif
|
||||
(logoflags & LOGO_PLAYANIM))
|
||||
{
|
||||
if (!I_GeneralTrigger() && g_noLogoAnim == 0)
|
||||
if (!inputState.CheckAllInput() && g_noLogoAnim == 0)
|
||||
{
|
||||
Net_GetPackets();
|
||||
Anim_Play("logo.anm");
|
||||
G_FadePalette(0, 0, 0, 252);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
}
|
||||
|
||||
videoClearScreen(0L);
|
||||
|
@ -1489,7 +1457,7 @@ void G_DisplayLogo(void)
|
|||
videoNextPage();
|
||||
}
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
}
|
||||
|
||||
videoClearScreen(0L);
|
||||
|
@ -1498,7 +1466,7 @@ void G_DisplayLogo(void)
|
|||
if (logoflags & LOGO_TITLESCREEN)
|
||||
gameDisplayTitleScreen();
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
}
|
||||
|
||||
renderFlushPerms();
|
||||
|
@ -1523,14 +1491,14 @@ void G_DoOrderScreen(void)
|
|||
for (int i=0; i<4; i++)
|
||||
{
|
||||
fadepal(0, 0, 0, 0, 252, 28);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, ORDERING+i, 0, 0, 2+8+64+BGSTRETCH);
|
||||
fadepal(0, 0, 0, 252, 0, -28);
|
||||
while (!I_CheckAllInput())
|
||||
while (!inputState.CheckAllInput())
|
||||
gameHandleEvents();
|
||||
}
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1565,7 +1533,7 @@ static void G_BonusCutscenes(void)
|
|||
videoNextPage();
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
totalclock = 0;
|
||||
|
||||
do
|
||||
|
@ -1625,7 +1593,7 @@ static void G_BonusCutscenes(void)
|
|||
|
||||
gameHandleEvents();
|
||||
|
||||
if (I_GeneralTrigger()) break;
|
||||
if (inputState.CheckAllInput()) break;
|
||||
} while (1);
|
||||
|
||||
fadepal(0, 0, 0, 0, 252, 4);
|
||||
|
@ -1634,7 +1602,7 @@ static void G_BonusCutscenes(void)
|
|||
if (G_GetLogoFlags() & LOGO_NOE1ENDSCREEN)
|
||||
goto VOL1_END;
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308
|
||||
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, 3292, 0, 0, 2+8+64+BGSTRETCH);
|
||||
|
@ -1662,7 +1630,7 @@ static void G_BonusCutscenes(void)
|
|||
{
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
Anim_Play("cineov2.anm");
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
videoClearScreen(0L);
|
||||
videoNextPage();
|
||||
|
||||
|
@ -1673,7 +1641,7 @@ static void G_BonusCutscenes(void)
|
|||
if (G_GetLogoFlags() & LOGO_NOE2ENDSCREEN)
|
||||
return;
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, 3293, 0, 0, 2+8+64+BGSTRETCH);
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
|
@ -1696,7 +1664,7 @@ static void G_BonusCutscenes(void)
|
|||
{
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
int t = Anim_Play("vol4e1.anm");
|
||||
videoClearScreen(0L);
|
||||
videoNextPage();
|
||||
|
@ -1721,7 +1689,7 @@ static void G_BonusCutscenes(void)
|
|||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
S_PlaySound(ENDSEQVOL3SND4);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
if (G_GetLogoFlags() & LOGO_NODUKETEAMTEXT)
|
||||
goto VOL4_DUKETEAM;
|
||||
|
@ -1739,7 +1707,7 @@ static void G_BonusCutscenes(void)
|
|||
|
||||
fadepal(0, 0, 0, 252, 0, -12);
|
||||
videoNextPage();
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
G_HandleEventsWhileNoInput();
|
||||
fadepal(0, 0, 0, 0, 252, 12);
|
||||
|
||||
|
@ -1752,7 +1720,7 @@ static void G_BonusCutscenes(void)
|
|||
|
||||
Anim_Play("DUKETEAM.ANM");
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
G_HandleEventsWhileNoInput();
|
||||
|
||||
videoClearScreen(0L);
|
||||
|
@ -1762,7 +1730,7 @@ static void G_BonusCutscenes(void)
|
|||
VOL4_END:
|
||||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
break;
|
||||
|
||||
|
@ -1777,7 +1745,7 @@ static void G_BonusCutscenes(void)
|
|||
{
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
Anim_Play("cineov3.anm");
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
ototalclock = totalclock+200;
|
||||
while (totalclock < ototalclock)
|
||||
gameHandleEvents();
|
||||
|
@ -1793,7 +1761,7 @@ static void G_BonusCutscenes(void)
|
|||
|
||||
Anim_Play("RADLOGO.ANM");
|
||||
|
||||
if (adult_lockout == 0 && !I_GeneralTrigger())
|
||||
if (adult_lockout == 0 && !inputState.CheckAllInput())
|
||||
{
|
||||
if (G_PlaySoundWhileNoInput(ENDSEQVOL3SND5)) goto ENDANM;
|
||||
if (G_PlaySoundWhileNoInput(ENDSEQVOL3SND6)) goto ENDANM;
|
||||
|
@ -1802,15 +1770,15 @@ static void G_BonusCutscenes(void)
|
|||
if (G_PlaySoundWhileNoInput(ENDSEQVOL3SND9)) goto ENDANM;
|
||||
}
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
totalclock = 0;
|
||||
if (PLUTOPAK || (G_GetLogoFlags() & LOGO_NODUKETEAMPIC))
|
||||
{
|
||||
while (totalclock < 120 && !I_GeneralTrigger())
|
||||
while (totalclock < 120 && !inputState.CheckAllInput())
|
||||
gameHandleEvents();
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1829,7 +1797,7 @@ static void G_BonusCutscenes(void)
|
|||
|
||||
Anim_Play("DUKETEAM.ANM");
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
G_HandleEventsWhileNoInput();
|
||||
|
||||
videoClearScreen(0L);
|
||||
|
@ -1837,7 +1805,7 @@ static void G_BonusCutscenes(void)
|
|||
G_FadePalette(0, 0, 0, 252);
|
||||
}
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
|
||||
|
@ -2030,7 +1998,7 @@ void G_BonusScreen(int32_t bonusonly)
|
|||
S_PlaySound(BONUSMUSIC);
|
||||
|
||||
videoNextPage();
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
fadepal(0, 0, 0, 252, 0, -28);
|
||||
totalclock = 0;
|
||||
|
||||
|
@ -2045,9 +2013,8 @@ void G_BonusScreen(int32_t bonusonly)
|
|||
videoNextPage();
|
||||
}
|
||||
|
||||
if (I_CheckAllInput())
|
||||
if (inputState.CheckAllInput())
|
||||
{
|
||||
I_ClearAllInput();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2070,7 +2037,7 @@ void G_BonusScreen(int32_t bonusonly)
|
|||
S_PlaySound(BONUSMUSIC);
|
||||
|
||||
videoNextPage();
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
bonuscnt = 0;
|
||||
totalclock = 0;
|
||||
|
@ -2298,9 +2265,8 @@ void G_BonusScreen(int32_t bonusonly)
|
|||
if (totalclock > 10240 && totalclock < 10240+10240)
|
||||
totalclock = 1024;
|
||||
|
||||
if (I_CheckAllInput() && totalclock >(60*2)) // JBF 20030809
|
||||
if (inputState.CheckAllInput() && totalclock >(60*2)) // JBF 20030809
|
||||
{
|
||||
I_ClearAllInput();
|
||||
if (totalclock < (60*13))
|
||||
{
|
||||
inputState.keyFlushChars();
|
||||
|
|
|
@ -3105,9 +3105,6 @@ static int32_t our_neartag_blacklist(int32_t spriteNum)
|
|||
static void G_ClearCameras(DukePlayer_t *p)
|
||||
{
|
||||
G_ClearCameraView(p);
|
||||
|
||||
if (I_EscapeTrigger())
|
||||
I_EscapeTriggerClear();
|
||||
}
|
||||
|
||||
void P_CheckSectors(int playerNum)
|
||||
|
|
|
@ -412,13 +412,15 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
return 0;
|
||||
|
||||
#if 0 // NOTE: Reactivate!!!
|
||||
case WM_KILLFOCUS:
|
||||
I_CheckNativeMouse (true, false); // Make sure mouse gets released right away
|
||||
break;
|
||||
|
||||
case WM_SETFOCUS:
|
||||
I_CheckNativeMouse (false, EventHandlerResultForNativeMouse); // This cannot call the event handler. Doing it from here is unsafe.
|
||||
I_CheckNativeMouse (false, false); // This cannot call the event handler. Doing it from here is unsafe.
|
||||
break;
|
||||
#endif
|
||||
|
||||
case WM_SETCURSOR:
|
||||
if (!CursorState)
|
||||
|
@ -736,6 +738,7 @@ void I_GetEvent ()
|
|||
//
|
||||
void I_StartTic ()
|
||||
{
|
||||
I_StartFrame();
|
||||
BlockMouseMove--;
|
||||
buttonMap.ResetButtonTriggers ();
|
||||
I_CheckNativeMouse (false, false);
|
||||
|
|
|
@ -280,6 +280,8 @@ static bool grab_mouse;
|
|||
void mouseGrabInput(bool grab)
|
||||
{
|
||||
grab_mouse = grab;
|
||||
if (grab) GUICapture &= ~1;
|
||||
else GUICapture |= 1;
|
||||
}
|
||||
|
||||
void I_CheckNativeMouse(bool preferNative, bool eventhandlerresult)
|
||||
|
|
|
@ -274,7 +274,7 @@ int32_t Anim_Play(const char *fn)
|
|||
uint16_t soundidx = 0; // custom anim sounds
|
||||
int32_t running = 1, i;
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
#ifdef USE_LIBVPX
|
||||
uint16_t framenum = 0;
|
||||
|
@ -421,13 +421,13 @@ int32_t Anim_Play(const char *fn)
|
|||
palfadedelta = 0;
|
||||
videoShowFrame(0);
|
||||
|
||||
// I_ClearAllInput();
|
||||
// inputState.ClearAllInput();
|
||||
|
||||
do
|
||||
{
|
||||
G_HandleAsync();
|
||||
|
||||
if (I_CheckAllInput())
|
||||
if (inputState.CheckAllInput())
|
||||
{
|
||||
running = 0;
|
||||
break;
|
||||
|
@ -441,7 +441,7 @@ int32_t Anim_Play(const char *fn)
|
|||
animvpx_restore_glstate();
|
||||
animvpx_uninit_codec(&codec);
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
return !running; // done with playing VP8!
|
||||
}
|
||||
#endif
|
||||
|
@ -514,7 +514,7 @@ int32_t Anim_Play(const char *fn)
|
|||
TileFiles.tileSetExternal(TILE_ANIM, 200, 320, ANIM_DrawFrame(i));
|
||||
tileInvalidate(TILE_ANIM, 0, 1 << 4); // JBF 20031228
|
||||
|
||||
if (I_CheckAllInput())
|
||||
if (inputState.CheckAllInput())
|
||||
{
|
||||
running = 0;
|
||||
goto end_anim_restore_gl;
|
||||
|
@ -556,7 +556,7 @@ int32_t Anim_Play(const char *fn)
|
|||
|
||||
videoNextPage();
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
ototalclock += anim->framedelay;
|
||||
|
||||
|
@ -580,7 +580,7 @@ end_anim_restore_gl:
|
|||
gltexapplyprops();
|
||||
#endif
|
||||
end_anim:
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
anim->animbuf = nullptr;
|
||||
ANIM_FreeAnim();
|
||||
tileDelete(TILE_ANIM);
|
||||
|
|
|
@ -384,7 +384,7 @@ void GameInterface::MenuClosed()
|
|||
if (gm & MODE_GAME)
|
||||
{
|
||||
if (gm & MODE_MENU)
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
// The following lines are here so that you cannot close the menu when no game is running.
|
||||
gm &= ~MODE_MENU;
|
||||
|
|
|
@ -517,7 +517,7 @@ RECHECK:
|
|||
}
|
||||
}
|
||||
|
||||
if (foundemo == 0 || in_menu || I_CheckAllInput() || numplayers > 1)
|
||||
if (foundemo == 0 || in_menu || inputState.CheckAllInput() || numplayers > 1)
|
||||
{
|
||||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
|
@ -527,7 +527,7 @@ RECHECK:
|
|||
ready2send = 0;
|
||||
bigi = 0;
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
// OSD_Printf("ticcnt=%d, total=%d\n", g_demo_cnt, g_demo_totalCnt);
|
||||
while (g_demo_cnt < g_demo_totalCnt || foundemo==0)
|
||||
|
@ -793,7 +793,7 @@ nextdemo_nomenu:
|
|||
// draw status
|
||||
Demo_DisplayProfStatus();
|
||||
|
||||
if (I_GeneralTrigger())
|
||||
if (inputState.CheckAllInput())
|
||||
Demo_StopProfiling();
|
||||
}
|
||||
else
|
||||
|
@ -902,7 +902,7 @@ nextdemo_nomenu:
|
|||
|
||||
if (VOLUMEONE)
|
||||
{
|
||||
if (ud.show_help == 0 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
||||
if ((g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
||||
rotatesprite_fs((320-50)<<16, 9<<16, 65536L, 0, BETAVERSION, 0, 0, 2+8+16+128);
|
||||
}
|
||||
|
||||
|
|
|
@ -905,7 +905,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
|||
pub = 0;
|
||||
}
|
||||
|
||||
if (ud.overhead_on == 2 || ud.show_help || (pPlayer->cursectnum == -1 && videoGetRenderMode() != REND_CLASSIC))
|
||||
if (ud.overhead_on == 2 || (pPlayer->cursectnum == -1 && videoGetRenderMode() != REND_CLASSIC))
|
||||
return;
|
||||
|
||||
if (r_usenewaspect)
|
||||
|
@ -6188,8 +6188,7 @@ void G_HandleLocalKeys(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!ALT_IS_PRESSED && !SHIFTS_IS_PRESSED && !WIN_IS_PRESSED)
|
||||
else
|
||||
{
|
||||
if ((g_netServer || ud.multimode > 1) && buttonMap.ButtonDown(gamefunc_SendMessage))
|
||||
{
|
||||
|
@ -6230,6 +6229,7 @@ void G_HandleLocalKeys(void)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0 // fixme: We should not query Esc here, this needs to be done differently
|
||||
if (I_EscapeTrigger() && ud.overhead_on && g_player[myconnectindex].ps->newowner == -1)
|
||||
{
|
||||
I_EscapeTriggerClear();
|
||||
|
@ -6238,6 +6238,7 @@ void G_HandleLocalKeys(void)
|
|||
ud.scrollmode = 0;
|
||||
G_UpdateScreenArea();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (buttonMap.ButtonDown(gamefunc_Map))
|
||||
{
|
||||
|
@ -7518,7 +7519,7 @@ MAIN_LOOP_RESTART:
|
|||
|
||||
int const moveClock = (int) totalclock;
|
||||
|
||||
if (((ud.show_help == 0 && !GUICapture && (g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU) || ud.recstat == 2 || (g_netServer || ud.multimode > 1)) &&
|
||||
if (((!GUICapture && (g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU) || ud.recstat == 2 || (g_netServer || ud.multimode > 1)) &&
|
||||
(g_player[myconnectindex].ps->gm&MODE_GAME))
|
||||
{
|
||||
G_MoveLoop();
|
||||
|
|
|
@ -180,7 +180,7 @@ typedef struct {
|
|||
|
||||
char overhead_on,last_overhead,showweapons;
|
||||
char god,warp_on,cashman,eog,showallmap;
|
||||
char show_help,scrollmode,noclip;
|
||||
char scrollmode,noclip;
|
||||
char display_bonus_screen;
|
||||
char show_level_text;
|
||||
|
||||
|
@ -346,7 +346,7 @@ static inline int32_t calc_smoothratio_demo(ClockTicks totalclk, ClockTicks otot
|
|||
|
||||
static inline int32_t calc_smoothratio(ClockTicks totalclk, ClockTicks ototalclk)
|
||||
{
|
||||
if (!((ud.show_help == 0 && (!g_netServer && ud.multimode < 2) && ((g_player[myconnectindex].ps->gm & MODE_MENU) == 0)) ||
|
||||
if (!(((!g_netServer && ud.multimode < 2) && ((g_player[myconnectindex].ps->gm & MODE_MENU) == 0)) ||
|
||||
(g_netServer || ud.multimode > 1) ||
|
||||
ud.recstat == 2) ||
|
||||
ud.pause_on)
|
||||
|
|
|
@ -1119,7 +1119,7 @@ void Screen_Play(void)
|
|||
{
|
||||
int32_t running = 1;
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
auto r2dover = rotatesprite_2doverride;
|
||||
rotatesprite_2doverride = false;
|
||||
|
@ -1133,11 +1133,11 @@ void Screen_Play(void)
|
|||
continue;
|
||||
|
||||
videoClearScreen(0);
|
||||
if (I_CheckAllInput())
|
||||
if (inputState.CheckAllInput())
|
||||
running = 0;
|
||||
|
||||
videoNextPage();
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
} while (running);
|
||||
rotatesprite_2doverride = r2dover;
|
||||
}
|
||||
|
|
|
@ -37,10 +37,6 @@ static FORCE_INLINE int32_t krand2(void)
|
|||
|
||||
#define BGSTRETCH (hud_bgstretch ? 1024 : 0)
|
||||
|
||||
#define WIN_IS_PRESSED ( inputState.WinPressed() )
|
||||
#define ALT_IS_PRESSED ( inputState.AltPressed() )
|
||||
#define SHIFTS_IS_PRESSED ( inputState.ShiftPressed() )
|
||||
|
||||
#define RANDOMSCRAP(s, i) \
|
||||
{ \
|
||||
int32_t const r1 = krand2(), r2 = krand2(), r3 = krand2(), r4 = krand2(), r5 = krand2(), r6 = krand2(), r7 = krand2(); \
|
||||
|
|
|
@ -2956,7 +2956,7 @@ void P_GetInput(int playerNum)
|
|||
localInput.bits |= (mouseaim << SK_AIMMODE);
|
||||
localInput.bits |= (g_gameQuit << SK_GAMEQUIT);
|
||||
localInput.bits |= inputState.GetKeyStatus(sc_Pause) << SK_PAUSE;
|
||||
localInput.bits |= ((uint32_t)inputState.GetKeyStatus(sc_Escape)) << SK_ESCAPE;
|
||||
//localInput.bits |= ((uint32_t)inputState.GetKeyStatus(sc_Escape)) << SK_ESCAPE; fixme.This needs to be done differently
|
||||
|
||||
if (RR)
|
||||
{
|
||||
|
@ -3077,7 +3077,7 @@ void P_GetInputMotorcycle(int playerNum)
|
|||
(buttonMap.ButtonDown(gamefunc_Dpad_Select) && (input.svel < 0 || input.q16avel > 0))) << SK_INV_RIGHT;
|
||||
localInput.bits |= buttonMap.ButtonDown(gamefunc_Open) << SK_OPEN;
|
||||
localInput.bits |= buttonMap.ButtonDown(gamefunc_Inventory) << SK_INVENTORY;
|
||||
localInput.bits |= ((uint32_t)inputState.GetKeyStatus(sc_Escape)) << SK_ESCAPE;
|
||||
//localInput.bits |= ((uint32_t)inputState.GetKeyStatus(sc_Escape)) << SK_ESCAPE; fixme.This needs to be done differently
|
||||
|
||||
if (buttonMap.ButtonDown(gamefunc_Dpad_Select))
|
||||
{
|
||||
|
@ -3342,7 +3342,7 @@ void P_GetInputBoat(int playerNum)
|
|||
(buttonMap.ButtonDown(gamefunc_Dpad_Select) && (input.svel < 0 || input.q16avel > 0))) << SK_INV_RIGHT;
|
||||
localInput.bits |= buttonMap.ButtonDown(gamefunc_Open) << SK_OPEN;
|
||||
localInput.bits |= buttonMap.ButtonDown(gamefunc_Inventory) << SK_INVENTORY;
|
||||
localInput.bits |= ((uint32_t)inputState.GetKeyStatus(sc_Escape)) << SK_ESCAPE;
|
||||
//localInput.bits |= ((uint32_t)inputState.GetKeyStatus(sc_Escape)) << SK_ESCAPE; fixme.This needs to be done differently
|
||||
|
||||
if (buttonMap.ButtonDown(gamefunc_Dpad_Select))
|
||||
{
|
||||
|
|
|
@ -841,7 +841,6 @@ void P_ResetStatus(int playerNum)
|
|||
{
|
||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
ud.show_help = 0;
|
||||
ud.showallmap = 0;
|
||||
pPlayer->dead_flag = 0;
|
||||
pPlayer->wackedbyactor = -1;
|
||||
|
|
|
@ -54,24 +54,22 @@ int32_t g_noLogo = 0;
|
|||
////////// OFTEN-USED FEW-LINERS //////////
|
||||
static void G_HandleEventsWhileNoInput(void)
|
||||
{
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
while (!I_CheckAllInput())
|
||||
while (!inputState.CheckAllInput())
|
||||
G_HandleAsync();
|
||||
|
||||
I_ClearAllInput();
|
||||
}
|
||||
|
||||
static int32_t G_PlaySoundWhileNoInput(int32_t soundnum)
|
||||
{
|
||||
S_PlaySound(soundnum);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
while (S_CheckSoundPlaying(-1, soundnum))
|
||||
{
|
||||
G_HandleAsync();
|
||||
if (I_CheckAllInput())
|
||||
if (inputState.CheckAllInput())
|
||||
{
|
||||
I_ClearAllInput();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -830,37 +828,6 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
}
|
||||
}
|
||||
|
||||
if (ud.show_help)
|
||||
{
|
||||
switch (ud.show_help)
|
||||
{
|
||||
case 1:
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, TEXTSTORY, 0, 0, 10+64);
|
||||
break;
|
||||
case 2:
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, F1HELP, 0, 0, 10+64);
|
||||
break;
|
||||
case 3:
|
||||
if (RRRA)
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, RRTILE1636, 0, 0, 10+64);
|
||||
break;
|
||||
}
|
||||
|
||||
if (I_ReturnTrigger())
|
||||
{
|
||||
I_ReturnTriggerClear();
|
||||
ud.show_help = 0;
|
||||
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2)
|
||||
{
|
||||
ready2send = 1;
|
||||
totalclock = ototalclock;
|
||||
}
|
||||
G_UpdateScreenArea();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
i = pp->cursectnum;
|
||||
if (i > -1)
|
||||
{
|
||||
|
@ -1096,7 +1063,7 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
#ifndef EDUKE32_TOUCH_DEVICES
|
||||
if (VOLUMEONE)
|
||||
{
|
||||
if (ud.show_help == 0 && g_showShareware > 0 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
||||
if (g_showShareware > 0 && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
|
||||
rotatesprite_fs((320-50)<<16, 9<<16, 65536L, 0, BETAVERSION, 0, 0, 2+8+16+128);
|
||||
}
|
||||
#endif
|
||||
|
@ -1216,17 +1183,16 @@ void G_DisplayExtraScreens(void)
|
|||
//g_player[myconnectindex].ps->palette = palette;
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
|
||||
fadepal(0, 0, 0, 0, 252, 28);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, 3291, 0, 0, 2+8+64+BGSTRETCH);
|
||||
fadepaltile(0, 0, 0, 252, 0, -28, 3291);
|
||||
while (!I_CheckAllInput())
|
||||
while (!inputState.CheckAllInput())
|
||||
G_HandleAsync();
|
||||
|
||||
fadepaltile(0, 0, 0, 0, 252, 28, 3291);
|
||||
I_ClearAllInput();
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, 3290, 0, 0, 2+8+64+BGSTRETCH);
|
||||
fadepaltile(0, 0, 0, 252, 0, -28, 3290);
|
||||
while (!I_CheckAllInput())
|
||||
while (!inputState.CheckAllInput())
|
||||
G_HandleAsync();
|
||||
|
||||
#ifdef __ANDROID__
|
||||
|
@ -1244,15 +1210,15 @@ void G_DisplayExtraScreens(void)
|
|||
//g_player[myconnectindex].ps->palette = palette;
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
|
||||
fadepal(0, 0, 0, 0, 252, 28);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
totalclock = 0;
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, TENSCREEN, 0, 0, 2+8+64+BGSTRETCH);
|
||||
fadepaltile(0, 0, 0, 252, 0, -28, TENSCREEN);
|
||||
while (!I_CheckAllInput() && totalclock < 2400)
|
||||
while (!inputState.CheckAllInput() && totalclock < 2400)
|
||||
G_HandleAsync();
|
||||
|
||||
fadepaltile(0, 0, 0, 0, 252, 28, TENSCREEN);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
#ifdef __ANDROID__
|
||||
inExtraScreens = 0;
|
||||
#endif
|
||||
|
@ -1266,7 +1232,7 @@ void G_DisplayLogo(void)
|
|||
|
||||
ready2send = 0;
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
videoSetViewableArea(0, 0, xdim-1, ydim-1);
|
||||
videoClearScreen(0L);
|
||||
|
@ -1282,12 +1248,12 @@ void G_DisplayLogo(void)
|
|||
return;
|
||||
if (RR)
|
||||
{
|
||||
if (!I_CheckAllInput() && g_noLogoAnim == 0)
|
||||
if (!inputState.CheckAllInput() && g_noLogoAnim == 0)
|
||||
{
|
||||
Net_GetPackets();
|
||||
Anim_Play("rr_intro.anm");
|
||||
G_FadePalette(0, 0, 0, 252);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
}
|
||||
|
||||
videoClearScreen(0L);
|
||||
|
@ -1295,12 +1261,12 @@ void G_DisplayLogo(void)
|
|||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
|
||||
if (!I_CheckAllInput() && g_noLogoAnim == 0)
|
||||
if (!inputState.CheckAllInput() && g_noLogoAnim == 0)
|
||||
{
|
||||
Net_GetPackets();
|
||||
Anim_Play("redneck.anm");
|
||||
G_FadePalette(0, 0, 0, 252);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
}
|
||||
|
||||
videoClearScreen(0L);
|
||||
|
@ -1308,12 +1274,12 @@ void G_DisplayLogo(void)
|
|||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
|
||||
if (!I_CheckAllInput() && g_noLogoAnim == 0)
|
||||
if (!inputState.CheckAllInput() && g_noLogoAnim == 0)
|
||||
{
|
||||
Net_GetPackets();
|
||||
Anim_Play("xatlogo.anm");
|
||||
G_FadePalette(0, 0, 0, 252);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
}
|
||||
|
||||
videoClearScreen(0L);
|
||||
|
@ -1335,12 +1301,12 @@ void G_DisplayLogo(void)
|
|||
if (VOLUMEALL)
|
||||
#endif
|
||||
{
|
||||
if (!I_CheckAllInput() && g_noLogoAnim == 0)
|
||||
if (!inputState.CheckAllInput() && g_noLogoAnim == 0)
|
||||
{
|
||||
Net_GetPackets();
|
||||
Anim_Play("logo.anm");
|
||||
G_FadePalette(0, 0, 0, 252);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
}
|
||||
|
||||
videoClearScreen(0L);
|
||||
|
@ -1354,7 +1320,7 @@ void G_DisplayLogo(void)
|
|||
//g_player[myconnectindex].ps->palette = drealms;
|
||||
//G_FadePalette(0,0,0,252);
|
||||
|
||||
if (!I_CheckAllInput() && g_noLogoAnim == 0)
|
||||
if (!inputState.CheckAllInput() && g_noLogoAnim == 0)
|
||||
{
|
||||
Net_GetPackets();
|
||||
|
||||
|
@ -1362,7 +1328,7 @@ void G_DisplayLogo(void)
|
|||
{
|
||||
Anim_Play("3dr.anm");
|
||||
G_FadePalette(0, 0, 0, 252);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1376,7 +1342,7 @@ void G_DisplayLogo(void)
|
|||
fadepaltile(0, 0, 0, 252, 0, -28, DREALMS);
|
||||
totalclock = 0;
|
||||
|
||||
while (totalclock < (120 * 7) && !I_CheckAllInput())
|
||||
while (totalclock < (120 * 7) && !inputState.CheckAllInput())
|
||||
{
|
||||
if (G_FPSLimit())
|
||||
{
|
||||
|
@ -1400,7 +1366,7 @@ void G_DisplayLogo(void)
|
|||
videoClearScreen(0L);
|
||||
videoNextPage();
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
videoClearScreen(0L);
|
||||
videoNextPage();
|
||||
|
@ -1419,7 +1385,7 @@ void G_DisplayLogo(void)
|
|||
#ifndef EDUKE32_SIMPLE_MENU
|
||||
totalclock < (860+120) &&
|
||||
#endif
|
||||
!I_CheckAllInput())
|
||||
!inputState.CheckAllInput())
|
||||
{
|
||||
if (G_FPSLimit())
|
||||
{
|
||||
|
@ -1487,7 +1453,7 @@ void G_DisplayLogo(void)
|
|||
G_HandleAsync();
|
||||
}
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
}
|
||||
|
||||
renderFlushPerms();
|
||||
|
@ -1513,14 +1479,12 @@ void G_DoOrderScreen(void)
|
|||
for (i=0; i<4; i++)
|
||||
{
|
||||
fadepal(0, 0, 0, 0, 252, 28);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, ORDERING+i, 0, 0, 2+8+64+BGSTRETCH);
|
||||
fadepal(0, 0, 0, 252, 0, -28);
|
||||
while (!I_CheckAllInput())
|
||||
while (!inputState.CheckAllInput())
|
||||
G_HandleAsync();
|
||||
}
|
||||
|
||||
I_ClearAllInput();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1541,7 +1505,7 @@ static void G_BonusCutscenes(void)
|
|||
if (adult_lockout == 0)
|
||||
{
|
||||
Anim_Play("turdmov.anm");
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
videoClearScreen(0L);
|
||||
videoNextPage();
|
||||
}
|
||||
|
@ -1549,12 +1513,12 @@ static void G_BonusCutscenes(void)
|
|||
ud.volume_number = 1;
|
||||
ud.eog = 0;
|
||||
fadepal(0, 0, 0, 0, 252, 4);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1);
|
||||
rotatesprite_fs(0, 0, 65536L, 0, TENSCREEN, 0, 0, 2+8+16+64+128+BGSTRETCH);
|
||||
videoNextPage();
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
G_HandleEventsWhileNoInput();
|
||||
fadepal(0, 0, 0, 0, 252, 4);
|
||||
FX_StopAllSounds();
|
||||
|
@ -1566,7 +1530,7 @@ static void G_BonusCutscenes(void)
|
|||
if (adult_lockout == 0)
|
||||
{
|
||||
Anim_Play("rr_outro.anm");
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
videoClearScreen(0L);
|
||||
videoNextPage();
|
||||
}
|
||||
|
@ -1576,12 +1540,12 @@ static void G_BonusCutscenes(void)
|
|||
ud.volume_number = 0;
|
||||
fadepal(0, 0, 0, 0, 252, 4);
|
||||
videoSetViewableArea(0, 0, xdim-1, ydim-1);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8 + 2 + 1);
|
||||
rotatesprite_fs(0, 0, 65536L, 0, TENSCREEN, 0, 0, 2 + 8 + 16 + 64 + 128 + BGSTRETCH);
|
||||
videoNextPage();
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
G_HandleEventsWhileNoInput();
|
||||
fadepal(0, 0, 0, 0, 252, 4);
|
||||
FX_StopAllSounds();
|
||||
|
@ -1614,7 +1578,7 @@ static void G_BonusCutscenes(void)
|
|||
videoNextPage();
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
totalclock = 0;
|
||||
|
||||
while (1)
|
||||
|
@ -1675,13 +1639,13 @@ static void G_BonusCutscenes(void)
|
|||
|
||||
G_HandleAsync();
|
||||
|
||||
if (I_CheckAllInput()) break;
|
||||
if (inputState.CheckAllInput()) break;
|
||||
}
|
||||
|
||||
fadepal(0, 0, 0, 0, 252, 4);
|
||||
}
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308
|
||||
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, 3292, 0, 0, 2+8+64+BGSTRETCH);
|
||||
|
@ -1705,7 +1669,7 @@ static void G_BonusCutscenes(void)
|
|||
{
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
Anim_Play("cineov2.anm");
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
videoClearScreen(0L);
|
||||
videoNextPage();
|
||||
|
||||
|
@ -1713,7 +1677,7 @@ static void G_BonusCutscenes(void)
|
|||
fadepal(0, 0, 0, 0, 252, 4);
|
||||
}
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308
|
||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, 3293, 0, 0, 2+8+64+BGSTRETCH);
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
|
@ -1733,7 +1697,7 @@ static void G_BonusCutscenes(void)
|
|||
{
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
int t = Anim_Play("vol4e1.anm");
|
||||
videoClearScreen(0L);
|
||||
videoNextPage();
|
||||
|
@ -1755,7 +1719,7 @@ static void G_BonusCutscenes(void)
|
|||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
S_PlaySound(ENDSEQVOL3SND4);
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
G_FadePalette(0, 0, 0, 0);
|
||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); // JBF 20040308
|
||||
|
@ -1770,7 +1734,7 @@ static void G_BonusCutscenes(void)
|
|||
|
||||
fadepal(0, 0, 0, 252, 0, -12);
|
||||
videoNextPage();
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
G_HandleEventsWhileNoInput();
|
||||
fadepal(0, 0, 0, 0, 252, 12);
|
||||
|
||||
|
@ -1779,7 +1743,7 @@ static void G_BonusCutscenes(void)
|
|||
|
||||
Anim_Play("DUKETEAM.ANM");
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
G_HandleEventsWhileNoInput();
|
||||
|
||||
videoClearScreen(0L);
|
||||
|
@ -1788,7 +1752,7 @@ static void G_BonusCutscenes(void)
|
|||
|
||||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
|
||||
break;
|
||||
|
||||
|
@ -1800,7 +1764,7 @@ static void G_BonusCutscenes(void)
|
|||
{
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
Anim_Play("cineov3.anm");
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
ototalclock = totalclock+200;
|
||||
while (totalclock < ototalclock)
|
||||
G_HandleAsync();
|
||||
|
@ -1813,7 +1777,7 @@ static void G_BonusCutscenes(void)
|
|||
|
||||
Anim_Play("RADLOGO.ANM");
|
||||
|
||||
if (adult_lockout == 0 && !I_CheckAllInput())
|
||||
if (!inputState.CheckAllInput() && adult_lockout == 0)
|
||||
{
|
||||
if (G_PlaySoundWhileNoInput(ENDSEQVOL3SND5)) goto ENDANM;
|
||||
if (G_PlaySoundWhileNoInput(ENDSEQVOL3SND6)) goto ENDANM;
|
||||
|
@ -1822,15 +1786,11 @@ static void G_BonusCutscenes(void)
|
|||
if (G_PlaySoundWhileNoInput(ENDSEQVOL3SND9)) goto ENDANM;
|
||||
}
|
||||
|
||||
I_ClearAllInput();
|
||||
|
||||
totalclock = 0;
|
||||
if (PLUTOPAK)
|
||||
{
|
||||
while (totalclock < 120 && !I_CheckAllInput())
|
||||
while (!inputState.CheckAllInput() && totalclock < 120)
|
||||
G_HandleAsync();
|
||||
|
||||
I_ClearAllInput();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1849,7 +1809,7 @@ static void G_BonusCutscenes(void)
|
|||
|
||||
Anim_Play("DUKETEAM.ANM");
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
G_HandleEventsWhileNoInput();
|
||||
|
||||
videoClearScreen(0L);
|
||||
|
@ -1857,7 +1817,7 @@ static void G_BonusCutscenes(void)
|
|||
G_FadePalette(0, 0, 0, 252);
|
||||
}
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
|
||||
|
@ -2044,7 +2004,7 @@ void G_BonusScreen(int32_t bonusonly)
|
|||
S_PlaySound(BONUSMUSIC);
|
||||
|
||||
videoNextPage();
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
fadepal(0, 0, 0, 252, 0, RR ? -4 : -28);
|
||||
totalclock = 0;
|
||||
|
||||
|
@ -2059,9 +2019,8 @@ void G_BonusScreen(int32_t bonusonly)
|
|||
videoNextPage();
|
||||
}
|
||||
|
||||
if (I_CheckAllInput())
|
||||
if (inputState.CheckAllInput())
|
||||
{
|
||||
I_ClearAllInput();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2105,7 +2064,7 @@ void G_BonusScreen(int32_t bonusonly)
|
|||
}
|
||||
|
||||
videoNextPage();
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
bonuscnt = 0;
|
||||
totalclock = 0;
|
||||
|
@ -2408,12 +2367,10 @@ void G_BonusScreen(int32_t bonusonly)
|
|||
if (totalclock > 10240 && totalclock < 10240+10240)
|
||||
totalclock = 1024;
|
||||
|
||||
if (I_CheckAllInput() && totalclock >(60*2)) // JBF 20030809
|
||||
if (inputState.CheckAllInput() && totalclock >(60*2)) // JBF 20030809
|
||||
{
|
||||
I_ClearAllInput();
|
||||
if (totalclock < (60*13))
|
||||
{
|
||||
inputState.keyFlushChars();
|
||||
totalclock = (60*13);
|
||||
}
|
||||
else if (totalclock < 1000000000)
|
||||
|
@ -2626,7 +2583,7 @@ void G_BonusScreenRRRA(int32_t bonusonly)
|
|||
S_PlaySound(BONUSMUSIC);
|
||||
|
||||
videoNextPage();
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
fadepal(0, 0, 0, 252, 0, -4);
|
||||
totalclock = 0;
|
||||
|
||||
|
@ -2641,9 +2598,8 @@ void G_BonusScreenRRRA(int32_t bonusonly)
|
|||
videoNextPage();
|
||||
}
|
||||
|
||||
if (I_CheckAllInput())
|
||||
if (inputState.CheckAllInput())
|
||||
{
|
||||
I_ClearAllInput();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2669,7 +2625,7 @@ void G_BonusScreenRRRA(int32_t bonusonly)
|
|||
|
||||
menutext(15, 192, "Press any key to continue");
|
||||
|
||||
I_ClearAllInput();
|
||||
inputState.ClearAllInput();
|
||||
if (!showMap)
|
||||
{
|
||||
videoNextPage();
|
||||
|
@ -2907,13 +2863,10 @@ void G_BonusScreenRRRA(int32_t bonusonly)
|
|||
if (totalclock > 10240 && totalclock < 10240+10240)
|
||||
totalclock = 1024;
|
||||
|
||||
if (I_CheckAllInput() && totalclock >(60*2)) // JBF 20030809
|
||||
if (inputState.CheckAllInput() && totalclock >(60*2)) // JBF 20030809
|
||||
{
|
||||
I_ClearAllInput();
|
||||
|
||||
if (totalclock < (60*13))
|
||||
{
|
||||
inputState.keyFlushChars();
|
||||
totalclock = (60*13);
|
||||
}
|
||||
else if (totalclock < 1000000000)
|
||||
|
@ -2954,9 +2907,8 @@ void G_BonusScreenRRRA(int32_t bonusonly)
|
|||
}
|
||||
|
||||
if (!S_CheckSoundPlaying(-1,35)) break;
|
||||
if (I_CheckAllInput())
|
||||
if (inputState.CheckAllInput())
|
||||
{
|
||||
I_ClearAllInput();
|
||||
S_StopSound(35);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -4268,9 +4268,6 @@ static int32_t our_neartag_blacklist(int32_t UNUSED(spriteNum))
|
|||
static void G_ClearCameras(DukePlayer_t *p)
|
||||
{
|
||||
G_ClearCameraView(p);
|
||||
|
||||
if (I_EscapeTrigger())
|
||||
I_EscapeTriggerClear();
|
||||
}
|
||||
|
||||
void P_CheckSectors(int playerNum)
|
||||
|
|
|
@ -281,16 +281,9 @@ playanm(short anim_num)
|
|||
switch (ANIMnum)
|
||||
{
|
||||
case ANIM_INTRO:
|
||||
if (I_GeneralTrigger())
|
||||
{
|
||||
I_GeneralTriggerClear();
|
||||
goto ENDOFANIMLOOP;
|
||||
}
|
||||
break;
|
||||
case ANIM_SERP:
|
||||
if (I_EscapeTrigger())
|
||||
if (inputState.CheckAllInput())
|
||||
{
|
||||
I_EscapeTriggerClear();
|
||||
goto ENDOFANIMLOOP;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -598,7 +598,7 @@ ScenePlayBack(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (KeyPressed())
|
||||
if (inputState.CheckAllInput())
|
||||
DemoDone = TRUE;
|
||||
|
||||
if (DemoDone)
|
||||
|
|
|
@ -1455,11 +1455,6 @@ ResetKeys(void)
|
|||
}
|
||||
|
||||
|
||||
SWBOOL KeyPressed(void)
|
||||
{
|
||||
return I_GeneralTrigger();
|
||||
}
|
||||
|
||||
uint8_t* KeyPressedRange(uint8_t* kb, uint8_t* ke)
|
||||
{
|
||||
uint8_t* k;
|
||||
|
@ -1539,9 +1534,9 @@ void LogoLevel(void)
|
|||
ototalclock += synctics;
|
||||
}
|
||||
|
||||
if (totalclock > 5*120 || I_GeneralTrigger())
|
||||
if (totalclock > 5*120 || inputState.CheckAllInput())
|
||||
{
|
||||
I_GeneralTriggerClear();
|
||||
inputState.ClearAllInput();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1658,7 +1653,7 @@ void SybexScreen(void)
|
|||
videoNextPage();
|
||||
|
||||
ResetKeys();
|
||||
while (!KeyPressed()) handleevents();
|
||||
while (!inputState.CheckAllInput()) handleevents();
|
||||
}
|
||||
|
||||
// CTW REMOVED END
|
||||
|
@ -1713,7 +1708,7 @@ TitleLevel(void)
|
|||
|
||||
videoNextPage();
|
||||
|
||||
if (totalclock > 5*120 || KeyPressed())
|
||||
if (totalclock > 5*120 || inputState.CheckAllInput())
|
||||
{
|
||||
DemoMode = TRUE;
|
||||
DemoPlaying = TRUE;
|
||||
|
@ -2154,9 +2149,8 @@ void BonusScreen(PLAYERp pp)
|
|||
}
|
||||
ototalclock += limit;
|
||||
|
||||
if (I_GeneralTrigger())
|
||||
if (inputState.CheckAllInput())
|
||||
{
|
||||
I_GeneralTriggerClear();
|
||||
if (State >= s_BonusRest && State < &s_BonusRest[SIZ(s_BonusRest)])
|
||||
{
|
||||
State = s_BonusAnim[STD_RANDOM_RANGE(SIZ(s_BonusAnim))];
|
||||
|
@ -2437,13 +2431,7 @@ void StatScreen(PLAYERp mpp)
|
|||
|
||||
videoNextPage();
|
||||
|
||||
if (KeyPressed())
|
||||
{
|
||||
while (KeyPressed()) ;
|
||||
}
|
||||
|
||||
inputState.ClearKeyStatus(KEYSC_SPACE);
|
||||
inputState.ClearKeyStatus(KEYSC_ENTER);
|
||||
inputState.ClearAllInput();
|
||||
|
||||
PlaySong(nullptr, ThemeSongs[1], ThemeTrack[1]);
|
||||
|
||||
|
|
|
@ -2333,7 +2333,6 @@ void MapSetAll2D(uint8_t fill); // game.c
|
|||
void TerminateGame(void); // game.c
|
||||
void TerminateLevel(void); // game.c
|
||||
void ResetKeys(void); // game.c
|
||||
SWBOOL KeyPressed(void); // game.c
|
||||
void drawoverheadmap(int cposx,int cposy,int czoom,short cang); // game.c
|
||||
void COVERsetbrightness(int bright, unsigned char *pal); // game.c
|
||||
void DrawMenuLevelScreen(void); // game.c
|
||||
|
|
Loading…
Reference in a new issue