diff --git a/source/sw/CMakeLists.txt b/source/sw/CMakeLists.txt index 23bd2cb7b..fd7ddc1bc 100644 --- a/source/sw/CMakeLists.txt +++ b/source/sw/CMakeLists.txt @@ -9,7 +9,6 @@ set( PCH_SOURCES src/cache.cpp src/cheats.cpp src/colormap.cpp - src/common.cpp src/config.cpp src/console.cpp src/coolg.cpp diff --git a/source/sw/src/anim.cpp b/source/sw/src/anim.cpp index f1c8799e6..59de21b9f 100644 --- a/source/sw/src/anim.cpp +++ b/source/sw/src/anim.cpp @@ -44,7 +44,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "v_2ddrawer.h" #include "animtexture.h" -#include "common_game.h" BEGIN_SW_NS diff --git a/source/sw/src/border.cpp b/source/sw/src/border.cpp index 140539afe..1c2354f55 100644 --- a/source/sw/src/border.cpp +++ b/source/sw/src/border.cpp @@ -31,7 +31,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "panel.h" #include "lists.h" #include "game.h" -#include "common_game.h" #include "network.h" #include "misc.h" #include "menus.h" diff --git a/source/sw/src/cache.cpp b/source/sw/src/cache.cpp index 98aa00cd7..296b808ea 100644 --- a/source/sw/src/cache.cpp +++ b/source/sw/src/cache.cpp @@ -35,7 +35,6 @@ not load" error messages. #include "names2.h" #include "game.h" #include "tags.h" -#include "common_game.h" #include "break.h" #include "quake.h" #include "pal.h" diff --git a/source/sw/src/colormap.cpp b/source/sw/src/colormap.cpp index cdffc80cf..ea4716ece 100644 --- a/source/sw/src/colormap.cpp +++ b/source/sw/src/colormap.cpp @@ -30,8 +30,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "pal.h" #include "game.h" -#include "common_game.h" - BEGIN_SW_NS short f_c = 3; diff --git a/source/sw/src/common.cpp b/source/sw/src/common.cpp deleted file mode 100644 index 5ee30c35c..000000000 --- a/source/sw/src/common.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "ns.h" - -#include "build.h" - -#include "common.h" -#include "common_game.h" - -BEGIN_SW_NS - -void SW_InitMultiPsky(void) -{ - // default - psky_t * const defaultsky = tileSetupSky(DEFAULTPSKY); - defaultsky->lognumtiles = 1; - defaultsky->horizfrac = 8192; -} - -void SW_CleanupSearchPaths() -{ -} - -void SW_ExtInit() -{ - -} -END_SW_NS diff --git a/source/sw/src/common_game.h b/source/sw/src/common_game.h deleted file mode 100644 index 6b4b207b3..000000000 --- a/source/sw/src/common_game.h +++ /dev/null @@ -1,146 +0,0 @@ -//------------------------------------------------------------------------- -/* -Copyright (C) 1997, 2005 - 3D Realms Entertainment - -This file is part of Shadow Warrior version 1.2 - -Shadow Warrior is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -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. - -Original Source: 1997 - Frank Maddin and Jim Norwood -Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms -*/ -//------------------------------------------------------------------------- - -//**************************************************************************** -// -// common_game.h -// -// common defines for the setup program -// -//**************************************************************************** - -#ifndef common_public_ -#define common_public_ -BEGIN_SW_NS - -//**************************************************************************** -// -// DEFINES -// -//**************************************************************************** - -// -// Color Defines -// - -#define MENUBACK_FOREGROUND COLOR_BLACK -#define MENUBACK_BACKGROUND COLOR_DARKGRAY - -#define MENUBACKBORDER_FOREGROUND COLOR_BLACK -#define MENUBACKBORDER_BACKGROUND COLOR_GRAY - -#define MENU_ACTIVE_FOREGROUND COLOR_WHITE -#define MENU_INACTIVE_FOREGROUND COLOR_GRAY -#define MENU_DISPLAY_FOREGROUND COLOR_LIGHTGREEN - -#define MENU_SECTIONHEADER_FOREGROUND COLOR_YELLOW - -// -// Setup program defines -// - -#define SETUPPROGRAMNAME ("Shadow Warrior Setup") -#define SETUPPROGRAMVERSION ("1.2") - -#define MENUFOOTER "Esc Exits  Move ΔΩ Selects\0" - -#define COMMITLAUNCHER ("COMMIT.EXE") -#define COMMITFILENAME ("COMMIT.DAT") - -#define MAXVOICES 32 -#define SONGNAME ("Shadow Warrior Theme Song") -//#define SOUNDSETUPLAUNCHER ("SNDSETUP.EXE") - -// Default Socket Number - -#define DEFAULTSOCKETNUMBER 0x8849 - -// Default RTS file - -#define DEFAULTRTSFILE "sw.rts" - -// Default RTS path - -#define DEFAULTRTSPATH ".\\" - -// Default UserLevel path - -#define DEFAULTLEVELPATH ".\\" - -// Default External Control file - -#define DEFAULTCONTROLFILE "EXTERNAL.EXE" - -// Default Help file - -#define DEFAULTHELPFILE "SWHELP.EXE" - -// RTS extension - -#define RTSEXTENSION "RTS" - -// MAP extension - -#define MAPEXTENSION "MAP" - -// Default Player name - -#define DEFAULTPLAYERNAME "KATO" - -// Default Macros - -#define MACRO1 "Burn baby burn..." -#define MACRO2 "You make another stupid move." -#define MACRO3 "Blocking with your head again?" -#define MACRO4 "You not fight well with hands!" -#define MACRO5 "You so stupid!" -#define MACRO6 "Quit jerking off. Come fight me!" -#define MACRO7 "What the matter you scaredy cat?" -#define MACRO8 "Did I break your concentration?" -#define MACRO9 "Hope you were paying attention." -#define MACRO10 "ITTAIIIUUU!!!" - -extern int g_useCwd; - -void SW_InitMultiPsky(void); - -void SW_ExtPreInit(int32_t argc, char const * const * argv); -void SW_ExtInit(void); - - - - -typedef enum basepal_ { - BASEPAL = 0, - DREALMSPAL, - TITLEPAL, - TENPAL, - ANIMPAL, - BASEPALCOUNT -} basepal_t; - -END_SW_NS -#endif diff --git a/source/sw/src/config.cpp b/source/sw/src/config.cpp index f28511444..7eb35ddf3 100644 --- a/source/sw/src/config.cpp +++ b/source/sw/src/config.cpp @@ -34,7 +34,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "gamedefs.h" #include "gamecontrol.h" #include "sounds.h" -#include "common_game.h" // we load this in to get default button and key assignments // as well as setting up function mappings diff --git a/source/sw/src/console.cpp b/source/sw/src/console.cpp index aacfc80c2..dc2ed4dac 100644 --- a/source/sw/src/console.cpp +++ b/source/sw/src/console.cpp @@ -41,7 +41,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "lists.h" #include "quake.h" -#include "common_game.h" #include "gamecontrol.h" #include "menus.h" diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 94a8c3b65..44ab69020 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -83,7 +83,6 @@ Things required to make savegames work: #include "jsector.h" #include "common.h" -#include "common_game.h" #include "gameconfigfile.h" #include "printf.h" #include "m_argv.h" @@ -538,6 +537,19 @@ void AnimateCacheCursor(void) static int firstnet = 0; // JBF +typedef enum basepal_ { + BASEPAL = 0, + DREALMSPAL, +} basepal_t; + + +void SW_InitMultiPsky(void) +{ + // default + psky_t* const defaultsky = tileSetupSky(DEFAULTPSKY); + defaultsky->lognumtiles = 1; + defaultsky->horizfrac = 8192; +} bool InitGame() { @@ -552,6 +564,8 @@ bool InitGame() InitAutoNet(); + + { auto pal = fileSystem.LoadFile("3drealms.pal", 0); if (pal.Size() >= 768) @@ -2462,7 +2476,6 @@ int32_t GameInterface::app_main() buttonMap.SetButtons(actions, NUM_ACTIONS); automapping = 1; BorderAdjust = true; - SW_ExtInit(); CONFIG_ReadSetup(); diff --git a/source/sw/src/jplayer.cpp b/source/sw/src/jplayer.cpp index f2830f730..3f0181b79 100644 --- a/source/sw/src/jplayer.cpp +++ b/source/sw/src/jplayer.cpp @@ -39,7 +39,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "lists.h" #include "quake.h" -#include "common_game.h" #include "gamecontrol.h" #include "menus.h" diff --git a/source/sw/src/jweapon.cpp b/source/sw/src/jweapon.cpp index b32eb71fd..961fe24f0 100644 --- a/source/sw/src/jweapon.cpp +++ b/source/sw/src/jweapon.cpp @@ -32,7 +32,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "panel.h" #include "misc.h" #include "tags.h" -#include "common_game.h" #include "break.h" #include "quake.h" #include "network.h" diff --git a/source/sw/src/panel.cpp b/source/sw/src/panel.cpp index be2bf73f9..8c99a2a08 100644 --- a/source/sw/src/panel.cpp +++ b/source/sw/src/panel.cpp @@ -34,7 +34,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "panel.h" #include "lists.h" #include "misc.h" -#include "common_game.h" #include "network.h" #include "pal.h" #include "player.h" diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index 94c69eaaa..2d914ece9 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -37,7 +37,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "lists.h" #include "quake.h" -#include "common_game.h" #include "gamecontrol.h" #include "menus.h" diff --git a/source/sw/src/quake.cpp b/source/sw/src/quake.cpp index a007bcf61..53304c8b5 100644 --- a/source/sw/src/quake.cpp +++ b/source/sw/src/quake.cpp @@ -33,7 +33,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "names2.h" #include "game.h" #include "tags.h" -#include "common_game.h" #include "break.h" #include "quake.h" #include "sprite.h" diff --git a/source/sw/src/sector.cpp b/source/sw/src/sector.cpp index 081a51326..c6b5daec1 100644 --- a/source/sw/src/sector.cpp +++ b/source/sw/src/sector.cpp @@ -42,7 +42,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "break.h" #include "misc.h" #include "sprite.h" -#include "common_game.h" #include "light.h" #include "gstrings.h" #include "secrets.h" diff --git a/source/sw/src/text.cpp b/source/sw/src/text.cpp index 4375588df..dcb17c3f0 100644 --- a/source/sw/src/text.cpp +++ b/source/sw/src/text.cpp @@ -31,7 +31,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "panel.h" #include "lists.h" #include "game.h" -#include "common_game.h" #include "pal.h" #include "misc.h" #include "menus.h" diff --git a/source/sw/src/vis.cpp b/source/sw/src/vis.cpp index 5f00c8544..094763701 100644 --- a/source/sw/src/vis.cpp +++ b/source/sw/src/vis.cpp @@ -31,7 +31,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "names2.h" #include "game.h" #include "tags.h" -#include "common_game.h" #include "break.h" #include "quake.h" #include "pal.h" diff --git a/source/sw/src/wallmove.cpp b/source/sw/src/wallmove.cpp index 9a4481421..2599edbf0 100644 --- a/source/sw/src/wallmove.cpp +++ b/source/sw/src/wallmove.cpp @@ -29,7 +29,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "names2.h" #include "game.h" #include "tags.h" -#include "common_game.h" #include "weapon.h" #include "sprite.h" diff --git a/source/sw/src/weapon.cpp b/source/sw/src/weapon.cpp index a887841c9..1133dcf16 100644 --- a/source/sw/src/weapon.cpp +++ b/source/sw/src/weapon.cpp @@ -33,7 +33,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "interp.h" #include "interpso.h" #include "tags.h" -#include "common_game.h" #include "break.h" #include "quake.h" #include "network.h"