mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove original string support
This commit is contained in:
parent
de8e5b9f55
commit
bb348acf57
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue