From 777f2ee7c6ea2a17b64cd287c530f54efb116396 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 11 Apr 2020 18:13:17 +0200 Subject: [PATCH] - moved stringtable to 'common'. --- src/CMakeLists.txt | 2 +- src/{gamedata => common/engine}/gstrings.h | 0 src/common/engine/printf.h | 3 +++ src/{gamedata => common/engine}/stringtable.cpp | 3 --- src/{gamedata => common/engine}/stringtable.h | 0 src/gamedata/fonts/v_text.h | 4 ---- 6 files changed, 4 insertions(+), 8 deletions(-) rename src/{gamedata => common/engine}/gstrings.h (100%) rename src/{gamedata => common/engine}/stringtable.cpp (99%) rename src/{gamedata => common/engine}/stringtable.h (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 02df4dd3b..112c819e5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -897,7 +897,6 @@ set (PCH_SOURCES gamedata/g_mapinfo.cpp gamedata/g_skill.cpp gamedata/gi.cpp - gamedata/stringtable.cpp gamedata/umapinfo.cpp gamedata/d_dehacked.cpp gamedata/g_doomedmap.cpp @@ -1146,6 +1145,7 @@ set (PCH_SOURCES common/filesystem/resourcefile.cpp common/engine/sc_man.cpp common/engine/palettecontainer.cpp + common/engine/stringtable.cpp utility/m_png.cpp utility/m_random.cpp diff --git a/src/gamedata/gstrings.h b/src/common/engine/gstrings.h similarity index 100% rename from src/gamedata/gstrings.h rename to src/common/engine/gstrings.h diff --git a/src/common/engine/printf.h b/src/common/engine/printf.h index ef107ae64..70439f7a1 100644 --- a/src/common/engine/printf.h +++ b/src/common/engine/printf.h @@ -11,6 +11,9 @@ extern "C" int mysnprintf(char* buffer, size_t count, const char* format, ...) ATTRIBUTE((format(printf, 3, 4))); extern "C" int myvsnprintf(char* buffer, size_t count, const char* format, va_list argptr) ATTRIBUTE((format(printf, 3, 0))); +#define TEXTCOLOR_ESCAPE '\034' +#define TEXTCOLOR_ESCAPESTR "\034" + #define TEXTCOLOR_BRICK "\034A" #define TEXTCOLOR_TAN "\034B" #define TEXTCOLOR_GRAY "\034C" diff --git a/src/gamedata/stringtable.cpp b/src/common/engine/stringtable.cpp similarity index 99% rename from src/gamedata/stringtable.cpp rename to src/common/engine/stringtable.cpp index bf685c92e..a6cf61e96 100644 --- a/src/gamedata/stringtable.cpp +++ b/src/common/engine/stringtable.cpp @@ -38,9 +38,6 @@ #include "cmdlib.h" #include "filesystem.h" #include "sc_man.h" -#include "c_dispatch.h" -#include "v_text.h" -#include "c_cvars.h" #include "printf.h" //========================================================================== diff --git a/src/gamedata/stringtable.h b/src/common/engine/stringtable.h similarity index 100% rename from src/gamedata/stringtable.h rename to src/common/engine/stringtable.h diff --git a/src/gamedata/fonts/v_text.h b/src/gamedata/fonts/v_text.h index e16482fd4..7dbc13cdf 100644 --- a/src/gamedata/fonts/v_text.h +++ b/src/gamedata/fonts/v_text.h @@ -43,10 +43,6 @@ struct FBrokenLines FString Text; }; -#define TEXTCOLOR_ESCAPE '\034' -#define TEXTCOLOR_ESCAPESTR "\034" - - TArray V_BreakLines (FFont *font, int maxwidth, const uint8_t *str, bool preservecolor = false); inline TArray V_BreakLines (FFont *font, int maxwidth, const char *str, bool preservecolor = false) { return V_BreakLines (font, maxwidth, (const uint8_t *)str, preservecolor); }