From af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f Mon Sep 17 00:00:00 2001 From: erorcun Date: Sat, 26 Jun 2021 00:25:59 +0300 Subject: Revert "Redo ReadSaveBuf + common.h cleanup" This reverts commit 2b67aba94cb6448fb24c869559465eddf2bad069. --- src/core/Pools.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/core/Pools.cpp') diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp index 5cffe9e4..39cfb1d4 100644 --- a/src/core/Pools.cpp +++ b/src/core/Pools.cpp @@ -9,7 +9,6 @@ #endif #include "Population.h" #include "ProjectileInfo.h" -#include "SaveBuf.h" #include "Streaming.h" #include "Wanted.h" #include "World.h" @@ -131,19 +130,14 @@ CPools::MakeSureSlotInObjectPoolIsEmpty(int32 slot) void CPools::LoadVehiclePool(uint8* buf, uint32 size) { INITSAVEBUF - int nNumCars, nNumBoats; - ReadSaveBuf(&nNumCars, buf); - ReadSaveBuf(&nNumBoats, buf); + int nNumCars = ReadSaveBuf(buf); + int nNumBoats = ReadSaveBuf(buf); for (int i = 0; i < nNumCars + nNumBoats; i++) { - uint32 type; - int16 model; - int32 slot; - - ReadSaveBuf(&type, buf); - ReadSaveBuf(&model, buf); + uint32 type = ReadSaveBuf(buf); + int16 model = ReadSaveBuf(buf); CStreaming::RequestModel(model, STREAMFLAGS_DEPENDENCY); CStreaming::LoadAllRequestedModels(false); - ReadSaveBuf(&slot, buf); + int32 slot = ReadSaveBuf(buf); CVehicle* pVehicle; #ifdef COMPATIBLE_SAVES if (type == VEHICLE_TYPE_BOAT) -- cgit v1.2.3