diff --git a/r5dev/codecs/Miles/miles_impl.cpp b/r5dev/codecs/Miles/miles_impl.cpp index c94a5566..cf493d36 100644 --- a/r5dev/codecs/Miles/miles_impl.cpp +++ b/r5dev/codecs/Miles/miles_impl.cpp @@ -36,12 +36,20 @@ void MilesQueueEventRun(Miles::Queue* queue, const char* eventName) v_MilesQueueEventRun(queue, eventName); } + +void MilesBankPatch(Miles::Bank* bank, char* streamPatch, char* localizedStreamPatch) +{ + // TODO [REXX]: add print for patch loading when Miles::Bank struct is mapped out a bit better with file name + v_MilesBankPatch(bank, streamPatch, localizedStreamPatch); +} + /////////////////////////////////////////////////////////////////////////////// void MilesCore_Attach() { DetourAttach(&v_AIL_LogFunc, &AIL_LogFunc); DetourAttach(&v_Miles_Initialize, &Miles_Initialize); DetourAttach(&v_MilesQueueEventRun, &MilesQueueEventRun); + DetourAttach(&v_MilesBankPatch, &MilesBankPatch); } void MilesCore_Detach() @@ -49,4 +57,5 @@ void MilesCore_Detach() DetourDetach(&v_AIL_LogFunc, &AIL_LogFunc); DetourDetach(&v_Miles_Initialize, &Miles_Initialize); DetourDetach(&v_MilesQueueEventRun, &MilesQueueEventRun); + DetourDetach(&v_MilesBankPatch, &MilesBankPatch); } \ No newline at end of file diff --git a/r5dev/codecs/Miles/miles_impl.h b/r5dev/codecs/Miles/miles_impl.h index ab2952fc..5fd15e3d 100644 --- a/r5dev/codecs/Miles/miles_impl.h +++ b/r5dev/codecs/Miles/miles_impl.h @@ -10,6 +10,10 @@ inline auto v_Miles_Initialize = p_Miles_Initialize.RCast(); inline CMemory p_MilesQueueEventRun; inline auto v_MilesQueueEventRun = p_MilesQueueEventRun.RCast(); + +inline CMemory p_MilesBankPatch; +inline auto v_MilesBankPatch = p_MilesBankPatch.RCast(); + void MilesCore_Attach(); void MilesCore_Detach(); @@ -34,6 +38,10 @@ class MilesCore : public IDetour p_MilesQueueEventRun = g_RadAudioSystemDll.GetExportedFunction("MilesQueueEventRun"); v_MilesQueueEventRun = p_MilesQueueEventRun.RCast(); + + p_MilesBankPatch = g_RadAudioSystemDll.GetExportedFunction("MilesBankPatch"); + v_MilesBankPatch = p_MilesBankPatch.RCast(); + } virtual void GetVar(void) const { } virtual void GetCon(void) const { } diff --git a/r5dev/codecs/Miles/miles_types.h b/r5dev/codecs/Miles/miles_types.h index 218ca811..726be179 100644 --- a/r5dev/codecs/Miles/miles_types.h +++ b/r5dev/codecs/Miles/miles_types.h @@ -8,4 +8,9 @@ namespace Miles void* unk; char gap10[0x20]; }; + + struct Bank + { + // TODO [REXX]: map out this struct and its internal counterpart + }; } \ No newline at end of file