From cbd659b3b0ca4326102067a57e881fc1df1e58a8 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 7 Feb 2016 02:38:08 +0000 Subject: [PATCH] Minor cleanup git-svn-id: https://svn.eduke32.com/eduke32@5612 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/config.c | 100 +----------------------- polymer/eduke32/source/gamestructures.c | 5 -- polymer/eduke32/source/menus.c | 1 + polymer/eduke32/source/osdcmds.c | 16 +--- 4 files changed, 4 insertions(+), 118 deletions(-) diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 324a72e58..6b7479a52 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -1,6 +1,6 @@ //------------------------------------------------------------------------- /* -Copyright (C) 2010 EDuke32 developers and contributors +Copyright (C) 2016 EDuke32 developers and contributors This file is part of EDuke32. @@ -20,25 +20,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -/* -#include -#include -#include -#include -#include -*/ - -#include "baselayer.h" #include "duke3d.h" -#include "game.h" -#include "common_game.h" #include "scriplib.h" -#include "osd.h" #include "osdcmds.h" -#include "osdfuncs.h" -#ifdef _WIN32 -#include "winlayer.h" -#endif #ifdef __ANDROID__ #include "android.h" @@ -50,14 +34,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #define __SETUP__ // JBF 20031211 #include "_functio.h" -/* -=================== -= -= CONFIG_FunctionNameToNum -= -=================== -*/ - hashtable_t h_gamefuncs = { NUMGAMEFUNCTIONS<<1, NULL }; int32_t CONFIG_FunctionNameToNum(const char *func) @@ -81,13 +57,6 @@ int32_t CONFIG_FunctionNameToNum(const char *func) return i; } -/* -=================== -= -= CONFIG_FunctionNumToName -= -=================== -*/ char *CONFIG_FunctionNumToName(int32_t func) { @@ -96,14 +65,6 @@ char *CONFIG_FunctionNumToName(int32_t func) return gamefunctions[func]; } -/* -=================== -= -= CONFIG_AnalogNameToNum -= -=================== -*/ - int32_t CONFIG_AnalogNameToNum(const char *func) { @@ -149,14 +110,6 @@ const char *CONFIG_AnalogNumToName(int32_t func) } -/* -=================== -= -= CONFIG_SetDefaults -= -=================== -*/ - void CONFIG_SetDefaultKeys(const char (*keyptr)[MAXGAMEFUNCLEN]) { int32_t i,f; @@ -409,13 +362,6 @@ void CONFIG_MapKey(int32_t which, kb_scancode key1, kb_scancode oldkey1, kb_scan } } -/* -=================== -= -= CONFIG_SetupMouse -= -=================== -*/ void CONFIG_SetupMouse(void) { @@ -486,13 +432,6 @@ void CONFIG_SetupMouse(void) } } -/* -=================== -= -= CONFIG_SetupJoystick -= -=================== -*/ void CONFIG_SetupJoystick(void) { @@ -567,21 +506,6 @@ void CONFIG_SetupJoystick(void) } } -/* -=================== -= -= CONFIG_ReadSetup -= -=================== -*/ -extern void G_CheckPlayerColor(int32_t *color,int32_t prev_color); -extern palette_t CrosshairColors; -extern palette_t DefaultCrosshairColors; -extern char g_modDir[BMAX_PATH]; -extern int32_t r_maxfps; -extern int32_t g_noSetup; -extern int32_t demorec_diffs_cvar, demoplay_diffs; -extern int32_t demorec_difftics_cvar, demorec_diffcompress_cvar, demorec_synccompress_cvar; int32_t CONFIG_ReadSetup(void) { @@ -629,7 +553,6 @@ int32_t CONFIG_ReadSetup(void) } Bmemset(tempbuf, 0, sizeof(tempbuf)); -// Bmemset(dummybuf, 0, sizeof(dummybuf)); SCRIPT_GetString(ud.config.scripthandle, "Comm Setup","PlayerName",&tempbuf[0]); while (Bstrlen(OSD_StripColors(dummybuf,tempbuf)) > 10) @@ -697,14 +620,6 @@ int32_t CONFIG_ReadSetup(void) else glrendmode = REND_POLYMOST; #endif - /* - - SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Color",&ud.color); - G_CheckPlayerColor((int32_t *)&ud.color,-1); - g_player[0].ps->palookup = g_player[0].pcolor = ud.color; - tempbuf[0] = 0; - */ - SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Executions",&ud.executions); #ifdef _WIN32 @@ -714,19 +629,10 @@ int32_t CONFIG_ReadSetup(void) } - //CONFIG_SetupMouse(ud.config.scripthandle); - //CONFIG_SetupJoystick(ud.config.scripthandle); ud.config.setupread = 1; return 0; } -/* -=================== -= -= CONFIG_WriteSetup -= -=================== -*/ void CONFIG_WriteSettings(void) // save binds and aliases to _settings.cfg { @@ -1023,7 +929,3 @@ int32_t CONFIG_SetMapBestTime(uint8_t const * const mapmd4, int32_t const tm) return 0; } -/* - * vim:ts=4:sw=4: - */ - diff --git a/polymer/eduke32/source/gamestructures.c b/polymer/eduke32/source/gamestructures.c index 853854252..9e9fb11a5 100644 --- a/polymer/eduke32/source/gamestructures.c +++ b/polymer/eduke32/source/gamestructures.c @@ -20,11 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -/* -#include "duke3d.h" -#include "gamedef.h" -#include "osd.h" -*/ // this is all the crap for accessing the game's structs through the CON VM // I got a 3-4 fps gain by inlining these... diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index f87b60a1d..9d6e5c6ed 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "xxhash.h" #include "input.h" #include "menus.h" +#include "cheats.h" #include diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index c4ace2afd..e8822e21e 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -20,24 +20,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#include "compat.h" -#include "osdcmds.h" -#include "baselayer.h" #include "duke3d.h" -#include "game.h" -#include "net.h" -#include "premap.h" +#include "osdcmds.h" #include "menus.h" -#include "osd.h" #include "osdfuncs.h" -#include "gamedef.h" #include "demo.h" // g_firstDemoFile[] -#include "common.h" - -#include -#include -#include -#include "enet/enet.h" +#include "cheats.h" #ifdef LUNATIC # include "lunatic_game.h"