summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-06-30 22:06:38 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-07-04 01:02:00 +0200
commitc6256aab4fe6145a81030b922f93ff60f91c88eb (patch)
tree3cbaeb36e2e69835b4cf5064b374ae847f605a60 /src
parentMerge pull request #107 from Nick007J/master (diff)
downloadre3-c6256aab4fe6145a81030b922f93ff60f91c88eb.tar
re3-c6256aab4fe6145a81030b922f93ff60f91c88eb.tar.gz
re3-c6256aab4fe6145a81030b922f93ff60f91c88eb.tar.bz2
re3-c6256aab4fe6145a81030b922f93ff60f91c88eb.tar.lz
re3-c6256aab4fe6145a81030b922f93ff60f91c88eb.tar.xz
re3-c6256aab4fe6145a81030b922f93ff60f91c88eb.tar.zst
re3-c6256aab4fe6145a81030b922f93ff60f91c88eb.zip
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,