@@ -104,7 +104,7 @@ CGameSA::CGameSA()
104104 m_pAESoundManager = new CAESoundManagerSA ((CAESoundManagerSAInterface*)CLASS_CAESoundManager);
105105 m_pAudioContainer = new CAudioContainerSA ();
106106 m_pWorld = new CWorldSA ();
107- m_pPools = new CPoolsSA ();
107+ m_Pools = std::make_unique< CPoolsSA> ();
108108 m_pClock = new CClockSA ();
109109 m_pRadar = new CRadarSA ();
110110 m_pCamera = new CCameraSA ((CCameraSAInterface*)CLASS_CCamera);
@@ -125,7 +125,7 @@ CGameSA::CGameSA()
125125 m_pControllerConfigManager = new CControllerConfigManagerSA ();
126126 m_pProjectileInfo = new CProjectileInfoSA ();
127127 m_pRenderWare = new CRenderWareSA ();
128- m_pHandlingManager = new CHandlingManagerSA ();
128+ m_HandlingManager = std::make_unique< CHandlingManagerSA> ();
129129 m_pEventList = new CEventListSA ();
130130 m_pGarages = new CGaragesSA ((CGaragesSAInterface*)CLASS_CGarages);
131131 m_pTasks = new CTasksSA ((CTaskManagementSystemSA*)m_pTaskManagementSystem);
@@ -208,17 +208,17 @@ CGameSA::CGameSA()
208208 m_Cheats[CHEAT_HEALTARMORMONEY] = new SCheatSA ((BYTE*)VAR_HealthArmorMoney, false );
209209
210210 // Change pool sizes here
211- m_pPools ->SetPoolCapacity (TASK_POOL, 5000 ); // Default is 500
212- m_pPools ->SetPoolCapacity (OBJECT_POOL, MAX_OBJECTS); // Default is 350
213- m_pPools ->SetPoolCapacity (EVENT_POOL, 5000 ); // Default is 200
214- m_pPools ->SetPoolCapacity (COL_MODEL_POOL, 12000 ); // Default is 10150
215- m_pPools ->SetPoolCapacity (ENV_MAP_MATERIAL_POOL, 16000 ); // Default is 4096
216- m_pPools ->SetPoolCapacity (ENV_MAP_ATOMIC_POOL, 4000 ); // Default is 1024
217- m_pPools ->SetPoolCapacity (SPEC_MAP_MATERIAL_POOL, 16000 ); // Default is 4096
218- m_pPools ->SetPoolCapacity (ENTRY_INFO_NODE_POOL, MAX_ENTRY_INFO_NODES); // Default is 500
219- m_pPools ->SetPoolCapacity (POINTER_SINGLE_LINK_POOL, MAX_POINTER_SINGLE_LINKS); // Default is 70000
220- m_pPools ->SetPoolCapacity (POINTER_DOUBLE_LINK_POOL, MAX_POINTER_DOUBLE_LINKS); // Default is 3200
221- dassert (m_pPools ->GetPoolCapacity (POINTER_SINGLE_LINK_POOL) == MAX_POINTER_SINGLE_LINKS);
211+ m_Pools ->SetPoolCapacity (TASK_POOL, 5000 ); // Default is 500
212+ m_Pools ->SetPoolCapacity (OBJECT_POOL, MAX_OBJECTS); // Default is 350
213+ m_Pools ->SetPoolCapacity (EVENT_POOL, 5000 ); // Default is 200
214+ m_Pools ->SetPoolCapacity (COL_MODEL_POOL, 12000 ); // Default is 10150
215+ m_Pools ->SetPoolCapacity (ENV_MAP_MATERIAL_POOL, 16000 ); // Default is 4096
216+ m_Pools ->SetPoolCapacity (ENV_MAP_ATOMIC_POOL, 4000 ); // Default is 1024
217+ m_Pools ->SetPoolCapacity (SPEC_MAP_MATERIAL_POOL, 16000 ); // Default is 4096
218+ m_Pools ->SetPoolCapacity (ENTRY_INFO_NODE_POOL, MAX_ENTRY_INFO_NODES); // Default is 500
219+ m_Pools ->SetPoolCapacity (POINTER_SINGLE_LINK_POOL, MAX_POINTER_SINGLE_LINKS); // Default is 70000
220+ m_Pools ->SetPoolCapacity (POINTER_DOUBLE_LINK_POOL, MAX_POINTER_DOUBLE_LINKS); // Default is 3200
221+ dassert (m_Pools ->GetPoolCapacity (POINTER_SINGLE_LINK_POOL) == MAX_POINTER_SINGLE_LINKS);
222222
223223 // Increase streaming object instances list size
224224 MemPut<WORD>(0x05B8E55 , MAX_RWOBJECT_INSTANCES * 12 ); // Default is 1000 * 12
@@ -261,7 +261,6 @@ CGameSA::~CGameSA()
261261 delete reinterpret_cast <CAnimManagerSA*>(m_pAnimManager);
262262 delete reinterpret_cast <CTasksSA*>(m_pTasks);
263263 delete reinterpret_cast <CTaskManagementSystemSA*>(m_pTaskManagementSystem);
264- delete reinterpret_cast <CHandlingManagerSA*>(m_pHandlingManager);
265264 delete reinterpret_cast <CStatsSA*>(m_pStats);
266265 delete reinterpret_cast <CWeatherSA*>(m_pWeather);
267266 delete reinterpret_cast <CAERadioTrackManagerSA*>(m_pCAERadioTrackManager);
@@ -276,7 +275,6 @@ CGameSA::~CGameSA()
276275 delete reinterpret_cast <CCameraSA*>(m_pCamera);
277276 delete reinterpret_cast <CRadarSA*>(m_pRadar);
278277 delete reinterpret_cast <CClockSA*>(m_pClock);
279- delete reinterpret_cast <CPoolsSA*>(m_pPools);
280278 delete reinterpret_cast <CWorldSA*>(m_pWorld);
281279 delete reinterpret_cast <CAudioEngineSA*>(m_pAudioEngine);
282280 delete reinterpret_cast <CAEAudioHardwareSA*>(m_pAEAudioHardware);
@@ -1039,8 +1037,8 @@ void CGameSA::RemoveAllBuildings()
10391037{
10401038 m_pIplStore->SetDynamicIplStreamingEnabled (false );
10411039
1042- m_pPools ->GetDummyPool ().RemoveAllBuildingLods ();
1043- m_pPools ->GetBuildingsPool ().RemoveAllBuildings ();
1040+ m_Pools ->GetDummyPool ().RemoveAllBuildingLods ();
1041+ m_Pools ->GetBuildingsPool ().RemoveAllBuildings ();
10441042
10451043 auto pBuildingRemoval = static_cast <CBuildingRemovalSA*>(m_pBuildingRemoval);
10461044 pBuildingRemoval->DropCaches ();
@@ -1050,8 +1048,8 @@ void CGameSA::RemoveAllBuildings()
10501048
10511049void CGameSA::RestoreGameBuildings ()
10521050{
1053- m_pPools ->GetBuildingsPool ().RestoreAllBuildings ();
1054- m_pPools ->GetDummyPool ().RestoreAllBuildingsLods ();
1051+ m_Pools ->GetBuildingsPool ().RestoreAllBuildings ();
1052+ m_Pools ->GetDummyPool ().RestoreAllBuildingsLods ();
10551053
10561054 m_pIplStore->SetDynamicIplStreamingEnabled (true , [](CIplSAInterface* ipl) { return memcmp (" barriers" , ipl->name , 8 ) != 0 ; });
10571055 m_isBuildingsRemoved = false ;
@@ -1069,7 +1067,7 @@ bool CGameSA::SetBuildingPoolSize(size_t size)
10691067 static_cast <CBuildingRemovalSA*>(m_pBuildingRemoval)->DropCaches ();
10701068 }
10711069
1072- bool status = m_pPools ->GetBuildingsPool ().Resize (size);
1070+ bool status = m_Pools ->GetBuildingsPool ().Resize (size);
10731071
10741072 if (shouldRemoveBuilding)
10751073 {
0 commit comments