1
0
mirror of https://github.com/td512/re3.git synced 2026-03-01 06:53:55 +00:00

Revert "Redo ReadSaveBuf + common.h cleanup"

This reverts commit 2b67aba94c.
This commit is contained in:
erorcun
2021-06-26 00:25:59 +03:00
parent 4bab6d5356
commit af7573ddbe
26 changed files with 337 additions and 398 deletions

View File

@@ -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<int>(buf);
int nNumBoats = ReadSaveBuf<int>(buf);
for (int i = 0; i < nNumCars + nNumBoats; i++) {
uint32 type;
int16 model;
int32 slot;
ReadSaveBuf(&type, buf);
ReadSaveBuf(&model, buf);
uint32 type = ReadSaveBuf<uint32>(buf);
int16 model = ReadSaveBuf<int16>(buf);
CStreaming::RequestModel(model, STREAMFLAGS_DEPENDENCY);
CStreaming::LoadAllRequestedModels(false);
ReadSaveBuf(&slot, buf);
int32 slot = ReadSaveBuf<int32>(buf);
CVehicle* pVehicle;
#ifdef COMPATIBLE_SAVES
if (type == VEHICLE_TYPE_BOAT)