From a951996943382bc0952f19409bb5fa738f3cd58f Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 20 Jul 2019 18:00:57 +0300 Subject: added CPool --- src/audio/AudioManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/audio/AudioManager.cpp') diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index 07469b87..368c08e8 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -13,6 +13,7 @@ #include "Physical.h" #include "Plane.h" #include "PlayerPed.h" +#include "Pools.h" #include "SampleManager.h" #include "Stats.h" #include "Vehicle.h" @@ -94,6 +95,11 @@ enum eVehicleModel { CAR159, }; +void *cAudioScriptObject::operator new(size_t sz) { return CPools::GetAudioScriptObjectPool()->New(); } +void *cAudioScriptObject::operator new(size_t sz, int handle) { return CPools::GetAudioScriptObjectPool()->New(handle); } +void cAudioScriptObject::operator delete(void *p, size_t sz) { CPools::GetAudioScriptObjectPool()->Delete((cAudioScriptObject*)p); } +void cAudioScriptObject::operator delete(void *p, int handle) { CPools::GetAudioScriptObjectPool()->Delete((cAudioScriptObject*)p); } + cAudioManager &AudioManager = *(cAudioManager *)0x880FC0; constexpr int totalAudioEntitiesSlots = 200; -- cgit v1.2.3