summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-06-05 22:32:49 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-06-11 18:23:09 +0200
commitc95f1ce2cee27b6d7d827328d51e65f3aa29162e (patch)
tree91954a6df9deb7e43973eec81b5183d6044962d2 /src
parentMerge pull request #7 from Fire-Head/master (diff)
downloadre3-c95f1ce2cee27b6d7d827328d51e65f3aa29162e.tar
re3-c95f1ce2cee27b6d7d827328d51e65f3aa29162e.tar.gz
re3-c95f1ce2cee27b6d7d827328d51e65f3aa29162e.tar.bz2
re3-c95f1ce2cee27b6d7d827328d51e65f3aa29162e.tar.lz
re3-c95f1ce2cee27b6d7d827328d51e65f3aa29162e.tar.xz
re3-c95f1ce2cee27b6d7d827328d51e65f3aa29162e.tar.zst
re3-c95f1ce2cee27b6d7d827328d51e65f3aa29162e.zip
Diffstat (limited to 'src')
-rw-r--r--src/Zones.cpp12
-rw-r--r--src/Zones.h2
2 files changed, 12 insertions, 2 deletions
diff --git a/src/Zones.cpp b/src/Zones.cpp
index 0f9bedfb..d4ce07f6 100644
--- a/src/Zones.cpp
+++ b/src/Zones.cpp
@@ -1,9 +1,12 @@
#include "common.h"
#include "patcher.h"
-#include "World.h"
-#include "Clock.h"
+
#include "Zones.h"
+#include "Clock.h"
+#include "Text.h"
+#include "World.h"
+
eLevelName &CTheZones::m_CurrLevel = *(eLevelName*)0x8F2BC8;
CZone *&CTheZones::m_pPlayersZone = *(CZone**)0x8F254C;
int16 &CTheZones::FindIndex = *(int16*)0x95CC40;
@@ -40,6 +43,10 @@ CheckZoneInfo(CZoneInfo *info)
assert(info->gangThreshold[7] <= info->gangThreshold[8]);
}
+wchar* CZone::GetTranslatedName() {
+ return TheText.Get(name);
+}
+
void
CTheZones::Init(void)
{
@@ -615,6 +622,7 @@ CTheZones::InitialiseAudioZoneArray(void)
}
STARTPATCHES
+ InjectHook(0x4B5DD0, &CZone::GetTranslatedName, PATCH_JUMP);
InjectHook(0x4B5DE0, CTheZones::Init, PATCH_JUMP);
InjectHook(0x4B61D0, CTheZones::Update, PATCH_JUMP);
InjectHook(0x4B6210, CTheZones::CreateZone, PATCH_JUMP);
diff --git a/src/Zones.h b/src/Zones.h
index 291e6f60..47a4dc47 100644
--- a/src/Zones.h
+++ b/src/Zones.h
@@ -27,6 +27,8 @@ public:
CZone *child;
CZone *parent;
CZone *next;
+
+ wchar *GetTranslatedName();
};
class CZoneInfo