diff options
author | erorcun <erayorcunus@gmail.com> | 2021-01-13 12:03:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-13 12:03:48 +0100 |
commit | 679755de35d2263e67473a47ce8da8b59f29bfbb (patch) | |
tree | 3391ccc6cb23b2e9eb499425274b3fb44c66bfad /src/text | |
parent | move TODO to Readme (diff) | |
parent | Fix build without FIX_BUGS, divide to 0 fixes (diff) | |
download | re3-679755de35d2263e67473a47ce8da8b59f29bfbb.tar re3-679755de35d2263e67473a47ce8da8b59f29bfbb.tar.gz re3-679755de35d2263e67473a47ce8da8b59f29bfbb.tar.bz2 re3-679755de35d2263e67473a47ce8da8b59f29bfbb.tar.lz re3-679755de35d2263e67473a47ce8da8b59f29bfbb.tar.xz re3-679755de35d2263e67473a47ce8da8b59f29bfbb.tar.zst re3-679755de35d2263e67473a47ce8da8b59f29bfbb.zip |
Diffstat (limited to 'src/text')
-rw-r--r-- | src/text/Text.cpp | 10 | ||||
-rw-r--r-- | src/text/Text.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/text/Text.cpp b/src/text/Text.cpp index 5f7a07cc..7afd64d2 100644 --- a/src/text/Text.cpp +++ b/src/text/Text.cpp @@ -111,14 +111,14 @@ wchar* CText::Get(const char *key) { uint8 result = false; -#ifdef FIX_BUGS +#if defined (FIX_BUGS) || defined(FIX_BUGS_64) wchar *outstr = keyArray.Search(key, data.chars, &result); #else wchar *outstr = keyArray.Search(key, &result); #endif if (!result && bHasMissionTextOffsets && bIsMissionTextLoaded) -#ifdef FIX_BUGS +#if defined (FIX_BUGS) || defined(FIX_BUGS_64) outstr = mission_keyArray.Search(key, mission_data.chars, &result); #else outstr = mission_keyArray.Search(key, &result); @@ -340,7 +340,7 @@ CKeyArray::Unload(void) void CKeyArray::Update(wchar *chars) { -#ifndef FIX_BUGS +#if !defined(FIX_BUGS) && !defined(FIX_BUGS_64) int i; for(i = 0; i < numEntries; i++) entries[i].value = (wchar*)((uint8*)chars + (uintptr)entries[i].value); @@ -368,7 +368,7 @@ CKeyArray::BinarySearch(const char *key, CKeyEntry *entries, int16 low, int16 hi } wchar* -#ifdef FIX_BUGS +#if defined (FIX_BUGS) || defined(FIX_BUGS_64) CKeyArray::Search(const char *key, wchar *data, uint8 *result) #else CKeyArray::Search(const char *key, uint8 *result) @@ -378,7 +378,7 @@ CKeyArray::Search(const char *key, uint8 *result) char errstr[25]; int i; -#ifdef FIX_BUGS +#if defined (FIX_BUGS) || defined(FIX_BUGS_64) found = BinarySearch(key, entries, 0, numEntries-1); if (found) { *result = true; diff --git a/src/text/Text.h b/src/text/Text.h index 33dc313e..1174216c 100644 --- a/src/text/Text.h +++ b/src/text/Text.h @@ -7,7 +7,7 @@ void TextCopy(wchar *dst, const wchar *src); struct CKeyEntry { -#ifdef FIX_BUGS +#if defined(FIX_BUGS) || defined(FIX_BUGS_64) uint32 valueOffset; #else wchar *value; @@ -30,7 +30,7 @@ public: void Unload(void); void Update(wchar *chars); CKeyEntry *BinarySearch(const char *key, CKeyEntry *entries, int16 low, int16 high); -#ifdef FIX_BUGS +#if defined (FIX_BUGS) || defined(FIX_BUGS_64) wchar *Search(const char *key, wchar *data, uint8 *result); #else wchar *Search(const char *key, uint8* result); |