From 7fd86c8640de726b636ac82d314e7ec058136196 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 26 Dec 2019 18:36:07 +0100 Subject: [PATCH] - config.cpp was also free of actual content. --- source/exhumed/CMakeLists.txt | 1 - source/exhumed/src/config.cpp | 66 ----------- source/exhumed/src/config.h | 47 -------- source/exhumed/src/d_menu.cpp | 1 - source/exhumed/src/exhumed.cpp | 6 - source/exhumed/src/init.cpp | 1 - source/exhumed/src/input.cpp | 1 - source/exhumed/src/osdcmds.cpp | 1 - source/exhumed/src/player.cpp | 197 --------------------------------- source/exhumed/src/sound.cpp | 1 - source/exhumed/src/view.cpp | 1 - 11 files changed, 323 deletions(-) delete mode 100644 source/exhumed/src/config.cpp delete mode 100644 source/exhumed/src/config.h diff --git a/source/exhumed/CMakeLists.txt b/source/exhumed/CMakeLists.txt index 33b8a7db3..3244e6b54 100644 --- a/source/exhumed/CMakeLists.txt +++ b/source/exhumed/CMakeLists.txt @@ -41,7 +41,6 @@ set( PCH_SOURCES src/bubbles.cpp src/bullet.cpp src/cd.cpp - src/config.cpp src/enginesubs.cpp src/exhumed.cpp src/exscript.cpp diff --git a/source/exhumed/src/config.cpp b/source/exhumed/src/config.cpp deleted file mode 100644 index 866cde0d2..000000000 --- a/source/exhumed/src/config.cpp +++ /dev/null @@ -1,66 +0,0 @@ -//------------------------------------------------------------------------- -/* -Copyright (C) 2010-2019 EDuke32 developers and contributors -Copyright (C) 2019 sirlemonhead, Nuke.YKT -This file is part of PCExhumed. -PCExhumed is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License version 2 -as published by the Free Software Foundation. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ -//------------------------------------------------------------------------- - -#include "ns.h" -#include "compat.h" -#include "renderlayer.h" -#include "build.h" -#include "exhumed.h" -#include "typedefs.h" -#include "view.h" - -#include "config.h" - -#include -//#include -#include -#include - -BEGIN_PS_NS - - - -ud_setup_t gSetup; - -int lMouseSens = 32; -unsigned int dword_1B82E0 = 0; - -int32_t FXVolume; -int32_t MusicVolume; -int32_t MidiPort; -int32_t NumBits; -int32_t ReverseStereo; -int32_t MusicDevice; -int32_t FXDevice; -int32_t ControllerType; - -int32_t setupread; -// TODO: implement precaching toggle -int32_t useprecache; - -int CONFIG_ReadSetup(void) -{ - - // currently settings.cfg is only read after the startup window launches the game, - // and rereading binds might be fickle so just enable this - - NumBits = 16; - return 0; -} - -END_PS_NS \ No newline at end of file diff --git a/source/exhumed/src/config.h b/source/exhumed/src/config.h deleted file mode 100644 index 022212bd1..000000000 --- a/source/exhumed/src/config.h +++ /dev/null @@ -1,47 +0,0 @@ -//------------------------------------------------------------------------- -/* -Copyright (C) 2010-2019 EDuke32 developers and contributors -Copyright (C) 2019 sirlemonhead, Nuke.YKT -This file is part of PCExhumed. -PCExhumed is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License version 2 -as published by the Free Software Foundation. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ -//------------------------------------------------------------------------- - -#ifndef __config_h__ -#define __config_h__ - -#include "compat.h" -#include "gamecontrol.h" - -BEGIN_PS_NS - - - -typedef struct { - int32_t fullscreen; - int32_t xdim; - int32_t ydim; - int32_t bpp; -} ud_setup_t; - - -extern int lMouseSens; - -extern ud_setup_t gSetup; -extern int32_t setupread; - - -int CONFIG_ReadSetup(void); - -END_PS_NS - -#endif diff --git a/source/exhumed/src/d_menu.cpp b/source/exhumed/src/d_menu.cpp index db313ffa2..dee1db491 100644 --- a/source/exhumed/src/d_menu.cpp +++ b/source/exhumed/src/d_menu.cpp @@ -30,7 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "version.h" -#include "config.h" #include "menu/menu.h" #include "../../glbackend/glbackend.h" diff --git a/source/exhumed/src/exhumed.cpp b/source/exhumed/src/exhumed.cpp index 244a360bd..8d0f9d028 100644 --- a/source/exhumed/src/exhumed.cpp +++ b/source/exhumed/src/exhumed.cpp @@ -36,7 +36,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "cd.h" #include "view.h" #include "status.h" -#include "config.h" #include "init.h" #include "ra.h" #include "version.h" @@ -1926,11 +1925,6 @@ int GameInterface::app_main() #endif -#ifdef STARTUP_SETUP_WINDOW - int const readSetup = -#endif - CONFIG_ReadSetup(); - PatchDemoStrings(); // loc_115F5: nItemTextIndex = FindGString("ITEMS"); diff --git a/source/exhumed/src/init.cpp b/source/exhumed/src/init.cpp index 8f665ad61..1ce724298 100644 --- a/source/exhumed/src/init.cpp +++ b/source/exhumed/src/init.cpp @@ -31,7 +31,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "engine.h" #include "sound.h" #include "exhumed.h" -#include "config.h" #include "items.h" #include "light.h" #include "map.h" diff --git a/source/exhumed/src/input.cpp b/source/exhumed/src/input.cpp index 1c9f35585..a499ecbad 100644 --- a/source/exhumed/src/input.cpp +++ b/source/exhumed/src/input.cpp @@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "player.h" #include "serial.h" #include "network.h" -#include "config.h" #include BEGIN_PS_NS diff --git a/source/exhumed/src/osdcmds.cpp b/source/exhumed/src/osdcmds.cpp index 6f7a7516a..e53348876 100644 --- a/source/exhumed/src/osdcmds.cpp +++ b/source/exhumed/src/osdcmds.cpp @@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "build.h" #include "common.h" #include "exhumed.h" -#include "config.h" #include "osdcmds.h" #include "view.h" diff --git a/source/exhumed/src/player.cpp b/source/exhumed/src/player.cpp index 286842762..0cef66fe7 100644 --- a/source/exhumed/src/player.cpp +++ b/source/exhumed/src/player.cpp @@ -34,7 +34,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "ps_input.h" #include "light.h" #include "status.h" -#include "config.h" #include "sound.h" #include "init.h" #include "move.h" @@ -284,202 +283,6 @@ void PlayerInterruptKeys() float horizAngle = atan2f(nVertPan[nLocalPlayer] - F16(92), F16(128)) * (512.f / fPI) + fix16_to_float(q16horz); nVertPan[nLocalPlayer] = fix16_clamp(F16(92) + Blrintf(F16(128) * tanf(horizAngle * (fPI / 512.f))), F16(0), F16(184)); -#if 0 - info.dyaw *= (lMouseSens >> 1) + 1; - - int nXVel, nYVel; - - inita &= kAngleMask; - - if (buttonMap.ButtonDown(gamefunc_Run)) - { - nXVel = Cos(inita) * 12; - nYVel = Sin(inita) * 12; - } - else - { - nXVel = Cos(inita) * 6; - nYVel = Sin(inita) * 6; - } - - // loc_18E60 - if (buttonMap.ButtonDown(gamefunc_Move_Forward)) - { - lPlayerXVel += nXVel; - lPlayerYVel += nYVel; - } - else if (buttonMap.ButtonDown(gamefunc_Move_Backward)) - { - lPlayerXVel -= nXVel; - lPlayerYVel -= nYVel; - } - if (info.mousey) - { - if (info.mousey < -6400) - { - info.mousey = -6400; - } - else if (info.mousey > 6400) - { - info.mousey = 6400; - } - - - int aimmode = true; - // This needs serious fixing - //if (mouseaiming) - //aimmode = buttonMap.ButtonDown(gamefunc_Mouseview); - /* - else - { - buttonMap.ClearButton(gamefunc_Mouseview); - aimmode = !aimmode; - }*/ - - // loc_18EE4 - if (aimmode) - { - fix16_t nVPan = nVertPan[nLocalPlayer] - fix16_from_int((info.mousey >> 7)); - - if (nVPan < F16(0)) - { - nVPan = F16(0); - } - else if (nVPan > F16(184)) - { - nVPan = F16(184); - } - - nVertPan[nLocalPlayer] = nVPan; - } - else - { - if (buttonMap.ButtonDown(gamefunc_Run)) - { - lPlayerXVel += Cos(inita) * ((-info.mousey) >> 7); - lPlayerYVel += Sin(inita) * ((-info.mousey) >> 7); - } - else - { - lPlayerXVel += Cos(inita) * ((-info.mousey) >> 8); - lPlayerYVel += Sin(inita) * ((-info.mousey) >> 8); - } - } - } - - // loc_18FD4 - if (buttonMap.ButtonDown(gamefunc_Strafe_Left)) - { - lPlayerXVel += nYVel / 4; - lPlayerYVel -= nXVel / 4; - } - else if (buttonMap.ButtonDown(gamefunc_Strafe_Right)) - { - lPlayerXVel -= nYVel / 4; - lPlayerYVel += nXVel / 4; - } - else - { - if (buttonMap.ButtonDown(gamefunc_Strafe)) - { - if (buttonMap.ButtonDown(gamefunc_Turn_Left)) - { - lPlayerXVel += nYVel; - lPlayerYVel -= nXVel; - } - else if (buttonMap.ButtonDown(gamefunc_Turn_Right)) - { - lPlayerXVel -= nYVel; - lPlayerYVel += nXVel; - } - else - { - if (buttonMap.ButtonDown(gamefunc_Run)) - { - lPlayerXVel -= Sin(inita) * (info.dyaw >> 5); - lPlayerYVel += Sin(inita + 512) * (info.dyaw >> 5); - } - else - { - lPlayerXVel -= Sin(inita) * (info.dyaw >> 7); - lPlayerYVel += Sin(inita + 512) * (info.dyaw >> 7); - } - } - } - else - { - // normal, non strafing movement - if (buttonMap.ButtonDown(gamefunc_Turn_Left)) - { - nPlayerDAng -= 2; - - if (buttonMap.ButtonDown(gamefunc_Run)) - { - if (nPlayerDAng < -12) - nPlayerDAng = -12; - } - else if (nPlayerDAng < -8) - { - nPlayerDAng = -8; - } - } - else if (buttonMap.ButtonDown(gamefunc_Turn_Right)) - { - nPlayerDAng += 2; - - if (buttonMap.ButtonDown(gamefunc_Run)) - { - if (nPlayerDAng > 12) - nPlayerDAng = 12; - } - else if (nPlayerDAng > 8) - { - nPlayerDAng = 8; - } - } - else - { - int nAng = info.dyaw >> 8; - - // loc_19201: - if (info.dyaw < 0) - { - if (nAng > -2) { - nAng = -2; - } - - nPlayerDAng = nAng; - } - else if (info.dyaw > 0) - { - if (nAng < 2) { - nAng = 2; - } - - nPlayerDAng = nAng; - } - } - } - } - - // loc_19231 - if (nPlayerDAng < 0) - { - nPlayerDAng++; - if (nPlayerDAng > 0) - nPlayerDAng = 0; - } - - if (nPlayerDAng > 0) - { - nPlayerDAng--; - if (nPlayerDAng < 0) - nPlayerDAng = 0; - } - - lPlayerXVel -= (lPlayerXVel >> 5) + (lPlayerXVel >> 6); - lPlayerYVel -= (lPlayerYVel >> 5) + (lPlayerYVel >> 6); -#endif } void RestoreSavePoint(int nPlayer, int *x, int *y, int *z, short *nSector, short *nAngle) diff --git a/source/exhumed/src/sound.cpp b/source/exhumed/src/sound.cpp index 531e5f3db..b25ef36eb 100644 --- a/source/exhumed/src/sound.cpp +++ b/source/exhumed/src/sound.cpp @@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "build.h" #include "engine.h" #include "exhumed.h" -#include "config.h" #include "sound.h" #include "init.h" #include "object.h" diff --git a/source/exhumed/src/view.cpp b/source/exhumed/src/view.cpp index 48c4fac40..8e4f45e41 100644 --- a/source/exhumed/src/view.cpp +++ b/source/exhumed/src/view.cpp @@ -18,7 +18,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "ns.h" #include "compat.h" #include "engine.h" -#include "config.h" #include "names.h" #include "view.h" #include "status.h"