summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioManager.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-07-01 00:07:58 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-07-04 01:02:00 +0200
commit0ec77e8329210301a87fe9b9953b820c09c6505b (patch)
tree9da01b0d91762a94fc9d6687d9c562480df4c97b /src/audio/AudioManager.cpp
parentReleaseDigitalHandle (diff)
downloadre3-0ec77e8329210301a87fe9b9953b820c09c6505b.tar
re3-0ec77e8329210301a87fe9b9953b820c09c6505b.tar.gz
re3-0ec77e8329210301a87fe9b9953b820c09c6505b.tar.bz2
re3-0ec77e8329210301a87fe9b9953b820c09c6505b.tar.lz
re3-0ec77e8329210301a87fe9b9953b820c09c6505b.tar.xz
re3-0ec77e8329210301a87fe9b9953b820c09c6505b.tar.zst
re3-0ec77e8329210301a87fe9b9953b820c09c6505b.zip
Diffstat (limited to 'src/audio/AudioManager.cpp')
-rw-r--r--src/audio/AudioManager.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 89d8332a..d9b7fee2 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -18,7 +18,14 @@ cAudioManager::ReleaseDigitalHandle()
if(m_bIsInitialised) { cSampleManager.ReleaseDigitalHandle(); }
}
-void cAudioManager::SetDynamicAcousticModelingStatus(bool status)
+void
+cAudioManager::RequireDigitalHandle()
+{
+ if(m_bIsInitialised) { cSampleManager.RequireDigitalHandle(); }
+}
+
+void
+cAudioManager::SetDynamicAcousticModelingStatus(bool status)
{
m_bDynamicAcousticModelingStatus = status;
}
@@ -2807,14 +2814,22 @@ cAudioManager::Service()
}
STARTPATCHES
-InjectHook(0x57A4C0, &cAudioManager::SetEntityStatus, PATCH_JUMP);
-InjectHook(0x569570, &cAudioManager::PreTerminateGameSpecificShutdown, PATCH_JUMP);
+
+InjectHook(0x57A9E0, &cAudioManager::ReleaseDigitalHandle, PATCH_JUMP);
+InjectHook(0x57A9F0, &cAudioManager::RequireDigitalHandle, PATCH_JUMP);
+InjectHook(0x57AA00, &cAudioManager::SetDynamicAcousticModelingStatus, PATCH_JUMP);
+
+InjectHook(0x57AA50, &cAudioManager::IsAudioInitialised, PATCH_JUMP);
+
InjectHook(0x57A310, &cAudioManager::CreateEntity, PATCH_JUMP);
InjectHook(0x57A400, &cAudioManager::DestroyEntity, PATCH_JUMP);
+InjectHook(0x57A4C0, &cAudioManager::SetEntityStatus, PATCH_JUMP);
+
+InjectHook(0x569570, &cAudioManager::PreTerminateGameSpecificShutdown, PATCH_JUMP);
InjectHook(0x569640, &cAudioManager::PostTerminateGameSpecificShutdown, PATCH_JUMP);
-InjectHook(0x57AA00, &cAudioManager::SetDynamicAcousticModelingStatus, PATCH_JUMP);
-InjectHook(0x57AA50, &cAudioManager::IsAudioInitialised, PATCH_JUMP);
+
InjectHook(0x57C290, &cAudioManager::GenerateIntegerRandomNumberTable, PATCH_JUMP);
+
InjectHook(0x56AD10, &cAudioManager::PlayerJustGotInCar, PATCH_JUMP);
InjectHook(0x56AD20, &cAudioManager::PlayerJustLeftCar, PATCH_JUMP);
InjectHook(0x570DB0, &cAudioManager::GetPhrase, PATCH_JUMP);