2019-06-24 14:57:54 +00:00
|
|
|
#include "common.h"
|
|
|
|
#include "patcher.h"
|
|
|
|
#include "AudioManager.h"
|
|
|
|
|
|
|
|
cAudioManager &AudioManager = *(cAudioManager*)0x880FC0;
|
|
|
|
|
|
|
|
void
|
|
|
|
cAudioManager::PlayerJustLeftCar(void)
|
|
|
|
{
|
|
|
|
// UNUSED: This is a perfectly empty function.
|
|
|
|
}
|
|
|
|
|
2019-06-12 17:56:45 +00:00
|
|
|
void
|
|
|
|
cAudioManager::GetPhrase(uint32 *phrase, uint32 *prevPhrase,
|
|
|
|
eAudioSamples sample, uint32 maxOffset)
|
|
|
|
{
|
|
|
|
*phrase = (uint32)sample +
|
|
|
|
(uint32)m_anRandomTable[m_sQueueSample.m_nEntityIndex & 3] %
|
|
|
|
maxOffset;
|
|
|
|
if(*phrase == *prevPhrase && ++*phrase >= (uint32)sample + maxOffset)
|
|
|
|
*phrase = (uint32)sample;
|
|
|
|
*prevPhrase = *phrase;
|
|
|
|
}
|
|
|
|
|
2019-06-25 12:25:39 +00:00
|
|
|
WRAPPER void cAudioManager::Service() { EAXJMP(0x57A2A0); }
|
|
|
|
|
2019-06-24 14:57:54 +00:00
|
|
|
STARTPATCHES
|
|
|
|
InjectHook(0x56AD20, &cAudioManager::PlayerJustLeftCar, PATCH_JUMP);
|
2019-06-12 17:56:45 +00:00
|
|
|
InjectHook(0x570DB0, &cAudioManager::GetPhrase, PATCH_JUMP);
|
|
|
|
ENDPATCHES
|