From 83a760874bc97023f52ab5e02836b0349f9daf7f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 20 Jun 2020 18:01:02 +0200 Subject: [PATCH] - removed some Build related includes from core code. --- source/core/console/c_console.cpp | 1 - source/core/gamecvars.cpp | 2 +- source/core/menu/listmenu.cpp | 1 - source/core/menu/loadsavemenu.cpp | 2 +- source/core/menu/menu.cpp | 1 - source/core/menu/menu.h | 2 +- source/core/menu/messagebox.cpp | 1 + source/core/menu/optionmenuitems.h | 1 + source/core/menu/resolutionmenu.cpp | 1 + source/core/palette.cpp | 1 - source/core/savegamehelp.cpp | 2 +- source/core/screenshot.cpp | 3 --- source/core/statistics.cpp | 3 ++- source/core/textures/buildtiles.cpp | 1 - source/glbackend/gl_palmanager.cpp | 1 - source/glbackend/glbackend.cpp | 1 - 16 files changed, 9 insertions(+), 15 deletions(-) diff --git a/source/core/console/c_console.cpp b/source/core/console/c_console.cpp index 5840bbace..656028f8c 100644 --- a/source/core/console/c_console.cpp +++ b/source/core/console/c_console.cpp @@ -55,7 +55,6 @@ #include "inputstate.h" #include "i_time.h" #include "gamecvars.h" -#include "baselayer.h" #include "i_system.h" #include "s_soundinternal.h" #include "engineerrors.h" diff --git a/source/core/gamecvars.cpp b/source/core/gamecvars.cpp index 1bee17dff..179395d3f 100644 --- a/source/core/gamecvars.cpp +++ b/source/core/gamecvars.cpp @@ -36,7 +36,6 @@ #include "c_cvars.h" #include "common.h" -#include "baselayer.h" #include "gameconfigfile.h" #include "gamecontrol.h" #include "m_argv.h" @@ -46,6 +45,7 @@ #include "c_dispatch.h" #include "gstrings.h" #include "quotemgr.h" +#include "gamestruct.h" #define CVAR_FRONTEND_BLOOD 0 #define CVAR_FRONTEND_DUKELIKE 0 diff --git a/source/core/menu/listmenu.cpp b/source/core/menu/listmenu.cpp index 8beb4a63c..c5df2b9af 100644 --- a/source/core/menu/listmenu.cpp +++ b/source/core/menu/listmenu.cpp @@ -39,7 +39,6 @@ #include "d_event.h" #include "menu.h" #include "v_draw.h" -#include "baselayer.h" #include "gamecontrol.h" #include "build.h" #include "v_video.h" diff --git a/source/core/menu/loadsavemenu.cpp b/source/core/menu/loadsavemenu.cpp index 2469b16f6..944b928ea 100644 --- a/source/core/menu/loadsavemenu.cpp +++ b/source/core/menu/loadsavemenu.cpp @@ -113,7 +113,7 @@ protected: savepicHeight = int(180 * wScale); - FontScale = max(screen->GetHeight() / 480, 1); + FontScale = std::max(screen->GetHeight() / 480, 1); rowHeight = std::max(int((NewConsoleFont->GetHeight() + 1) * FontScale), 1); listboxLeft = savepicLeft + savepicWidth + int(20 * wScale); listboxTop = savepicTop; diff --git a/source/core/menu/menu.cpp b/source/core/menu/menu.cpp index 901120099..3f75d5b18 100644 --- a/source/core/menu/menu.cpp +++ b/source/core/menu/menu.cpp @@ -50,7 +50,6 @@ #include "gamecontrol.h" #include "pragmas.h" #include "build.h" -#include "baselayer.h" #include "statistics.h" #include "m_joy.h" #include "raze_sound.h" diff --git a/source/core/menu/menu.h b/source/core/menu/menu.h index 9458ecc6f..7c04cf30c 100644 --- a/source/core/menu/menu.h +++ b/source/core/menu/menu.h @@ -9,9 +9,9 @@ #include "version.h" #include "textures.h" #include "zstring.h" -#include "baselayer.h" #include "v_draw.h" #include "menustate.h" +#include "gamestruct.h" EXTERN_CVAR(Float, snd_menuvolume) EXTERN_CVAR(Int, m_use_mouse); diff --git a/source/core/menu/messagebox.cpp b/source/core/menu/messagebox.cpp index 232114894..f1efd8ea0 100644 --- a/source/core/menu/messagebox.cpp +++ b/source/core/menu/messagebox.cpp @@ -42,6 +42,7 @@ #include "statistics.h" #include "v_2ddrawer.h" #include "v_video.h" +#include "engineerrors.h" extern FSaveGameNode *quickSaveSlot; diff --git a/source/core/menu/optionmenuitems.h b/source/core/menu/optionmenuitems.h index 2fa8b31a8..28d922cd3 100644 --- a/source/core/menu/optionmenuitems.h +++ b/source/core/menu/optionmenuitems.h @@ -36,6 +36,7 @@ #include "gstrings.h" #include "v_font.h" #include "cmdlib.h" +#include "templates.h" void M_DrawConText (int color, int x, int y, const char *str); diff --git a/source/core/menu/resolutionmenu.cpp b/source/core/menu/resolutionmenu.cpp index 692e5c264..6074d018a 100644 --- a/source/core/menu/resolutionmenu.cpp +++ b/source/core/menu/resolutionmenu.cpp @@ -36,6 +36,7 @@ #include "c_cvars.h" #include "v_video.h" #include "menu.h" +#include "printf.h" CVAR(Int, menu_resolution_custom_width, 640, 0) CVAR(Int, menu_resolution_custom_height, 480, 0) diff --git a/source/core/palette.cpp b/source/core/palette.cpp index 73b66e369..e1c2c9054 100644 --- a/source/core/palette.cpp +++ b/source/core/palette.cpp @@ -32,7 +32,6 @@ */ #include "build.h" -#include "baselayer.h" #include "imagehelpers.h" #include "palette.h" diff --git a/source/core/savegamehelp.cpp b/source/core/savegamehelp.cpp index 88143f61f..6d036c0c3 100644 --- a/source/core/savegamehelp.cpp +++ b/source/core/savegamehelp.cpp @@ -35,7 +35,6 @@ #include "compositesaveame.h" #include "savegamehelp.h" -#include "baselayer.h" #include "gstrings.h" #include "i_specialpaths.h" #include "cmdlib.h" @@ -51,6 +50,7 @@ #include "version.h" #include "raze_music.h" #include "raze_sound.h" +#include "gamestruct.h" static CompositeSavegameWriter savewriter; static FResourceFile *savereader; diff --git a/source/core/screenshot.cpp b/source/core/screenshot.cpp index 54f29a217..f49b0f0c8 100644 --- a/source/core/screenshot.cpp +++ b/source/core/screenshot.cpp @@ -31,9 +31,6 @@ ** */ -#include "compat.h" -#include "build.h" -#include "baselayer.h" #include "version.h" #include "m_png.h" #include "i_specialpaths.h" diff --git a/source/core/statistics.cpp b/source/core/statistics.cpp index 73bbdb42e..e2661771d 100644 --- a/source/core/statistics.cpp +++ b/source/core/statistics.cpp @@ -44,11 +44,12 @@ #include "stats.h" #include "c_cvars.h" #include "sc_man.h" -#include "baselayer.h" #include "serializer.h" #include "gstrings.h" #include "version.h" #include "engineerrors.h" +#include "gamestruct.h" +#include "printf.h" CVAR(Int, savestatistics, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) CVAR(String, statfile, GAMENAMELOWERCASE "stat.txt", CVAR_ARCHIVE|CVAR_GLOBALCONFIG) diff --git a/source/core/textures/buildtiles.cpp b/source/core/textures/buildtiles.cpp index e5132a6a0..e666fab5e 100644 --- a/source/core/textures/buildtiles.cpp +++ b/source/core/textures/buildtiles.cpp @@ -38,7 +38,6 @@ #include "buildtiles.h" #include "image.h" -#include "baselayer.h" #include "palette.h" #include "m_crc32.h" #include "build.h" diff --git a/source/glbackend/gl_palmanager.cpp b/source/glbackend/gl_palmanager.cpp index dcbe10cbe..c3f4a9840 100644 --- a/source/glbackend/gl_palmanager.cpp +++ b/source/glbackend/gl_palmanager.cpp @@ -37,7 +37,6 @@ #include "m_crc32.h" #include "glbackend.h" -#include "baselayer.h" #include "resourcefile.h" #include "imagehelpers.h" #include "v_font.h" diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index 9401b4786..681ff5989 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -38,7 +38,6 @@ #include "textures.h" #include "palette.h" #include "gamecontrol.h" -#include "baselayer.h" #include "v_2ddrawer.h" #include "v_video.h" #include "flatvertices.h"