diff --git a/common/main/text.h b/common/main/text.h index 4a5865850..2f343eca1 100644 --- a/common/main/text.h +++ b/common/main/text.h @@ -1280,10 +1280,6 @@ void decode_text(char *text, int len); // decryption for briefings, etc. #ifdef dsx namespace dsx { void load_text(void); - -} -#endif -#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II) #ifndef USE_BUILTIN_ENGLISH_TEXT_STRINGS //Array of pointers to text extern array Text_string; @@ -1300,6 +1296,7 @@ static inline const char *dxx_gettext(unsigned expr, const char *fmt) return Text_string[expr]; #endif } +} #endif #endif diff --git a/similar/main/text.cpp b/similar/main/text.cpp index 50d2190dd..4a86f8ddb 100644 --- a/similar/main/text.cpp +++ b/similar/main/text.cpp @@ -52,8 +52,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. static std::unique_ptr text; static std::unique_ptr overwritten_text; -array Text_string; - // rotates a byte left one bit, preserving the bit falling off the right static void encode_rotate_left(char *c) { @@ -92,6 +90,12 @@ void decode_text(char *buf, int len) //load all the text strings for Descent namespace dsx { + +#ifdef USE_BUILTIN_ENGLISH_TEXT_STRINGS +static +#endif +array Text_string; + void load_text() { int len,i, have_binary = 0;