summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-06-30 22:27:48 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-07-04 01:02:00 +0200
commit7488f094e2d380fbf2cb700b9848b85e6117eafc (patch)
treebf0fbb066cefd59063df4a0f7d229cdfbd7e288f
parentGenerateIntegerRandomNumberTable (diff)
downloadre3-7488f094e2d380fbf2cb700b9848b85e6117eafc.tar
re3-7488f094e2d380fbf2cb700b9848b85e6117eafc.tar.gz
re3-7488f094e2d380fbf2cb700b9848b85e6117eafc.tar.bz2
re3-7488f094e2d380fbf2cb700b9848b85e6117eafc.tar.lz
re3-7488f094e2d380fbf2cb700b9848b85e6117eafc.tar.xz
re3-7488f094e2d380fbf2cb700b9848b85e6117eafc.tar.zst
re3-7488f094e2d380fbf2cb700b9848b85e6117eafc.zip
Diffstat (limited to '')
-rw-r--r--src/audio/AudioManager.cpp8
-rw-r--r--src/audio/AudioManager.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 538ba7ae..2e5089bc 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -9,6 +9,12 @@
cAudioManager &AudioManager = *(cAudioManager *)0x880FC0;
+bool
+cAudioManager::IsAudioInitialised() const
+{
+ return m_bIsInitialised;
+}
+
void
cAudioManager::GenerateIntegerRandomNumberTable()
{
@@ -2688,6 +2694,8 @@ cAudioManager::Service()
}
STARTPATCHES
+
+InjectHook(0x57AA50, &cAudioManager::IsAudioInitialised, PATCH_JUMP);
InjectHook(0x57C290, &cAudioManager::GenerateIntegerRandomNumberTable, PATCH_JUMP);
InjectHook(0x56AD20, &cAudioManager::PlayerJustLeftCar, PATCH_JUMP);
InjectHook(0x570DB0, &cAudioManager::GetPhrase, PATCH_JUMP);
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index b37464bd..23f762b8 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -216,6 +216,7 @@ public:
char field_19195;
int m_nTimeOfRecentCrime;
+ bool IsAudioInitialised() const;
void GenerateIntegerRandomNumberTable();
void PlayerJustLeftCar(void);