diff --git a/source/audiolib/src/driver_directsound.cpp b/source/audiolib/src/driver_directsound.cpp index b1a5fc56c..a84194f4f 100644 --- a/source/audiolib/src/driver_directsound.cpp +++ b/source/audiolib/src/driver_directsound.cpp @@ -26,8 +26,7 @@ #define NEED_DSOUND_H #include "windows_inc.h" -#include -#include +#include "compat.h" #include "driver_directsound.h" #include "multivoc.h" diff --git a/source/audiolib/src/driver_sdl.cpp b/source/audiolib/src/driver_sdl.cpp index f8e0e3a82..541330806 100644 --- a/source/audiolib/src/driver_sdl.cpp +++ b/source/audiolib/src/driver_sdl.cpp @@ -22,7 +22,6 @@ * libSDL output driver for MultiVoc */ -#include #define _NEED_SDLMIXER #include "compat.h" #include "sdl_inc.h" diff --git a/source/audiolib/src/flac.cpp b/source/audiolib/src/flac.cpp index 75ede1b45..0521485f1 100644 --- a/source/audiolib/src/flac.cpp +++ b/source/audiolib/src/flac.cpp @@ -22,6 +22,8 @@ * FLAC source support for MultiVoc */ +#include "compat.h" + #ifdef HAVE_FLAC #define FLAC__NO_DLL @@ -32,13 +34,6 @@ #include "FLAC/all.h" #endif -#include -#include -#include -#ifndef _MSC_VER -#include -#endif -#include #include "pitch.h" #include "multivoc.h" #include "_multivc.h" @@ -669,8 +664,6 @@ void MV_ReleaseFLACVoice(VoiceNode *voice) voice->rawdataptr = 0; } #else -#include -#include #include "_multivc.h" int32_t MV_PlayFLAC(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t loopend, int32_t pitchoffset, diff --git a/source/audiolib/src/formats.cpp b/source/audiolib/src/formats.cpp index a71cc5038..82705a4b6 100644 --- a/source/audiolib/src/formats.cpp +++ b/source/audiolib/src/formats.cpp @@ -24,13 +24,7 @@ * Raw, WAV, and VOC source support for MultiVoc */ -#include -#include -#include -#ifndef _MSC_VER -#include -#endif -#include +#include "compat.h" #include "pitch.h" #include "multivoc.h" #include "_multivc.h" diff --git a/source/audiolib/src/fx_man.cpp b/source/audiolib/src/fx_man.cpp index 2bbfd9c5d..1c9fd2db1 100644 --- a/source/audiolib/src/fx_man.cpp +++ b/source/audiolib/src/fx_man.cpp @@ -21,9 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //------------------------------------------------------------------------- #include "compat.h" -#include -#include -#include #include "drivers.h" #include "multivoc.h" #include "fx_man.h" diff --git a/source/audiolib/src/multivoc.cpp b/source/audiolib/src/multivoc.cpp index 0a21ed866..8f9c6b3fa 100644 --- a/source/audiolib/src/multivoc.cpp +++ b/source/audiolib/src/multivoc.cpp @@ -33,11 +33,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "compat.h" #include "pragmas.h" -#include -#include -#include -#include -#include #include "linklist.h" #include "drivers.h" #include "pitch.h" diff --git a/source/audiolib/src/pitch.cpp b/source/audiolib/src/pitch.cpp index 7cdb63fc6..c792dce42 100644 --- a/source/audiolib/src/pitch.cpp +++ b/source/audiolib/src/pitch.cpp @@ -28,8 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. (c) Copyright 1993 James R. Dose. All Rights Reserved. **********************************************************************/ -#include -#include +#include "compat.h" #include "pitch.h" #define MAXDETUNE 50 diff --git a/source/audiolib/src/vorbis.cpp b/source/audiolib/src/vorbis.cpp index 6c5bfb240..28bc0bb4b 100644 --- a/source/audiolib/src/vorbis.cpp +++ b/source/audiolib/src/vorbis.cpp @@ -22,15 +22,10 @@ * OggVorbis source support for MultiVoc */ +#include "compat.h" + #ifdef HAVE_VORBIS -#include -#include -#include -#ifndef _MSC_VER -#include -#endif -#include #include "pitch.h" #include "multivoc.h" #include "_multivc.h" @@ -483,8 +478,6 @@ void MV_ReleaseVorbisVoice( VoiceNode * voice ) voice->rawdataptr = 0; } #else -#include -#include #include "_multivc.h" int32_t MV_PlayVorbis(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t loopend, int32_t pitchoffset, diff --git a/source/audiolib/src/xa.cpp b/source/audiolib/src/xa.cpp index 198df09a0..6e5f5f5d6 100644 --- a/source/audiolib/src/xa.cpp +++ b/source/audiolib/src/xa.cpp @@ -4,11 +4,7 @@ * Adapted and remixed from superxa2wav */ -#include -#include -#include -#include -#include +#include "compat.h" #include "pitch.h" #include "multivoc.h" #include "_multivc.h" diff --git a/source/audiolib/src/xmp.cpp b/source/audiolib/src/xmp.cpp index 371146a3b..fe630d050 100644 --- a/source/audiolib/src/xmp.cpp +++ b/source/audiolib/src/xmp.cpp @@ -1,8 +1,5 @@ -#include -#include -#include -#include +#include "compat.h" #ifdef HAVE_XMP diff --git a/source/build/include/a.h b/source/build/include/a.h index 4580894fb..b8c86d2c2 100644 --- a/source/build/include/a.h +++ b/source/build/include/a.h @@ -91,7 +91,6 @@ extern void __cdecl stretchhline(int32_t,int32_t,int32_t,int32_t,int32_t,int32_t #else // !defined(NOASM) && (defined(_MSC_VER) || (defined(__GNUC__) && defined(__i386__))) #define ENGINE_USING_A_C -#include #define prevlineasm1 vlineasm1 diff --git a/source/build/include/compat.h b/source/build/include/compat.h index 603a45e59..1faf4783a 100644 --- a/source/build/include/compat.h +++ b/source/build/include/compat.h @@ -301,6 +301,7 @@ defined __x86_64__ || defined __amd64__ || defined _M_X64 || defined _M_IA64 || # include "msvc/inttypes.h" // from http://code.google.com/p/msinttypes/ #endif +#include #include #include #include @@ -308,6 +309,7 @@ defined __x86_64__ || defined __amd64__ || defined _M_X64 || defined _M_IA64 || #include #include +#include #include #include @@ -328,14 +330,11 @@ defined __x86_64__ || defined __amd64__ || defined _M_X64 || defined _M_IA64 || #if defined(_WIN32) # include +# include #else # include #endif -#ifdef _MSC_VER -# include -#endif - ////////// External library headers ////////// diff --git a/source/build/include/editor.h b/source/build/include/editor.h index fe2dacebb..af6f76a3f 100644 --- a/source/build/include/editor.h +++ b/source/build/include/editor.h @@ -5,8 +5,8 @@ #ifndef editor_h_ #define editor_h_ +#include "compat.h" #include "baselayer.h" -#include #ifdef __cplusplus extern "C" { diff --git a/source/build/include/pragmas.h b/source/build/include/pragmas.h index b646f5e27..a2e9f2b66 100644 --- a/source/build/include/pragmas.h +++ b/source/build/include/pragmas.h @@ -9,8 +9,6 @@ extern "C" { #endif -#include - #define EDUKE32_GENERATE_PRAGMAS \ EDUKE32_SCALER_PRAGMA(1) EDUKE32_SCALER_PRAGMA(2) EDUKE32_SCALER_PRAGMA(3) EDUKE32_SCALER_PRAGMA(4) \ EDUKE32_SCALER_PRAGMA(5) EDUKE32_SCALER_PRAGMA(6) EDUKE32_SCALER_PRAGMA(7) EDUKE32_SCALER_PRAGMA(8) \ @@ -105,7 +103,6 @@ extern int32_t tabledivide32_noinline(int32_t n, int32_t d); extern int32_t tabledivide64_noinline(int64_t n, int32_t d); #ifdef GEKKO -#include static inline int32_t divscale(int32_t eax, int32_t ebx, int32_t ecx) { return tabledivide64(ldexp(eax, ecx), ebx); } #else static inline int32_t divscale(int32_t eax, int32_t ebx, int32_t ecx) diff --git a/source/build/include/winbits.h b/source/build/include/winbits.h index adb50b07b..9f15f2cb7 100644 --- a/source/build/include/winbits.h +++ b/source/build/include/winbits.h @@ -1,6 +1,6 @@ // Windows layer-independent code -#include +#include "compat.h" #define WindowClass "buildapp" diff --git a/source/build/src/SDLMain.mm b/source/build/src/SDLMain.mm index 93970d135..280b1a869 100644 --- a/source/build/src/SDLMain.mm +++ b/source/build/src/SDLMain.mm @@ -21,7 +21,6 @@ #import #include /* for MAXPATHLEN */ -#include /* For some reason, Apple removed setAppleMenu from the headers in 10.4, but the method still is there and works. To avoid warnings, we declare diff --git a/source/build/src/animvpx.cpp b/source/build/src/animvpx.cpp index 18152a76b..a48ca4019 100644 --- a/source/build/src/animvpx.cpp +++ b/source/build/src/animvpx.cpp @@ -10,7 +10,7 @@ #endif -#include +#include "compat.h" #include "compat.h" #include "baselayer.h" diff --git a/source/build/src/cache1d.cpp b/source/build/src/cache1d.cpp index 98b8b4aa2..418ceb176 100644 --- a/source/build/src/cache1d.cpp +++ b/source/build/src/cache1d.cpp @@ -5,29 +5,16 @@ // This file has been modified from Ken Silverman's original release // by Jonathon Fowler (jf@jonof.id.au) +#include "compat.h" #ifdef CACHE1D_COMPRESS_ONLY // Standalone libcache1d.so containing only the compression/decompression // functions. -# include -# include -# include -# include -# include - -# define BFILE FILE # define C1D_STATIC -# define B_LITTLE16(x) (x) -# define B_LITTLE32(x) (x) -# define Bmemset memset -# define Bmemcpy memcpy -# define Bassert assert -# define bsize_t size_t #else // cache1d.o for EDuke32 # define C1D_STATIC static -#include "compat.h" #ifdef _WIN32 // for FILENAME_CASE_CHECK # define NEED_SHELLAPI_H diff --git a/source/build/src/compat.cpp b/source/build/src/compat.cpp index 098f707ee..f84e3958c 100644 --- a/source/build/src/compat.cpp +++ b/source/build/src/compat.cpp @@ -7,7 +7,6 @@ #ifdef _WIN32 # define NEED_SHLOBJ_H # include "windows_inc.h" -# include #elif __APPLE__ # include "osxbits.h" #endif diff --git a/source/build/src/dynamicgtk.cpp b/source/build/src/dynamicgtk.cpp index a1ec14668..fd37e76e9 100644 --- a/source/build/src/dynamicgtk.cpp +++ b/source/build/src/dynamicgtk.cpp @@ -1,6 +1,5 @@ +#include "compat.h" #include -#include -#include #define dynamicgtkfoo__ #include "dynamicgtk.h" diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index 5e9450070..13aeabeec 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -31,8 +31,6 @@ # include "polymost.h" #endif -#include // pow - #include "engine_priv.h" #include "palette.h" diff --git a/source/build/src/glbuild.cpp b/source/build/src/glbuild.cpp index 78be2d6ab..935a35758 100644 --- a/source/build/src/glbuild.cpp +++ b/source/build/src/glbuild.cpp @@ -1,9 +1,6 @@ #include "compat.h" #include "glbuild.h" #include "baselayer.h" -#include -#include -#include #if defined USE_OPENGL diff --git a/source/build/src/gtkbits.cpp b/source/build/src/gtkbits.cpp index 03b759211..9bb6ea178 100644 --- a/source/build/src/gtkbits.cpp +++ b/source/build/src/gtkbits.cpp @@ -1,9 +1,4 @@ -#include -#include -#include -#include -#include -#include +#include "compat.h" #include "dynamicgtk.h" diff --git a/source/build/src/kplib.cpp b/source/build/src/kplib.cpp index 5c7f66824..5294540a5 100644 --- a/source/build/src/kplib.cpp +++ b/source/build/src/kplib.cpp @@ -32,16 +32,9 @@ credits. #include "compat.h" #include "baselayer.h" #include "kplib.h" -#include -#include -#include -#include -#include -#include #include "pragmas.h" #if !defined(_WIN32) -#include #include # if !defined __INTEL_COMPILER typedef long long __int64; diff --git a/source/build/src/mdsprite.cpp b/source/build/src/mdsprite.cpp index 679269b23..df8e82d4d 100644 --- a/source/build/src/mdsprite.cpp +++ b/source/build/src/mdsprite.cpp @@ -17,9 +17,6 @@ #include "common.h" #include "palette.h" -#include -#include - static int32_t curextra=MAXTILES; #define MIN_CACHETIME_PRINT 10 diff --git a/source/build/src/polymer.cpp b/source/build/src/polymer.cpp index 7f945ec01..810458152 100644 --- a/source/build/src/polymer.cpp +++ b/source/build/src/polymer.cpp @@ -2,7 +2,7 @@ #if defined USE_OPENGL && defined POLYMER -#include +#include "compat.h" #define POLYMER_C #include "polymer.h" diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index 335dba8f8..3cc5fee52 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -33,9 +33,6 @@ int32_t rendmode=0; int32_t usemodels=1; int32_t usehightile=1; -#include //<-important! -#include - typedef struct { float x, cy[2], fy[2]; int32_t tag; int16_t n, p, ctag, ftag; } vsptyp; #define VSPMAX 4096 //<- careful! static vsptyp vsp[VSPMAX]; diff --git a/source/build/src/rawinput.cpp b/source/build/src/rawinput.cpp index 0be1aeb1c..4070d0cc0 100644 --- a/source/build/src/rawinput.cpp +++ b/source/build/src/rawinput.cpp @@ -1,7 +1,7 @@ #include "windows_inc.h" -#include +#include "compat.h" #include "rawinput.h" #include "winlayer.h" #include "scancodes.h" diff --git a/source/build/src/screenshot.cpp b/source/build/src/screenshot.cpp index 7080afee7..b776f9655 100644 --- a/source/build/src/screenshot.cpp +++ b/source/build/src/screenshot.cpp @@ -1,8 +1,5 @@ -#if (PNG_LIBPNG_VER > 10599) -# include -#endif - +#include "compat.h" #include "build.h" #include "editor.h" diff --git a/source/build/src/scriptfile.cpp b/source/build/src/scriptfile.cpp index e046c1787..a7783d3a2 100644 --- a/source/build/src/scriptfile.cpp +++ b/source/build/src/scriptfile.cpp @@ -10,7 +10,6 @@ #include "baselayer.h" #include "compat.h" #include "cache1d.h" -#include #define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n')) diff --git a/source/build/src/sdlayer.cpp b/source/build/src/sdlayer.cpp index b8ad36e8c..c4e5033ae 100644 --- a/source/build/src/sdlayer.cpp +++ b/source/build/src/sdlayer.cpp @@ -8,11 +8,9 @@ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS #endif -#include -#include // pow +#include "compat.h" #include #include "sdl_inc.h" -#include "compat.h" #include "renderlayer.h" #include "cache1d.h" //#include "pragmas.h" diff --git a/source/build/src/voxmodel.cpp b/source/build/src/voxmodel.cpp index 628f2fa4f..923b7a6d6 100644 --- a/source/build/src/voxmodel.cpp +++ b/source/build/src/voxmodel.cpp @@ -16,8 +16,6 @@ #include "kplib.h" #include "palette.h" -#include - //For loading/conversion only static vec3_t voxsiz; diff --git a/source/build/src/winlayer.cpp b/source/build/src/winlayer.cpp index adb8424fd..1e89ccc3b 100644 --- a/source/build/src/winlayer.cpp +++ b/source/build/src/winlayer.cpp @@ -1,8 +1,7 @@ // Windows DIB/DirectDraw interface layer for the Build Engine // Originally by Jonathon Fowler (jf@jonof.id.au) -#include -#include +#include "compat.h" #include "build.h" diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp index 299070090..72e6e7d66 100644 --- a/source/duke3d/src/gameexec.cpp +++ b/source/duke3d/src/gameexec.cpp @@ -20,10 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- - +#include "compat.h" #include "duke3d.h" -#include -#include // sqrt #include "scriplib.h" #include "savegame.h" diff --git a/source/duke3d/src/lunatic/lunatic_game.cpp b/source/duke3d/src/lunatic/lunatic_game.cpp index fbc4ae604..2c5a08e1f 100644 --- a/source/duke3d/src/lunatic/lunatic_game.cpp +++ b/source/duke3d/src/lunatic/lunatic_game.cpp @@ -2,11 +2,6 @@ #include "compat.h" -#include -#include // getenv -#include -#include // strerror - #ifdef __cplusplus extern "C" { #endif diff --git a/source/duke3d/src/m32exec.cpp b/source/duke3d/src/m32exec.cpp index b279b0608..29ff15fbc 100644 --- a/source/duke3d/src/m32exec.cpp +++ b/source/duke3d/src/m32exec.cpp @@ -20,8 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#include -#include +#include "compat.h" #include "m32script.h" #include "m32def.h" diff --git a/source/duke3d/src/mdump.cpp b/source/duke3d/src/mdump.cpp index 745f8ba66..2e2709547 100644 --- a/source/duke3d/src/mdump.cpp +++ b/source/duke3d/src/mdump.cpp @@ -1,12 +1,7 @@ +#include "compat.h" #include "mdump.h" -#include - -#include -#include -#include - #include LPCSTR MiniDumper::m_szAppName; diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index 480721768..60b41758b 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- +#include "compat.h" #include "duke3d.h" #include "osdcmds.h" #include "savegame.h" @@ -29,8 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "menus.h" #include "cheats.h" -#include - #include "in_android.h" #ifndef __ANDROID__ droidinput_t droidinput; diff --git a/source/duke3d/src/midi.cpp b/source/duke3d/src/midi.cpp index 723d78c6c..c8d4a2782 100644 --- a/source/duke3d/src/midi.cpp +++ b/source/duke3d/src/midi.cpp @@ -31,8 +31,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. (c) Copyright 1994 James R. Dose. All Rights Reserved. **********************************************************************/ -#include -#include +#include "compat.h" #include "standard.h" #include "music.h" #include "_midi.h" diff --git a/source/duke3d/src/music.cpp b/source/duke3d/src/music.cpp index 33cdd9810..5b879fcbe 100644 --- a/source/duke3d/src/music.cpp +++ b/source/duke3d/src/music.cpp @@ -20,12 +20,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#include -#include +#include "compat.h" #include "music.h" #include "midi.h" #include "mpu401.h" -#include "compat.h" #ifndef TRUE #define TRUE (1 == 1) diff --git a/source/duke3d/src/osdfuncs.cpp b/source/duke3d/src/osdfuncs.cpp index a5f94d8ab..58fd8a41d 100644 --- a/source/duke3d/src/osdfuncs.cpp +++ b/source/duke3d/src/osdfuncs.cpp @@ -20,7 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- #include "compat.h" -#include #include "duke3d.h" #include "build.h" #include "namesdyn.h" diff --git a/source/duke3d/src/sdlmusic.cpp b/source/duke3d/src/sdlmusic.cpp index cad28c5e3..00c5f163a 100644 --- a/source/duke3d/src/sdlmusic.cpp +++ b/source/duke3d/src/sdlmusic.cpp @@ -30,9 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "compat.h" -#include -#include - #include "duke3d.h" #include "cache1d.h" @@ -44,9 +41,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #endif #if defined FORK_EXEC_MIDI // fork/exec based external midi player -#include #include -#include #include #include static char **external_midi_argv; diff --git a/source/duke3d/src/sounds_mapster32.cpp b/source/duke3d/src/sounds_mapster32.cpp index 946fa947a..f2d7f192b 100644 --- a/source/duke3d/src/sounds_mapster32.cpp +++ b/source/duke3d/src/sounds_mapster32.cpp @@ -22,9 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Stripped sounds.c for use in Mapster32, breaks all ties to game & music -#include -#include - #include "compat.h" #include "baselayer.h" diff --git a/source/duke3d/src/startgtk.game.cpp b/source/duke3d/src/startgtk.game.cpp index d4abeb50c..611822ed5 100644 --- a/source/duke3d/src/startgtk.game.cpp +++ b/source/duke3d/src/startgtk.game.cpp @@ -20,6 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- +#include "compat.h" + #include "gtkpixdata.h" #if defined(LINKED_GTK) diff --git a/source/kenbuild/src/startgtk.game.cpp b/source/kenbuild/src/startgtk.game.cpp index 4c19f71ed..80e457953 100644 --- a/source/kenbuild/src/startgtk.game.cpp +++ b/source/kenbuild/src/startgtk.game.cpp @@ -3,12 +3,7 @@ * template. */ -#include -#include -#include -#include -#include -#include +#include "compat.h" #include "gtkpixdata.h" #include diff --git a/source/mact/src/file_lib.cpp b/source/mact/src/file_lib.cpp index 899893041..7c389fc04 100644 --- a/source/mact/src/file_lib.cpp +++ b/source/mact/src/file_lib.cpp @@ -31,12 +31,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //------------------------------------------------------------------------- -#include -#ifndef _MSC_VER -#include -#endif -#include -#include #include "compat.h" #include "file_lib.h" diff --git a/source/mact/src/scriplib.cpp b/source/mact/src/scriplib.cpp index 82a95824d..efaf8ad04 100644 --- a/source/mact/src/scriplib.cpp +++ b/source/mact/src/scriplib.cpp @@ -38,9 +38,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "scriplib.h" #include "file_lib.h" #include "_scrplib.h" -#include -#include -#include static script_t *scriptfiles[MAXSCRIPTFILES]; diff --git a/source/sw/src/saveable.cpp b/source/sw/src/saveable.cpp index 4a7fdce7a..296683fee 100644 --- a/source/sw/src/saveable.cpp +++ b/source/sw/src/saveable.cpp @@ -23,7 +23,6 @@ #include "compat.h" #include "saveable.h" -#include #define maxModules 35 diff --git a/source/sw/src/sounds.cpp b/source/sw/src/sounds.cpp index 631d659a6..ab43120b7 100644 --- a/source/sw/src/sounds.cpp +++ b/source/sw/src/sounds.cpp @@ -23,7 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- -#include +#include "compat.h" #include "build.h" #include "cache1d.h" diff --git a/source/sw/src/startgtk.game.cpp b/source/sw/src/startgtk.game.cpp index 5ff43df37..43bb6d932 100644 --- a/source/sw/src/startgtk.game.cpp +++ b/source/sw/src/startgtk.game.cpp @@ -3,12 +3,7 @@ * template. */ -#include -#include -#include -#include -#include -#include +#include "compat.h" #include #include diff --git a/source/tools/src/arttool.cpp b/source/tools/src/arttool.cpp index 49577a999..feed7630e 100644 --- a/source/tools/src/arttool.cpp +++ b/source/tools/src/arttool.cpp @@ -5,9 +5,6 @@ */ // Bstring and C++ STL --> C conversion by Hendricks266 -#include -#include - #include "compat.h" ////////// Bstring ////////// diff --git a/source/tools/src/bsuite.cpp b/source/tools/src/bsuite.cpp index 45ca85704..7e07cca14 100644 --- a/source/tools/src/bsuite.cpp +++ b/source/tools/src/bsuite.cpp @@ -19,10 +19,6 @@ */ // DOS 16-bit real mode UI --> portable command line conversion by Hendricks266 -#include -#include -#include -#include #include "compat.h" const char APP_NAME[] = "Build Game Customization Suite v0.2-EDuke32"; diff --git a/source/tools/src/cacheinfo.cpp b/source/tools/src/cacheinfo.cpp index e719eeb6b..7690b6903 100644 --- a/source/tools/src/cacheinfo.cpp +++ b/source/tools/src/cacheinfo.cpp @@ -1,10 +1,7 @@ // XXX: This program is not in sync with EDuke32 (e.g. texcacheheader type). -#include -#include -#include -#include #include "compat.h" +#include #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 diff --git a/source/tools/src/generateicon.cpp b/source/tools/src/generateicon.cpp index e3702ae7b..16f7096e3 100644 --- a/source/tools/src/generateicon.cpp +++ b/source/tools/src/generateicon.cpp @@ -1,8 +1,6 @@ -#include -#include "inttypes.h" -#include "kplib.h" #include "compat.h" +#include "kplib.h" struct icon { int32_t width,height; diff --git a/source/tools/src/givedepth.cpp b/source/tools/src/givedepth.cpp index 67ec68dcb..eac2c3443 100644 --- a/source/tools/src/givedepth.cpp +++ b/source/tools/src/givedepth.cpp @@ -1,6 +1,4 @@ -#include -#include -#include +#include "compat.h" #define MAXNUMTILES 256 diff --git a/source/tools/src/ivfrate.cpp b/source/tools/src/ivfrate.cpp index 557bb2354..b82f56aef 100644 --- a/source/tools/src/ivfrate.cpp +++ b/source/tools/src/ivfrate.cpp @@ -1,14 +1,5 @@ -#include -#include -#include -#include - -#include -#include - -#include -#define Bmemcmp memcmp +#include "compat.h" #ifndef USE_OPENGL # define USE_OPENGL #endif diff --git a/source/tools/src/kmd2tool.cpp b/source/tools/src/kmd2tool.cpp index 576e3713c..7a237e8e1 100644 --- a/source/tools/src/kmd2tool.cpp +++ b/source/tools/src/kmd2tool.cpp @@ -1,6 +1,4 @@ -#include -#include #include "compat.h" typedef struct { float x, y, z; } point3d; diff --git a/source/tools/src/makesdlkeytrans.cpp b/source/tools/src/makesdlkeytrans.cpp index d09b82a4a..02d3b58d0 100644 --- a/source/tools/src/makesdlkeytrans.cpp +++ b/source/tools/src/makesdlkeytrans.cpp @@ -1,7 +1,6 @@ // gcc b.c -Lc:/mingw32/lib -lmingw32 -lSDLmain -lSDL -#include -#include +#include "compat.h" #include "sdl_inc.h" #include "sdlkeytrans.cpp" diff --git a/source/tools/src/map2stl.cpp b/source/tools/src/map2stl.cpp index e61c7d3d5..7f85f13ab 100644 --- a/source/tools/src/map2stl.cpp +++ b/source/tools/src/map2stl.cpp @@ -1,5 +1,3 @@ - -#include #include "compat.h" #define PI 3.141592653589793 diff --git a/source/tools/src/md2tool.cpp b/source/tools/src/md2tool.cpp index c4f39204d..ad962d9c7 100644 --- a/source/tools/src/md2tool.cpp +++ b/source/tools/src/md2tool.cpp @@ -4,9 +4,6 @@ #include "glbuild.h" #include "mdsprite.h" -#include -#include - static md2head_t head; diff --git a/source/tools/src/mkpalette.cpp b/source/tools/src/mkpalette.cpp index ba027cb85..2f7ddc4a0 100644 --- a/source/tools/src/mkpalette.cpp +++ b/source/tools/src/mkpalette.cpp @@ -1,6 +1,4 @@ -#include -#include -#include +#include "compat.h" struct hsv { float h, s, v; diff --git a/source/tools/src/unpackssi.cpp b/source/tools/src/unpackssi.cpp index f24f01059..9dfe5ae49 100644 --- a/source/tools/src/unpackssi.cpp +++ b/source/tools/src/unpackssi.cpp @@ -39,9 +39,7 @@ NOTE: This program does not fall under BUILDLIC. */ -#include -#include -#include +#include "compat.h" int main(int argc, char **argv) {