From 1aaf24652726e1e7fa43618c68c438dab4f693e0 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 19 Feb 2017 22:15:29 +0000 Subject: [PATCH] Limit what startwin.game.cpp needs to include. git-svn-id: https://svn.eduke32.com/eduke32@6063 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/game.h | 31 ++++++++++++++++++++--------- source/duke3d/src/startwin.game.cpp | 12 ++++++++--- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/source/duke3d/src/game.h b/source/duke3d/src/game.h index e07a77693..6d21524cf 100644 --- a/source/duke3d/src/game.h +++ b/source/duke3d/src/game.h @@ -25,25 +25,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef game_h_ #define game_h_ +#ifndef ONLY_USERDEFS #include "premap.h" // XXX +#endif #ifdef __cplusplus extern "C" { #endif +#ifndef ONLY_USERDEFS + // Compile game-side legacy Room over Room code? #define LEGACY_ROR 1 #define USERQUOTE_LEFTOFFSET 5 #define USERQUOTE_RIGHTOFFSET 14 -#define MAXRIDECULE 10 -#define MAXRIDECULELENGTH 40 -#define MAXSAVEGAMES 10 -#define MAXSAVEGAMENAME 22 -#define MAXPWLOCKOUT 128 -#define MAXRTSNAME 128 - #if defined(GEKKO) || defined(__OPENDINGUX__) # define VIEWSCREENFACTOR 0 #elif defined(__ANDROID__) @@ -128,6 +125,15 @@ extern camera_t g_camera; # define CAMERACLOCK g_cameraClock #endif +#endif + +#define MAXRIDECULE 10 +#define MAXRIDECULELENGTH 40 +#define MAXSAVEGAMES 10 +#define MAXSAVEGAMENAME 22 +#define MAXPWLOCKOUT 128 +#define MAXRTSNAME 128 + // KEEPINSYNC lunatic/_defs_game.lua typedef struct { #if !defined LUNATIC @@ -234,6 +240,9 @@ typedef struct { char wchoice[MAX_WEAPONS]; } user_defs; +extern user_defs ud; + +#ifndef ONLY_USERDEFS // this is checked against http://eduke32.com/VERSION extern const char *s_buildDate; @@ -286,8 +295,6 @@ extern palette_t DefaultCrosshairColors; extern uint32_t g_frameDelay; -extern user_defs ud; - int32_t A_CheckInventorySprite(spritetype *s); int32_t A_InsertSprite(int16_t whatsect, int32_t s_x, int32_t s_y, int32_t s_z, int16_t s_pn, int8_t s_s, uint8_t s_xr, uint8_t s_yr, int16_t s_a, int16_t s_ve, int16_t s_zv, int16_t s_ow, int16_t s_ss); @@ -520,10 +527,14 @@ EXTERN_INLINE_HEADER void G_SetStatusBarScale(int32_t sc); EXTERN_INLINE_HEADER void SetIfGreater(int32_t *variable, int32_t potentialValue); +#endif + #ifdef __cplusplus } #endif +#ifndef ONLY_USERDEFS + #if defined game_c_ || !defined DISABLE_INLINING EXTERN_INLINE void G_SetStatusBarScale(int32_t sc) @@ -543,3 +554,5 @@ EXTERN_INLINE void SetIfGreater(int32_t *variable, int32_t potentialValue) #endif #endif + +#endif diff --git a/source/duke3d/src/startwin.game.cpp b/source/duke3d/src/startwin.game.cpp index 38543d517..94847c9b6 100644 --- a/source/duke3d/src/startwin.game.cpp +++ b/source/duke3d/src/startwin.game.cpp @@ -29,9 +29,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifdef STARTUP_SETUP_WINDOW -#include "duke3d.h" - #include "build.h" +#include "cache1d.h" #include "grpscan.h" @@ -46,8 +45,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "startwin.game.h" +// for ud +#include "keyboard.h" +#include "control.h" +#include "_control.h" +#include "function.h" +#include "inv.h" +#define ONLY_USERDEFS #include "game.h" -#include "common.h" + #include "common_game.h" #define TAB_CONFIG 0