From e01c1612586fd69e12aa807b3ccbefd9f7787e24 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 1 Jan 2020 13:11:44 +0100 Subject: [PATCH] - removed some dead variables. --- source/blood/src/blood.cpp | 2 -- source/build/include/baselayer.h | 2 -- source/build/include/mmulti.h | 1 - source/build/src/engine.cpp | 1 - source/build/src/sdlayer.cpp | 15 --------------- source/common/console/d_event.cpp | 2 +- source/common/gamecvars.cpp | 7 ------- source/common/inputstate.cpp | 5 ----- source/common/inputstate.h | 2 -- source/sw/src/network.cpp | 1 - source/sw/src/sync.cpp | 3 --- 11 files changed, 1 insertion(+), 40 deletions(-) diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index ea3c3fd45..0254bfd8e 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -173,8 +173,6 @@ void ShutDown(void) sfxTerm(); scrUnInit(); // PORT_TODO: Check argument - if (syncstate) - printf("A packet was lost! (syncstate)\n"); DO_FREE_AND_NULL(pUserTiles); } diff --git a/source/build/include/baselayer.h b/source/build/include/baselayer.h index c1ecdfeb2..ff7713345 100644 --- a/source/build/include/baselayer.h +++ b/source/build/include/baselayer.h @@ -16,7 +16,6 @@ #include "zstring.h" #include "vectors.h" -extern char appactive; extern char modechange; extern int32_t swapcomplete; @@ -27,7 +26,6 @@ EXTERN_CVAR(Bool, r_usenewaspect) extern int32_t newaspect_enable; extern int32_t r_fpgrouscan; extern int32_t setaspect_new_use_dimen; -extern uint32_t r_screenxy; extern int32_t xres, yres, bpp, bytesperline, refreshfreq; extern intptr_t frameplace; extern char offscreenrendering; diff --git a/source/build/include/mmulti.h b/source/build/include/mmulti.h index 05d6d2f3f..1c5d2c5ea 100644 --- a/source/build/include/mmulti.h +++ b/source/build/include/mmulti.h @@ -13,7 +13,6 @@ extern int myconnectindex, numplayers; extern int connecthead, connectpoint2[MAXMULTIPLAYERS]; -extern unsigned char syncstate; #endif // mmulti_h_ diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index 16d637961..08f9c05df 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -138,7 +138,6 @@ static int32_t oxdimen = -1, oviewingrange = -1, oxyaspect = -1; // r_usenewaspect is the cvar, newaspect_enable to trigger the new behaviour in the code CVAR(Bool, r_usenewaspect, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG); int32_t newaspect_enable=0; -uint32_t r_screenxy = 0; int32_t r_fpgrouscan = 1; int32_t globalflags; diff --git a/source/build/src/sdlayer.cpp b/source/build/src/sdlayer.cpp index 8db2d66a5..f492945c6 100644 --- a/source/build/src/sdlayer.cpp +++ b/source/build/src/sdlayer.cpp @@ -43,23 +43,8 @@ double g_beforeSwapTime; GameInterface* gi; -void buildkeytranslationtable();; - int myconnectindex, numplayers; int connecthead, connectpoint2[MAXMULTIPLAYERS]; -unsigned char syncstate; - -/// These can be useful for debugging sometimes... -//#define SDL_WM_GrabInput(x) SDL_WM_GrabInput(SDL_GRAB_OFF) -//#define SDL_ShowCursor(x) SDL_ShowCursor(SDL_ENABLE) - -// undefine to restrict windowed resolutions to conventional sizes -#define ANY_WINDOWED_SIZE - -bool screenshot_requested; - -char appactive=1, novideo=0; - void ImGui_Init_Backend() { diff --git a/source/common/console/d_event.cpp b/source/common/console/d_event.cpp index c811167ba..4d4c5ff7f 100644 --- a/source/common/console/d_event.cpp +++ b/source/common/console/d_event.cpp @@ -132,7 +132,7 @@ void D_PostEvent (const event_t *ev) return; } - if (ev->type == EV_Mouse && GUICapture == 0 && appactive) + if (ev->type == EV_Mouse && GUICapture == 0) { inputState.MouseAddToPos(ev->x, -ev->y); return; diff --git a/source/common/gamecvars.cpp b/source/common/gamecvars.cpp index ddfeed8a0..3be788484 100644 --- a/source/common/gamecvars.cpp +++ b/source/common/gamecvars.cpp @@ -581,12 +581,5 @@ CVAR(String, m_netport, "19014", CVAR_NOSET) } */ - /* Baselayer CVARs. Some are pointless, some not worth bothering before the backend is swappewd out, the only relevant one was r_voxels. - static osdcvardata_t cvars_engine[] = - { - { "r_screenaspect","if using r_usenewaspect and in fullscreen, screen aspect ratio in the form XXYY, e.g. 1609 for 16:9", - (void *) &r_screenxy, SCREENASPECT_CVAR_TYPE, 0, 9999 }, - }; - */ #endif diff --git a/source/common/inputstate.cpp b/source/common/inputstate.cpp index d9c63aadf..470d5ce1b 100644 --- a/source/common/inputstate.cpp +++ b/source/common/inputstate.cpp @@ -47,11 +47,6 @@ int GUICapture = false; void InputState::GetMouseDelta(ControlInfo * info) { vec2_t input; - if (!appactive) - { - input = {0,0}; - return; - } input = g_mousePos; g_mousePos = {}; diff --git a/source/common/inputstate.h b/source/common/inputstate.h index 74ced29db..57e8cb937 100644 --- a/source/common/inputstate.h +++ b/source/common/inputstate.h @@ -10,8 +10,6 @@ #include "m_joy.h" #include "gamecvars.h" -extern char appactive; - typedef uint16_t kb_scancode; extern int GUICapture; diff --git a/source/sw/src/network.cpp b/source/sw/src/network.cpp index d4aefc507..8f1fabaa5 100644 --- a/source/sw/src/network.cpp +++ b/source/sw/src/network.cpp @@ -853,7 +853,6 @@ InitNetVars(void) predictmovefifoplc = 0; memset(&syncstat, 0, sizeof(syncstat)); - syncstate = 0; memset(sync_first, 0, sizeof(sync_first)); sync_found = FALSE; diff --git a/source/sw/src/sync.cpp b/source/sw/src/sync.cpp index 75e675d1c..dfd3c297f 100644 --- a/source/sw/src/sync.cpp +++ b/source/sw/src/sync.cpp @@ -412,9 +412,6 @@ SyncStatMessage(void) } } } - - if (syncstate != 0) - Printf(PRINT_NOTIFY, "Missed Network packet!", 0); }