summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio/AudioManager.cpp25
-rw-r--r--src/audio/AudioManager.h1
-rw-r--r--src/audio/SampleManager.cpp8
-rw-r--r--src/audio/SampleManager.h1
4 files changed, 30 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);
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 9cbb82b4..6b320b60 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -217,6 +217,7 @@ public:
int m_nTimeOfRecentCrime;
void ReleaseDigitalHandle();
+ void RequireDigitalHandle();
void SetDynamicAcousticModelingStatus(bool status);
bool IsAudioInitialised() const;
diff --git a/src/audio/SampleManager.cpp b/src/audio/SampleManager.cpp
index 2f27a3fa..ca08ad8b 100644
--- a/src/audio/SampleManager.cpp
+++ b/src/audio/SampleManager.cpp
@@ -1,4 +1,5 @@
#include "common.h"
+#include "patcher.h"
#include "SampleManager.h"
CSampleManager &cSampleManager = *(CSampleManager *)0x7341E0;
@@ -13,3 +14,10 @@ CSampleManager::ReleaseDigitalHandle()
{
EAXJMP(0x5664B0);
}
+
+WRAPPER
+void
+CSampleManager::RequireDigitalHandle()
+{
+ EAXJMP(0x5664F0);
+}
diff --git a/src/audio/SampleManager.h b/src/audio/SampleManager.h
index 8486cb52..e688b3fb 100644
--- a/src/audio/SampleManager.h
+++ b/src/audio/SampleManager.h
@@ -6,6 +6,7 @@ public:
public:
void ReleaseDigitalHandle();
+ void RequireDigitalHandle();
static bool IsMP3RadioChannelAvailable();
};