From 75de29456051765e203d2ca975aa9fedd7820629 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 23 Mar 2023 17:41:01 +1100 Subject: [PATCH] - Exhumed: Clean out the rest of `input.cpp`. --- source/games/exhumed/all.cpp | 1 - source/games/exhumed/src/2d.cpp | 1 - source/games/exhumed/src/cheats.cpp | 7 ++++- source/games/exhumed/src/exhumed.cpp | 1 - source/games/exhumed/src/gameloop.cpp | 1 - source/games/exhumed/src/gun.cpp | 1 - source/games/exhumed/src/init.cpp | 1 - source/games/exhumed/src/input.cpp | 40 --------------------------- source/games/exhumed/src/input.h | 35 ----------------------- source/games/exhumed/src/items.cpp | 1 - source/games/exhumed/src/menu.cpp | 1 - source/games/exhumed/src/osdcmds.cpp | 1 - source/games/exhumed/src/player.cpp | 13 ++++++++- source/games/exhumed/src/ra.cpp | 1 - source/games/exhumed/src/ramses.cpp | 1 - source/games/exhumed/src/snake.cpp | 1 - 16 files changed, 18 insertions(+), 89 deletions(-) delete mode 100644 source/games/exhumed/src/input.cpp delete mode 100644 source/games/exhumed/src/input.h diff --git a/source/games/exhumed/all.cpp b/source/games/exhumed/all.cpp index 3e9827411..3aaf9ed8f 100644 --- a/source/games/exhumed/all.cpp +++ b/source/games/exhumed/all.cpp @@ -11,7 +11,6 @@ #include "src/grenade.cpp" #include "src/gun.cpp" #include "src/init.cpp" -#include "src/input.cpp" #include "src/items.cpp" #include "src/lavadude.cpp" #include "src/light.cpp" diff --git a/source/games/exhumed/src/2d.cpp b/source/games/exhumed/src/2d.cpp index ae58fba32..e4da78091 100644 --- a/source/games/exhumed/src/2d.cpp +++ b/source/games/exhumed/src/2d.cpp @@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "status.h" #include "sound.h" #include "names.h" -#include "input.h" #include "view.h" #include "raze_sound.h" #include "v_2ddrawer.h" diff --git a/source/games/exhumed/src/cheats.cpp b/source/games/exhumed/src/cheats.cpp index de96e2a14..a379fc2e4 100644 --- a/source/games/exhumed/src/cheats.cpp +++ b/source/games/exhumed/src/cheats.cpp @@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "sequence.h" #include "names.h" #include "player.h" -#include "input.h" #include "sound.h" #include "view.h" #include "status.h" @@ -42,6 +41,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_PS_NS +enum { + kButtonCheatGuns = 0x20, + kButtonCheatGodMode = 0x40, + kButtonCheatKeys = 0x80, + kButtonCheatItems = 0x100, +}; //--------------------------------------------------------------------------- // diff --git a/source/games/exhumed/src/exhumed.cpp b/source/games/exhumed/src/exhumed.cpp index f967ad942..f74e1eb7b 100644 --- a/source/games/exhumed/src/exhumed.cpp +++ b/source/games/exhumed/src/exhumed.cpp @@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "sequence.h" #include "names.h" #include "player.h" -#include "input.h" #include "sound.h" #include "view.h" #include "status.h" diff --git a/source/games/exhumed/src/gameloop.cpp b/source/games/exhumed/src/gameloop.cpp index c0531b6e5..4efa90642 100644 --- a/source/games/exhumed/src/gameloop.cpp +++ b/source/games/exhumed/src/gameloop.cpp @@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "sequence.h" #include "names.h" #include "player.h" -#include "input.h" #include "sound.h" #include "view.h" #include "status.h" diff --git a/source/games/exhumed/src/gun.cpp b/source/games/exhumed/src/gun.cpp index ca4c92cbd..c51c82251 100644 --- a/source/games/exhumed/src/gun.cpp +++ b/source/games/exhumed/src/gun.cpp @@ -23,7 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "view.h" #include "status.h" #include "sound.h" -#include "input.h" #include #include #include "v_2ddrawer.h" diff --git a/source/games/exhumed/src/init.cpp b/source/games/exhumed/src/init.cpp index 7cdcadaef..43b09edbf 100644 --- a/source/games/exhumed/src/init.cpp +++ b/source/games/exhumed/src/init.cpp @@ -23,7 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "engine.h" #include "sound.h" #include "exhumed.h" -#include "input.h" #include "mapinfo.h" #include "gamecontrol.h" #include "v_video.h" diff --git a/source/games/exhumed/src/input.cpp b/source/games/exhumed/src/input.cpp deleted file mode 100644 index 7c82e0d69..000000000 --- a/source/games/exhumed/src/input.cpp +++ /dev/null @@ -1,40 +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 "input.h" -#include "exhumed.h" -#include "player.h" -#include "status.h" -#include "view.h" -#include "razemenu.h" - -BEGIN_PS_NS - -//--------------------------------------------------------------------------- -// -// -// -//--------------------------------------------------------------------------- - -void ClearSpaceBar(int nPlayer) -{ - PlayerList[nPlayer].input.actions &= SB_OPEN; - buttonMap.ClearButton(gamefunc_Open); -} - -END_PS_NS diff --git a/source/games/exhumed/src/input.h b/source/games/exhumed/src/input.h deleted file mode 100644 index 5b445ad24..000000000 --- a/source/games/exhumed/src/input.h +++ /dev/null @@ -1,35 +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. -*/ -//------------------------------------------------------------------------- - -#pragma once - -#include "packet.h" - -BEGIN_PS_NS - -enum { - kButtonCheatGuns = 0x20, - kButtonCheatGodMode = 0x40, - kButtonCheatKeys = 0x80, - kButtonCheatItems = 0x100, -}; - -void ClearSpaceBar(int nPlayer); - -END_PS_NS - diff --git a/source/games/exhumed/src/items.cpp b/source/games/exhumed/src/items.cpp index b4857a399..abf2f64a9 100644 --- a/source/games/exhumed/src/items.cpp +++ b/source/games/exhumed/src/items.cpp @@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "sound.h" #include "status.h" #include "engine.h" -#include "input.h" #include "mapinfo.h" BEGIN_PS_NS diff --git a/source/games/exhumed/src/menu.cpp b/source/games/exhumed/src/menu.cpp index 6b5fc5b76..375ef0ffd 100644 --- a/source/games/exhumed/src/menu.cpp +++ b/source/games/exhumed/src/menu.cpp @@ -27,7 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "status.h" #include "sound.h" #include "names.h" -#include "input.h" #include "view.h" #include "raze_sound.h" #include "v_2ddrawer.h" diff --git a/source/games/exhumed/src/osdcmds.cpp b/source/games/exhumed/src/osdcmds.cpp index 482824946..320ce9b94 100644 --- a/source/games/exhumed/src/osdcmds.cpp +++ b/source/games/exhumed/src/osdcmds.cpp @@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "view.h" #include "mapinfo.h" #include "aistuff.h" -#include "input.h" #include "cheathandler.h" #include "gamestate.h" #include "gamefuncs.h" diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index 9746b3dc3..25f2fb647 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -23,7 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "engine.h" #include "sequence.h" #include "view.h" -#include "input.h" #include "status.h" #include "sound.h" #include "sound.h" @@ -872,6 +871,18 @@ bool CheckMovingBlocks(int nPlayer, Collision& nMove, DVector3& spr_pos, sectort return false; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + +static void ClearSpaceBar(int nPlayer) +{ + PlayerList[nPlayer].input.actions &= SB_OPEN; + buttonMap.ClearButton(gamefunc_Open); +} + //--------------------------------------------------------------------------- // // this function is pure spaghetti madness... :( diff --git a/source/games/exhumed/src/ra.cpp b/source/games/exhumed/src/ra.cpp index b6d2ef290..363598d45 100644 --- a/source/games/exhumed/src/ra.cpp +++ b/source/games/exhumed/src/ra.cpp @@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "exhumed.h" #include "player.h" #include "sequence.h" -#include "input.h" #include BEGIN_PS_NS diff --git a/source/games/exhumed/src/ramses.cpp b/source/games/exhumed/src/ramses.cpp index 3a84319bc..9b56f25a9 100644 --- a/source/games/exhumed/src/ramses.cpp +++ b/source/games/exhumed/src/ramses.cpp @@ -25,7 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "aistuff.h" #include "player.h" #include "mapinfo.h" -#include "input.h" BEGIN_PS_NS diff --git a/source/games/exhumed/src/snake.cpp b/source/games/exhumed/src/snake.cpp index 27ca006e4..bf55c7fed 100644 --- a/source/games/exhumed/src/snake.cpp +++ b/source/games/exhumed/src/snake.cpp @@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "status.h" #include "player.h" #include "sequence.h" -#include "input.h" #include "sound.h" #include #include