Re3/src/audio/AudioManager.cpp

31 lines
825 B
C++
Raw Normal View History

#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); }
STARTPATCHES
InjectHook(0x56AD20, &cAudioManager::PlayerJustLeftCar, PATCH_JUMP);
2019-06-12 13:56:45 -04:00
InjectHook(0x570DB0, &cAudioManager::GetPhrase, PATCH_JUMP);
ENDPATCHES