diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-06-28 04:16:21 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-28 04:16:21 +0200 |
commit | eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9 (patch) | |
tree | 140cc1e91a53777cdcb38c4cdacdcd101740965b /src/core/Pools.cpp | |
parent | Merge pull request #1153 from kusst/texread (diff) | |
parent | Redo ReadSaveBuf + common.h cleanup (diff) | |
download | re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.tar re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.tar.gz re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.tar.bz2 re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.tar.lz re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.tar.xz re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.tar.zst re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.zip |
Diffstat (limited to 'src/core/Pools.cpp')
-rw-r--r-- | src/core/Pools.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp index d824d498..d1947813 100644 --- a/src/core/Pools.cpp +++ b/src/core/Pools.cpp @@ -14,6 +14,7 @@ #include "Wanted.h" #include "World.h" #include "MemoryHeap.h" +#include "SaveBuf.h" CCPtrNodePool *CPools::ms_pPtrNodePool; CEntryInfoNodePool *CPools::ms_pEntryInfoNodePool; @@ -137,15 +138,20 @@ CPools::MakeSureSlotInObjectPoolIsEmpty(int32 slot) void CPools::LoadVehiclePool(uint8* buf, uint32 size) { INITSAVEBUF - int nNumCars = ReadSaveBuf<int>(buf); - int nNumBoats = ReadSaveBuf<int>(buf); - int nNumBikes = ReadSaveBuf<int>(buf); + int nNumCars, nNumBoats, nNumBikes; + ReadSaveBuf(&nNumCars, buf); + ReadSaveBuf(&nNumBoats, buf); + ReadSaveBuf(&nNumBikes, buf); for (int i = 0; i < nNumCars + nNumBoats + nNumBikes; i++) { - uint32 type = ReadSaveBuf<uint32>(buf); - int16 model = ReadSaveBuf<int16>(buf); + uint32 type; + int16 model; + int32 slot; + + ReadSaveBuf(&type, buf); + ReadSaveBuf(&model, buf); CStreaming::RequestModel(model, STREAMFLAGS_DEPENDENCY); CStreaming::LoadAllRequestedModels(false); - int32 slot = ReadSaveBuf<int32>(buf); + ReadSaveBuf(&slot, buf); CVehicle* pVehicle; #ifdef COMPATIBLE_SAVES if (type == VEHICLE_TYPE_BOAT) |