1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-10 19:39:16 +00:00

RequireDigitalHandle

This commit is contained in:
Filip Gawin 2019-07-01 00:07:58 +02:00
parent 9357e5cc83
commit 0ec77e8329
4 changed files with 30 additions and 5 deletions

View file

@ -18,7 +18,14 @@ cAudioManager::ReleaseDigitalHandle()
if(m_bIsInitialised) { cSampleManager.ReleaseDigitalHandle(); }
}
void cAudioManager::SetDynamicAcousticModelingStatus(bool status)
void
cAudioManager::RequireDigitalHandle()
{
if(m_bIsInitialised) { cSampleManager.RequireDigitalHandle(); }
}
void
cAudioManager::SetDynamicAcousticModelingStatus(bool status)
{
m_bDynamicAcousticModelingStatus = status;
}
@ -2807,14 +2814,22 @@ cAudioManager::Service()
}
STARTPATCHES
InjectHook(0x57A4C0, &cAudioManager::SetEntityStatus, PATCH_JUMP);
InjectHook(0x569570, &cAudioManager::PreTerminateGameSpecificShutdown, PATCH_JUMP);
InjectHook(0x57A9E0, &cAudioManager::ReleaseDigitalHandle, PATCH_JUMP);
InjectHook(0x57A9F0, &cAudioManager::RequireDigitalHandle, PATCH_JUMP);
InjectHook(0x57AA00, &cAudioManager::SetDynamicAcousticModelingStatus, PATCH_JUMP);
InjectHook(0x57AA50, &cAudioManager::IsAudioInitialised, PATCH_JUMP);
InjectHook(0x57A310, &cAudioManager::CreateEntity, PATCH_JUMP);
InjectHook(0x57A400, &cAudioManager::DestroyEntity, PATCH_JUMP);
InjectHook(0x57A4C0, &cAudioManager::SetEntityStatus, PATCH_JUMP);
InjectHook(0x569570, &cAudioManager::PreTerminateGameSpecificShutdown, PATCH_JUMP);
InjectHook(0x569640, &cAudioManager::PostTerminateGameSpecificShutdown, PATCH_JUMP);
InjectHook(0x57AA00, &cAudioManager::SetDynamicAcousticModelingStatus, PATCH_JUMP);
InjectHook(0x57AA50, &cAudioManager::IsAudioInitialised, PATCH_JUMP);
InjectHook(0x57C290, &cAudioManager::GenerateIntegerRandomNumberTable, PATCH_JUMP);
InjectHook(0x56AD10, &cAudioManager::PlayerJustGotInCar, PATCH_JUMP);
InjectHook(0x56AD20, &cAudioManager::PlayerJustLeftCar, PATCH_JUMP);
InjectHook(0x570DB0, &cAudioManager::GetPhrase, PATCH_JUMP);

View file

@ -217,6 +217,7 @@ public:
int m_nTimeOfRecentCrime;
void ReleaseDigitalHandle();
void RequireDigitalHandle();
void SetDynamicAcousticModelingStatus(bool status);
bool IsAudioInitialised() const;

View file

@ -1,4 +1,5 @@
#include "common.h"
#include "patcher.h"
#include "SampleManager.h"
CSampleManager &cSampleManager = *(CSampleManager *)0x7341E0;
@ -13,3 +14,10 @@ CSampleManager::ReleaseDigitalHandle()
{
EAXJMP(0x5664B0);
}
WRAPPER
void
CSampleManager::RequireDigitalHandle()
{
EAXJMP(0x5664F0);
}

View file

@ -6,6 +6,7 @@ public:
public:
void ReleaseDigitalHandle();
void RequireDigitalHandle();
static bool IsMP3RadioChannelAvailable();
};