From bb348acf57848d10e9a313a3af806189130136d2 Mon Sep 17 00:00:00 2001 From: Ted John Date: Tue, 13 Sep 2016 23:27:29 +0100 Subject: [PATCH] Remove original string support --- src/localisation/language.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/localisation/language.cpp b/src/localisation/language.cpp index 86c379a168..82729db939 100644 --- a/src/localisation/language.cpp +++ b/src/localisation/language.cpp @@ -20,7 +20,6 @@ extern "C" { -#include "../addresses.h" #include "../config.h" #include "../drawing/drawing.h" #include "../object.h" @@ -110,10 +109,6 @@ bool gUseTrueTypeFont = false; LanguagePack *_languageFallback = nullptr; LanguagePack *_languageCurrent = nullptr; -// This is `const char**` in reality, but needs to be represented as uint32's -// for 64 bit builds -const uint32 *_languageOriginal = RCT2_ADDRESS(0x009BF2D4, uint32); - const utf8 BlackUpArrowString[] = { (utf8)0xC2, (utf8)0x8E, (utf8)0xE2, (utf8)0x96, (utf8)0xB2, (utf8)0x00 }; const utf8 BlackDownArrowString[] = { (utf8)0xC2, (utf8)0x8E, (utf8)0xE2, (utf8)0x96, (utf8)0xBC, (utf8)0x00 }; const utf8 BlackLeftArrowString[] = { (utf8)0xC2, (utf8)0x8E, (utf8)0xE2, (utf8)0x97, (utf8)0x80, (utf8)0x00 }; @@ -144,14 +139,10 @@ const char *language_get_string(rct_string_id id) openrctString = _languageCurrent->GetString(id); if (openrctString == nullptr && _languageFallback != nullptr) openrctString = _languageFallback->GetString(id); + if (openrctString == nullptr) + openrctString = "(undefined string)"; - if (id >= STR_OPENRCT2_BEGIN_STRING_ID) { - return openrctString != nullptr ? openrctString : "(undefined string)"; - } else { - const char *rct = RCT2_ADDRESS((uintptr_t)_languageOriginal[id], char); - const char *str = (id != STR_EMPTY && (openrctString == nullptr || strlen(openrctString)) == 0 ? rct : openrctString); - return str == nullptr ? "" : str; - } + return openrctString; } bool language_open(int id)