Redo ReadSaveBuf + common.h cleanup

This commit is contained in:
Sergeanur 2021-06-28 03:59:07 +03:00
parent 3587cb029e
commit f8297df9c5
31 changed files with 507 additions and 421 deletions

View file

@ -26,6 +26,7 @@
#include "Ped.h"
#include "Dummy.h"
#include "WindModifiers.h"
#include "SaveBuf.h"
int gBuildings;
@ -850,7 +851,8 @@ CEntity::SaveEntityFlags(uint8*& buf)
void
CEntity::LoadEntityFlags(uint8*& buf)
{
uint32 tmp = ReadSaveBuf<uint32>(buf);
uint32 tmp;
ReadSaveBuf(&tmp, buf);
m_type = (tmp & ((BIT(3) - 1)));
m_status = ((tmp >> 3) & (BIT(5) - 1));
@ -881,7 +883,7 @@ CEntity::LoadEntityFlags(uint8*& buf)
bStreamingDontDelete = !!(tmp & BIT(30));
bRemoveFromWorld = !!(tmp & BIT(31));
tmp = ReadSaveBuf<uint32>(buf);
ReadSaveBuf(&tmp, buf);
bHasHitWall = !!(tmp & BIT(0));
bImBeingRendered = !!(tmp & BIT(1));