2019-06-24 10:57:54 -04: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 13:56:45 -04: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 08:25:39 -04:00
|
|
|
WRAPPER void cAudioManager::Service() { EAXJMP(0x57A2A0); }
|
|
|
|
|
2019-06-24 10:57:54 -04:00
|
|
|
STARTPATCHES
|
|
|
|
InjectHook(0x56AD20, &cAudioManager::PlayerJustLeftCar, PATCH_JUMP);
|
2019-06-12 13:56:45 -04:00
|
|
|
InjectHook(0x570DB0, &cAudioManager::GetPhrase, PATCH_JUMP);
|
|
|
|
ENDPATCHES
|