From e513e1ceaed6e82493f70bff95c65024effd2561 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 18 Nov 2018 18:09:48 +0000 Subject: [PATCH] Cleanup includes git-svn-id: https://svn.eduke32.com/eduke32@7186 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/audiolib/include/fx_man.h | 2 +- source/build/include/build.h | 6 ++-- source/build/include/collections.h | 2 ++ source/build/include/common.h | 4 +-- source/build/include/compat.h | 16 +++++----- source/build/include/libdivide.h | 2 +- source/build/include/polymer.h | 6 ++-- source/build/include/polymost.h | 2 +- source/build/src/engine.cpp | 30 +++++++++---------- source/build/src/glbuild.cpp | 2 +- source/build/src/hash.cpp | 2 +- source/build/src/osd.cpp | 11 +++---- source/build/src/sdlayer.cpp | 32 ++++++++++---------- source/duke3d/src/anim.h | 3 ++ source/duke3d/src/cheats.h | 3 ++ source/duke3d/src/common_game.h | 1 + source/duke3d/src/config.h | 26 ++++++++-------- source/duke3d/src/demo.cpp | 5 ++-- source/duke3d/src/demo.h | 2 ++ source/duke3d/src/duke3d.h | 48 +++++++++++++++--------------- source/duke3d/src/game.h | 3 ++ source/duke3d/src/gamedef.cpp | 15 +++++----- source/duke3d/src/gamedef.h | 6 ++-- source/duke3d/src/gameexec.cpp | 7 ++--- source/duke3d/src/gameexec.h | 4 +-- source/duke3d/src/gamevars.h | 2 +- source/duke3d/src/global.h | 16 +++++----- source/duke3d/src/grpscan.cpp | 10 +++---- source/duke3d/src/macros.h | 2 ++ source/duke3d/src/menus.cpp | 10 +++---- source/duke3d/src/player.h | 2 +- source/duke3d/src/screens.cpp | 22 +++++++------- source/duke3d/src/sector.h | 5 ++-- 33 files changed, 154 insertions(+), 155 deletions(-) diff --git a/source/audiolib/include/fx_man.h b/source/audiolib/include/fx_man.h index 3febd12bb..a5bf51704 100644 --- a/source/audiolib/include/fx_man.h +++ b/source/audiolib/include/fx_man.h @@ -31,9 +31,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef FX_MAN_H_ #define FX_MAN_H_ +#include "drivers.h" #include "inttypes.h" #include "limits.h" -#include "drivers.h" #include "multivoc.h" #ifdef __cplusplus diff --git a/source/build/include/build.h b/source/build/include/build.h index bcb87ca7d..4906d8896 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -19,12 +19,12 @@ # error Visual Studio 2013 is the minimum supported version. #endif +#include "collections.h" #include "compat.h" -#include "pragmas.h" #include "glad/glad.h" #include "glbuild.h" #include "palette.h" -#include "collections.h" +#include "pragmas.h" #ifdef __cplusplus extern "C" { @@ -255,7 +255,7 @@ enum { //Make all variables in BUILD.H defined in the ENGINE, //and externed in GAME -#ifdef ENGINE +#ifdef engine_c_ # define EXTERN #else # define EXTERN extern diff --git a/source/build/include/collections.h b/source/build/include/collections.h index 4c759c56b..2684e2f8b 100644 --- a/source/build/include/collections.h +++ b/source/build/include/collections.h @@ -4,6 +4,8 @@ #ifndef collections_h_ #define collections_h_ +#include "compat.h" + #if CXXSTD >= 2011 || EDUKE32_MSVC_PREREQ(1800) // GrowArray - heap-allocated storage that can expand at runtime diff --git a/source/build/include/common.h b/source/build/include/common.h index 3e58da83d..475444aeb 100644 --- a/source/build/include/common.h +++ b/source/build/include/common.h @@ -7,10 +7,10 @@ #ifndef EDUKE32_COMMON_H_ #define EDUKE32_COMMON_H_ -#include "compat.h" -#include "scriptfile.h" #include "cache1d.h" +#include "compat.h" #include "pragmas.h" // klabs +#include "scriptfile.h" #ifdef __cplusplus diff --git a/source/build/include/compat.h b/source/build/include/compat.h index 8fe5bd678..9b1227bbb 100644 --- a/source/build/include/compat.h +++ b/source/build/include/compat.h @@ -388,25 +388,25 @@ defined __x86_64__ || defined __amd64__ || defined _M_X64 || defined _M_IA64 || #endif #if !defined _MSC_VER || defined __cplusplus -# include # include +# include #else # include "msvc/inttypes.h" // from http://code.google.com/p/msinttypes/ #endif #include -#include #include -#include +#include #include +#include #include -#include #include +#include -#include #include #include +#include #include @@ -425,12 +425,12 @@ defined __x86_64__ || defined __amd64__ || defined _M_X64 || defined _M_IA64 || #endif #include -#include #include +#include #if defined(_WIN32) -# include # include +# include #else # include #endif @@ -1260,8 +1260,8 @@ static inline void maybe_grow_buffer(char ** const buffer, int32_t * const buffe #define LIBDIVIDE_C_HEADERS #define LIBDIVIDE_NONAMESPACE #define LIBDIVIDE_NOINLINE -#include "libdivide.h" #include "fix16.h" +#include "libdivide.h" /* End dependence on compat.o object. */ diff --git a/source/build/include/libdivide.h b/source/build/include/libdivide.h index f5011a102..175d830b3 100644 --- a/source/build/include/libdivide.h +++ b/source/build/include/libdivide.h @@ -21,8 +21,8 @@ #include #include #else -#include #include +#include #endif #if defined(__x86_64__) || defined(_WIN64) || defined(_M_X64) diff --git a/source/build/include/polymer.h b/source/build/include/polymer.h index 56de0d168..ebdacddc5 100644 --- a/source/build/include/polymer.h +++ b/source/build/include/polymer.h @@ -3,14 +3,14 @@ #ifndef polymer_h_ # define polymer_h_ -# include "compat.h" # include "baselayer.h" -# include "glad/glad.h" # include "build.h" +# include "compat.h" +# include "glad/glad.h" # include "glbuild.h" -# include "osd.h" # include "hightile.h" # include "mdsprite.h" +# include "osd.h" # include "polymost.h" # include "pragmas.h" diff --git a/source/build/include/polymost.h b/source/build/include/polymost.h index 298108b1e..58460d878 100644 --- a/source/build/include/polymost.h +++ b/source/build/include/polymost.h @@ -3,9 +3,9 @@ #ifdef USE_OPENGL +#include "baselayer.h" // glinfo #include "glad/glad.h" #include "hightile.h" -#include "baselayer.h" // glinfo #ifdef __cplusplus extern "C" { diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index 0bf809a29..dec7a2008 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -6,37 +6,35 @@ // by Jonathon Fowler (jf@jonof.id.au) // by the EDuke32 team (development@voidpoint.com) -#define ENGINE +#define engine_c_ -#include "compat.h" -#include "build.h" -#include "editor.h" -#include "pragmas.h" -#include "cache1d.h" #include "a.h" -#include "osd.h" -#include "crc32.h" -#include "lz4.h" -#include "colmatch.h" - #include "baselayer.h" +#include "build.h" +#include "cache1d.h" +#include "colmatch.h" +#include "compat.h" +#include "crc32.h" +#include "editor.h" +#include "engine_priv.h" +#include "lz4.h" +#include "osd.h" +#include "palette.h" +#include "pragmas.h" #include "scriptfile.h" - #include "softsurface.h" + #ifdef USE_OPENGL # include "glad/glad.h" # include "glsurface.h" +# include "hightile.h" # include "mdsprite.h" # ifdef POLYMER # include "polymer.h" # endif -# include "hightile.h" # include "polymost.h" #endif -#include "engine_priv.h" -#include "palette.h" - #ifdef LUNATIC # include "lunatic.h" L_State g_engState; diff --git a/source/build/src/glbuild.cpp b/source/build/src/glbuild.cpp index 3c65415ff..3d5e4cab7 100644 --- a/source/build/src/glbuild.cpp +++ b/source/build/src/glbuild.cpp @@ -1,7 +1,7 @@ +#include "baselayer.h" #include "compat.h" #include "glad/glad.h" #include "glbuild.h" -#include "baselayer.h" #if defined USE_OPENGL diff --git a/source/build/src/hash.cpp b/source/build/src/hash.cpp index 2797be276..023cd0769 100644 --- a/source/build/src/hash.cpp +++ b/source/build/src/hash.cpp @@ -21,7 +21,7 @@ void hash_loop(hashtable_t *t, void(*func)(const char *, intptr_t)) void hash_free(hashtable_t *t) { - if (t->items == NULL) + if (t == NULL || t->items == NULL) return; int remaining = t->size - 1; diff --git a/source/build/src/osd.cpp b/source/build/src/osd.cpp index 201d14355..df31e78f1 100644 --- a/source/build/src/osd.cpp +++ b/source/build/src/osd.cpp @@ -3,17 +3,14 @@ // by Jonathon Fowler (jf@jonof.id.au) #include "build.h" -#include "osd.h" -#include "compat.h" -#include "baselayer.h" #include "cache1d.h" -#include "pragmas.h" -#include "scancodes.h" #include "crc32.h" +#include "editor.h" +#include "osd.h" +#include "scancodes.h" + #define XXH_STATIC_LINKING_ONLY #include "xxhash.h" -#include "common.h" -#include "editor.h" static osdsymbol_t *osd_addsymbol(const char *name); static osdsymbol_t *osd_findsymbol(const char *pszName, osdsymbol_t *pSymbol); diff --git a/source/build/src/sdlayer.cpp b/source/build/src/sdlayer.cpp index 23df5dcf4..af3e75f3c 100644 --- a/source/build/src/sdlayer.cpp +++ b/source/build/src/sdlayer.cpp @@ -1,43 +1,41 @@ // SDL interface layer for the Build Engine // Use SDL 1.2 or 2.0 from http://www.libsdl.org -#include "compat.h" #include -#include "sdl_inc.h" -#include "renderlayer.h" -#include "cache1d.h" -//#include "pragmas.h" + #include "a.h" #include "build.h" -#include "osd.h" +#include "cache1d.h" +#include "compat.h" #include "engine_priv.h" +#include "osd.h" #include "palette.h" - +#include "renderlayer.h" +#include "sdl_inc.h" #include "softsurface.h" + #ifdef USE_OPENGL # include "glad/glad.h" # include "glbuild.h" # include "glsurface.h" #endif -#if defined _WIN32 -# include "winbits.h" -#endif -#if defined __APPLE__ -# include "osxbits.h" -# include -# include -#endif #if defined HAVE_GTK2 # include "gtkbits.h" #endif + #ifdef __ANDROID__ # include -#endif -#if defined GEKKO +#elif defined __APPLE__ +# include "osxbits.h" +# include +# include +#elif defined GEKKO # include "wiibits.h" # include # include +#elif defined _WIN32 +# include "winbits.h" #endif #if SDL_MAJOR_VERSION != 1 diff --git a/source/duke3d/src/anim.h b/source/duke3d/src/anim.h index 63a141c71..420ccc589 100644 --- a/source/duke3d/src/anim.h +++ b/source/duke3d/src/anim.h @@ -23,6 +23,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef anim_h_ #define anim_h_ +#include "compat.h" +#include "hash.h" + typedef struct { uint16_t frame; int16_t sound; diff --git a/source/duke3d/src/cheats.h b/source/duke3d/src/cheats.h index 15a82e96a..1b37f494d 100644 --- a/source/duke3d/src/cheats.h +++ b/source/duke3d/src/cheats.h @@ -22,6 +22,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #pragma once +#define MAXCHEATLEN 20 +#define NUMCHEATCODES (int32_t) ARRAY_SIZE(CheatStrings) + extern void G_DoCheats(void); extern void G_SetupCheats(void); diff --git a/source/duke3d/src/common_game.h b/source/duke3d/src/common_game.h index d876ecb38..c61e28c34 100644 --- a/source/duke3d/src/common_game.h +++ b/source/duke3d/src/common_game.h @@ -7,6 +7,7 @@ #ifndef EDUKE32_COMMON_GAME_H_ #define EDUKE32_COMMON_GAME_H_ +#include "collections.h" #include "grpscan.h" #ifdef __cplusplus diff --git a/source/duke3d/src/config.h b/source/duke3d/src/config.h index e6820516e..0a4f52f8f 100644 --- a/source/duke3d/src/config.h +++ b/source/duke3d/src/config.h @@ -23,24 +23,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef config_public_h_ #define config_public_h_ -#define SETUPNAMEPARM "SETUPFILE" +#include "function.h" -int CONFIG_ReadSetup(void); -void CONFIG_GetSetupFilename( void ); +int CONFIG_ReadSetup(void); void CONFIG_WriteSetup(uint32_t flags); -void CONFIG_SetupMouse( void ); -void CONFIG_SetupJoystick( void ); +void CONFIG_SetDefaults(void); +void CONFIG_SetupMouse(void); +void CONFIG_SetupJoystick(void); void CONFIG_SetDefaultKeys(const char (*keyptr)[MAXGAMEFUNCLEN]); -int32_t CONFIG_GetMapBestTime(char const * mapname, uint8_t const * mapmd4); -int CONFIG_SetMapBestTime(uint8_t const * mapmd4, int32_t tm); +int32_t CONFIG_GetMapBestTime(char const *mapname, uint8_t const *mapmd4); +int CONFIG_SetMapBestTime(uint8_t const *mapmd4, int32_t tm); + +int32_t CONFIG_FunctionNameToNum(const char *func); +char * CONFIG_FunctionNumToName(int32_t func); + +int32_t CONFIG_AnalogNameToNum(const char *func); +const char *CONFIG_AnalogNumToName(int32_t func); void CONFIG_MapKey(int which, kb_scancode key1, kb_scancode oldkey1, kb_scancode key2, kb_scancode oldkey2); -int32_t CONFIG_FunctionNameToNum(const char *func); -char *CONFIG_FunctionNumToName(int32_t func); -int32_t CONFIG_AnalogNameToNum(const char *func); -const char *CONFIG_AnalogNumToName(int32_t func); -void CONFIG_SetDefaults(void); - #endif diff --git a/source/duke3d/src/demo.cpp b/source/duke3d/src/demo.cpp index a9e181172..795e8713c 100644 --- a/source/duke3d/src/demo.cpp +++ b/source/duke3d/src/demo.cpp @@ -20,12 +20,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#include "duke3d.h" #include "demo.h" -//#include "premap.h" // G_UpdateScreenArea() +#include "duke3d.h" +#include "input.h" #include "menus.h" #include "savegame.h" -#include "input.h" #include "screens.h" char g_firstDemoFile[BMAX_PATH]; diff --git a/source/duke3d/src/demo.h b/source/duke3d/src/demo.h index d4ad2054c..4bba6f087 100644 --- a/source/duke3d/src/demo.h +++ b/source/duke3d/src/demo.h @@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef demo_h_ #define demo_h_ +#include "compat.h" + #define DEMOFN_FMT "edemo%03d.edm" #define MAXDEMOS 1000 diff --git a/source/duke3d/src/duke3d.h b/source/duke3d/src/duke3d.h index 7d0cbb86a..0e02f1e50 100644 --- a/source/duke3d/src/duke3d.h +++ b/source/duke3d/src/duke3d.h @@ -24,9 +24,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #define duke3d_h_ // JBF -#include "compat.h" #include "a.h" +#include "baselayer.h" #include "build.h" +#include "cache1d.h" +#include "compat.h" +#include "file_lib.h" +#include "fx_man.h" +#include "keyboard.h" +#include "pragmas.h" #ifdef POLYMER #include "polymer.h" @@ -36,12 +42,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #endif #endif -#include "cache1d.h" -#include "pragmas.h" -#include "baselayer.h" -#include "file_lib.h" -#include "keyboard.h" -#include "fx_man.h" #define HEAD2 APPNAME @@ -125,30 +125,30 @@ EDUKE32_STATIC_ASSERT(7 <= MAXTILES-MAXUSERTILES); // so that debugging with valgrind --smc-check=none is possible: //#define DEBUG_VALGRIND_NO_SMC -#include "common_game.h" -#include "namesdyn.h" -#include "function.h" -#include "macros.h" -#include "gamedefs.h" -#include "config.h" -#include "sounds.h" -#include "control.h" #include "_rts.h" -#include "rts.h" -#include "soundsdyn.h" -#include "music.h" -#include "inv.h" -#include "player.h" #include "actors.h" -#include "quotes.h" -#include "global.h" -#include "sector.h" -#include "net.h" +#include "common_game.h" +#include "config.h" +#include "control.h" +#include "function.h" #include "game.h" #include "gamedef.h" +#include "gamedefs.h" #include "gameexec.h" #include "gamevars.h" +#include "global.h" +#include "inv.h" +#include "macros.h" +#include "music.h" +#include "namesdyn.h" +#include "net.h" +#include "player.h" +#include "quotes.h" +#include "rts.h" #include "screentext.h" +#include "sector.h" +#include "sounds.h" +#include "soundsdyn.h" #ifdef LUNATIC # include "lunatic_game.h" diff --git a/source/duke3d/src/game.h b/source/duke3d/src/game.h index 340e9b2cd..0a6fb6ad0 100644 --- a/source/duke3d/src/game.h +++ b/source/duke3d/src/game.h @@ -30,6 +30,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #endif #include "fix16.h" +#include "gamedefs.h" +#include "gamevars.h" +#include "net.h" #ifdef __cplusplus extern "C" { diff --git a/source/duke3d/src/gamedef.cpp b/source/duke3d/src/gamedef.cpp index a8c80c3f2..879ec2e09 100644 --- a/source/duke3d/src/gamedef.cpp +++ b/source/duke3d/src/gamedef.cpp @@ -20,17 +20,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#include "duke3d.h" -#include "namesdyn.h" -#include "gamedef.h" -#include "gameexec.h" -#include "savegame.h" +#include "cheats.h" #include "common.h" #include "common_game.h" -#include "cheats.h" - -#include "osd.h" #include "crc32.h" +#include "duke3d.h" +#include "gamedef.h" +#include "gameexec.h" +#include "namesdyn.h" +#include "osd.h" +#include "savegame.h" int32_t g_scriptVersion = 13; // 13 = 1.3D-style CON files, 14 = 1.4/1.5 style CON files diff --git a/source/duke3d/src/gamedef.h b/source/duke3d/src/gamedef.h index e743fcca7..94a42640a 100644 --- a/source/duke3d/src/gamedef.h +++ b/source/duke3d/src/gamedef.h @@ -23,7 +23,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef gamedef_h_ #define gamedef_h_ +#include "actors.h" #include "build.h" // hashtable_t +#include "cheats.h" #include "common.h" // tokenlist #include "player.h" // projectile_t @@ -46,9 +48,6 @@ enum #define LABEL_HASPARM2 1 #define LABEL_ISSTRING 2 -#define MAXCHEATLEN 20 -#define NUMCHEATCODES (int32_t)ARRAY_SIZE(CheatStrings) - #define VM_INSTMASK 0xfff #define C_CUSTOMERROR(Text, ...) \ @@ -115,7 +114,6 @@ extern int32_t g_structVarIDs; extern intptr_t apScriptEvents[MAXEVENTS]; #endif -extern char CheatStrings[][MAXCHEATLEN]; extern char g_scriptFileName[BMAX_PATH]; extern const uint32_t CheatFunctionFlags[]; diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp index 615751837..e4d9d8a74 100644 --- a/source/duke3d/src/gameexec.cpp +++ b/source/duke3d/src/gameexec.cpp @@ -20,12 +20,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- +#include "anim.h" #include "colmatch.h" #include "compat.h" - +#include "debugbreak.h" #include "duke3d.h" - -#include "anim.h" #include "input.h" #include "menus.h" #include "osdcmds.h" @@ -36,8 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # include "lunatic_game.h" #endif -#include "debugbreak.h" - #if KRANDDEBUG # define GAMEEXEC_INLINE # define GAMEEXEC_STATIC diff --git a/source/duke3d/src/gameexec.h b/source/duke3d/src/gameexec.h index 722aaff17..c5da51081 100644 --- a/source/duke3d/src/gameexec.h +++ b/source/duke3d/src/gameexec.h @@ -24,9 +24,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #define gameexec_h_ #include "build.h" -#include "sector.h" // mapstate_t -#include "gamedef.h" // vmstate_t #include "events_defs.h" +#include "gamedef.h" // vmstate_t +#include "sector.h" // mapstate_t #ifdef LUNATIC # include "lunatic_game.h" diff --git a/source/duke3d/src/gamevars.h b/source/duke3d/src/gamevars.h index dff19b66e..4f5552e18 100644 --- a/source/duke3d/src/gamevars.h +++ b/source/duke3d/src/gamevars.h @@ -23,8 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef gamevars_h_ #define gamevars_h_ -#include "gamedef.h" #include "fix16.hpp" +#include "gamedef.h" #define MAXGAMEVARS 2048 // must be a power of two #define MAXVARLABEL 26 diff --git a/source/duke3d/src/global.h b/source/duke3d/src/global.h index 1c542abf3..fb65047e5 100644 --- a/source/duke3d/src/global.h +++ b/source/duke3d/src/global.h @@ -23,6 +23,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef global_h_ #define global_h_ +#include "build.h" +#include "compat.h" +#include "duke3d.h" +#include "mmulti.h" +#include "quotes.h" +#include "sector.h" +#include "sounds.h" + #ifdef global_c_ #define G_EXTERN #else @@ -35,9 +43,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // duke3d global soup :( -// XXX: we don't #include everything we need. -#include "compat.h" -#include "build.h" G_EXTERN int32_t g_interpolationCnt; G_EXTERN int32_t g_interpolationLock; @@ -45,11 +50,6 @@ G_EXTERN int32_t oldipos[MAXINTERPOLATIONS]; G_EXTERN int32_t *curipos[MAXINTERPOLATIONS]; G_EXTERN int32_t bakipos[MAXINTERPOLATIONS]; -#include "mmulti.h" - -#include "duke3d.h" -#include "sector.h" -#include "quotes.h" #ifdef __cplusplus extern "C" { diff --git a/source/duke3d/src/grpscan.cpp b/source/duke3d/src/grpscan.cpp index 076100e31..ff345d0cd 100644 --- a/source/duke3d/src/grpscan.cpp +++ b/source/duke3d/src/grpscan.cpp @@ -20,16 +20,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#include "compat.h" #include "baselayer.h" - -#include "scriptfile.h" #include "cache1d.h" -#include "crc32.h" - -#include "duke3d.h" #include "common_game.h" +#include "compat.h" +#include "crc32.h" +#include "duke3d.h" #include "grpscan.h" +#include "scriptfile.h" #ifndef EDUKE32_STANDALONE static void process_vaca13(int32_t crcval); diff --git a/source/duke3d/src/macros.h b/source/duke3d/src/macros.h index 70cec48e7..4714a4e35 100644 --- a/source/duke3d/src/macros.h +++ b/source/duke3d/src/macros.h @@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef EDUKE32_MACROS_H_ #define EDUKE32_MACROS_H_ +#include "mmulti.h" + // Macros, some from SW source #define BGSTRETCH (ud.bgstretch ? 1024 : 0) diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index cc6e3459f..f303c3178 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -20,17 +20,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- +#include "cheats.h" #include "compat.h" +#include "demo.h" #include "duke3d.h" +#include "input.h" +#include "in_android.h" +#include "menus.h" #include "osdcmds.h" #include "savegame.h" -#include "demo.h" #include "xxhash.h" -#include "input.h" -#include "menus.h" -#include "cheats.h" -#include "in_android.h" #ifndef __ANDROID__ droidinput_t droidinput; #endif diff --git a/source/duke3d/src/player.h b/source/duke3d/src/player.h index e4fefd70a..53b3af92a 100644 --- a/source/duke3d/src/player.h +++ b/source/duke3d/src/player.h @@ -23,8 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef player_h_ #define player_h_ -#include "inv.h" #include "fix16.h" +#include "inv.h" #ifdef __cplusplus extern "C" { diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index 2671cc5ed..7edb329b0 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -20,22 +20,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#include "duke3d.h" -#include "compat.h" -#include "screens.h" -#include "colmatch.h" -#include "input.h" -#include "anim.h" -#include "sbar.h" -#include "menus.h" -#include "osdfuncs.h" -#include "demo.h" -#include "mdsprite.h" - #ifdef __ANDROID__ #include "android.h" #endif +#include "anim.h" +#include "colmatch.h" +#include "compat.h" +#include "demo.h" +#include "duke3d.h" +#include "input.h" +#include "mdsprite.h" +#include "sbar.h" +#include "screens.h" + #define COLOR_RED redcol #define COLOR_WHITE whitecol diff --git a/source/duke3d/src/sector.h b/source/duke3d/src/sector.h index 17d19cbaa..3f4e412bc 100644 --- a/source/duke3d/src/sector.h +++ b/source/duke3d/src/sector.h @@ -23,10 +23,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef sector_h_ #define sector_h_ -#include "gamevars.h" #include "actors.h" // actor_t -#include "player.h" // playerspawn_t +#include "gamevars.h" +#include "macros.h" #include "namesdyn.h" // for G_GetForcefieldPicnum() +#include "player.h" // playerspawn_t #ifdef __cplusplus extern "C" {