summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio/AudioManager.cpp7
-rw-r--r--src/audio/AudioManager.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 580093db..538ba7ae 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -10,6 +10,12 @@
cAudioManager &AudioManager = *(cAudioManager *)0x880FC0;
void
+cAudioManager::GenerateIntegerRandomNumberTable()
+{
+ for(int32 i = 0; i < 5; i++) { m_anRandomTable[i] = rand(); }
+}
+
+void
cAudioManager::PlayerJustLeftCar(void)
{
// UNUSED: This is a perfectly empty function.
@@ -2682,6 +2688,7 @@ cAudioManager::Service()
}
STARTPATCHES
+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 aa7d1f72..b37464bd 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -216,6 +216,8 @@ public:
char field_19195;
int m_nTimeOfRecentCrime;
+ void GenerateIntegerRandomNumberTable();
+
void PlayerJustLeftCar(void);
void Service();
void GetPhrase(uint32 *phrase, uint32 *prevPhrase, uint32 sample,