Redo ReadSaveBuf + common.h cleanup

This commit is contained in:
Sergeanur
2021-06-25 19:03:05 +03:00
parent 6152f02333
commit 2b67aba94c
26 changed files with 398 additions and 337 deletions

View File

@ -3,6 +3,7 @@
#include "ModelIndices.h"
#include "Gangs.h"
#include "Weapon.h"
#include "SaveBuf.h"
CGangInfo CGangs::Gang[NUM_GANGS];
@ -72,6 +73,6 @@ INITSAVEBUF
CheckSaveHeader(buf, 'G','N','G','\0', size - SAVE_HEADER_SIZE);
for (int i = 0; i < NUM_GANGS; i++)
Gang[i] = ReadSaveBuf<CGangInfo>(buf);
ReadSaveBuf(&Gang[i], buf);
VALIDATESAVEBUF(size);
}

View File

@ -32,6 +32,7 @@
#include "Floater.h"
#include "Range2D.h"
#include "Wanted.h"
#include "SaveBuf.h"
CPed *gapTempPedList[50];
uint16 gnNumTempPedList;

View File

@ -3,6 +3,7 @@
#include "General.h"
#include "FileMgr.h"
#include "PedType.h"
#include "SaveBuf.h"
CPedType *CPedType::ms_apPedType[NUM_PEDTYPES];
CPedStats *CPedStats::ms_apPedStats[NUM_PEDSTATS];
@ -201,7 +202,7 @@ INITSAVEBUF
CheckSaveHeader(buf, 'P', 'T', 'P', '\0', size - SAVE_HEADER_SIZE);
for(int i = 0; i < NUM_PEDTYPES; i++)
*ms_apPedType[i] = ReadSaveBuf<CPedType>(buf);
ReadSaveBuf(ms_apPedType[i], buf);
VALIDATESAVEBUF(size)
}

View File

@ -16,6 +16,7 @@
#include "Pools.h"
#include "Darkel.h"
#include "CarCtrl.h"
#include "SaveBuf.h"
#define PAD_MOVE_TO_GAME_WORLD_MOVE 60.0f