- fixed compilation.

This commit is contained in:
Christoph Oelckers 2019-11-04 17:58:18 +01:00
parent e7f4433df6
commit 1ee4efebb0
11 changed files with 26 additions and 32 deletions

View file

@ -183,18 +183,10 @@ void ShutDown(void)
sfxTerm();
scrUnInit();
CONTROL_Shutdown();
KB_Shutdown();
OSD_Cleanup();
// PORT_TODO: Check argument
if (syncstate)
printf("A packet was lost! (syncstate)\n");
#if 0 // never used anywhere.
for (int i = 0; i < 10; i++)
{
if (gSaveGamePic[i])
Resource::Free(gSaveGamePic[i]);
}
#endif
DO_FREE_AND_NULL(pUserTiles);
DO_FREE_AND_NULL(pUserSoundRFF);
DO_FREE_AND_NULL(pUserRFF);

View file

@ -175,7 +175,7 @@ void CGameMenuMgr::Draw(void)
if (!MOUSEACTIVECONDITION)
m_mousewake_watchpoint = 1;
if (MOUSEACTIVECONDITIONAL(mouseAdvanceClickState()) || m_mousepos.x != m_prevmousepos.x || m_mousepos.y != m_prevmousepos.y)
if (MOUSEACTIVECONDITIONAL(inputState.mouseAdvanceClickState()) || m_mousepos.x != m_prevmousepos.x || m_mousepos.y != m_prevmousepos.y)
{
m_prevmousepos = m_mousepos;
m_mouselastactivity = (int)totalclock;

View file

@ -107,12 +107,6 @@ char CONSTEXPR const g_keyAsciiTableShift[128] = {
};
// mouse
extern vec2_t g_mousePos;
extern vec2_t g_mouseAbs;
extern bool g_mouseGrabbed;
extern bool g_mouseEnabled;
extern bool g_mouseInsideWindow;
extern bool g_mouseLockedToWindow;
// joystick

View file

@ -1783,8 +1783,8 @@ int32_t handleevents_sdlcommon(SDL_Event *ev)
if (j < 0)
break;
event_t ev = { (ev->button.state == SDL_PRESSED)? EV_KeyDown : EV_KeyUp, 0, j};
D_PostEvent(ev);
event_t evt = { (ev->button.state == SDL_PRESSED)? EV_KeyDown : EV_KeyUp, 0, j};
D_PostEvent(&evt);
break;
}
@ -1867,7 +1867,9 @@ int32_t handleevents_sdlcommon(SDL_Event *ev)
// Argh. This is just gross.
int scancodetoasciihack(SDL_Event &ev)
{
int sc = ev.key.keysym.scancode;
SDL_Keycode keyvalue = ev.key.keysym.sym;
int code = keytranslation[sc];
// Modifiers that have to be held down to be effective
// (excludes KMOD_NUM, for example).
static const int MODIFIERS =

View file

@ -5,9 +5,13 @@
#include "scancodes.h"
#include "c_bind.h"
#include "d_event.h"
#include "osd.h"
extern char appactive;
typedef uint8_t kb_scancode;
typedef struct
{
const char* key;
@ -28,6 +32,14 @@ enum
extern int32_t CONTROL_ButtonFlags[NUMKEYS];
extern bool CONTROL_BindsEnabled;
extern vec2_t g_mousePos;
extern vec2_t g_mouseAbs;
extern bool g_mouseGrabbed;
extern bool g_mouseEnabled;
extern bool g_mouseInsideWindow;
extern bool g_mouseLockedToWindow;
// Order is that of EDuke32 by necessity because it exposes the key binds to scripting by index instead of by name.
enum GameFunction_t
{
@ -297,7 +309,7 @@ public:
void keyFlushScans(void)
{
Bmemset(&g_keyFIFO, 0, sizeof(g_keyFIFO));
memset(&g_keyFIFO, 0, sizeof(g_keyFIFO));
g_keyFIFOpos = g_keyFIFOend = 0;
}
@ -323,7 +335,7 @@ public:
void keyFlushChars(void)
{
Bmemset(&g_keyAsciiFIFO, 0, sizeof(g_keyAsciiFIFO));
memset(&g_keyAsciiFIFO, 0, sizeof(g_keyAsciiFIFO));
g_keyAsciiPos = g_keyAsciiEnd = 0;
}
@ -412,9 +424,10 @@ public:
}
return 0;
}
static inline int32_t MouseGetButtons(void) { return mouseReadButtons(); }
static inline void MouseClearButton(int32_t b) { g_mouseBits &= ~b; }
static inline void MouseClearAllButtonss(void) { g_mouseBits = 0; }
int32_t MouseGetButtons(void) { return mouseReadButtons(); }
inline void MouseClearButton(int32_t b) { g_mouseBits &= ~b; }
inline void MouseClearAllButtonss(void) { g_mouseBits = 0; }
};

View file

@ -5708,7 +5708,6 @@ void G_Shutdown(void)
S_SoundShutdown();
S_MusicShutdown();
CONTROL_Shutdown();
KB_Shutdown();
engineUnInit();
G_Cleanup();
OSD_Cleanup();

View file

@ -7060,7 +7060,7 @@ void M_DisplayMenus(void)
m_mousewake_watchpoint = 1;
#endif
if (MOUSEACTIVECONDITIONAL(mouseAdvanceClickState()) || m_mousepos.x != m_prevmousepos.x || m_mousepos.y != m_prevmousepos.y)
if (MOUSEACTIVECONDITIONAL(inputState.mouseAdvanceClickState()) || m_mousepos.x != m_prevmousepos.x || m_mousepos.y != m_prevmousepos.y)
{
m_prevmousepos = m_mousepos;
m_mouselastactivity = (int32_t) totalclock;

View file

@ -78,7 +78,7 @@ void GLInstance::Init()
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &glinfo.maxanisotropy);
if (!glinfo.dumped)
{
osdcmd_glinfo(NULL);
//osdcmd_glinfo(NULL);
glinfo.dumped = 1;
}
new(&renderState) PolymostRenderState; // reset to defaults.

View file

@ -7075,7 +7075,6 @@ void G_Shutdown(void)
S_SoundShutdown();
S_MusicShutdown();
CONTROL_Shutdown();
KB_Shutdown();
G_SetFog(0);
engineUnInit();
G_Cleanup();

View file

@ -7540,7 +7540,7 @@ void M_DisplayMenus(void)
m_mousewake_watchpoint = 1;
#endif
if (MOUSEACTIVECONDITIONAL(mouseAdvanceClickState()) || m_mousepos.x != m_prevmousepos.x || m_mousepos.y != m_prevmousepos.y)
if (MOUSEACTIVECONDITIONAL(inputState.mouseAdvanceClickState()) || m_mousepos.x != m_prevmousepos.x || m_mousepos.y != m_prevmousepos.y)
{
m_prevmousepos = m_mousepos;
m_mouselastactivity = (int32_t) totalclock;

View file

@ -662,10 +662,6 @@ TerminateGame(void)
//TenScreen();
}
////--->>>> sound stuff was there
//uninitkeys();
KB_Shutdown();
engineUnInit();
G_SaveConfig();
@ -774,7 +770,6 @@ void MultiSharewareCheck(void)
//uninitmultiplayers();
//uninitkeys();
G_SaveConfig();
KB_Shutdown();
engineUnInit();
UnInitSound();
timerUninit();