summaryrefslogtreecommitdiffstats
path: root/src/control/Pickups.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-06-25 23:25:59 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2021-06-25 23:25:59 +0200
commitaf7573ddbe38e0aaa485877e7ccb2e704b0f5a7f (patch)
tree75a719bb1ab82b354f464562ecc1fae9c55f64d0 /src/control/Pickups.cpp
parentMerge pull request #1147 from withmorten/githash (diff)
downloadre3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.tar
re3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.tar.gz
re3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.tar.bz2
re3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.tar.lz
re3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.tar.xz
re3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.tar.zst
re3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.zip
Diffstat (limited to '')
-rw-r--r--src/control/Pickups.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index 10175fba..a1e2a851 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -23,7 +23,6 @@
#ifdef FIX_BUGS
#include "Replay.h"
#endif
-#include "SaveBuf.h"
#include "Script.h"
#include "Shadows.h"
#include "SpecialFX.h"
@@ -1000,18 +999,18 @@ CPickups::Load(uint8 *buf, uint32 size)
INITSAVEBUF
for (int32 i = 0; i < NUMPICKUPS; i++) {
- ReadSaveBuf(&aPickUps[i], buf);
+ aPickUps[i] = ReadSaveBuf<CPickup>(buf);
if (aPickUps[i].m_eType != PICKUP_NONE && aPickUps[i].m_pObject != nil)
aPickUps[i].m_pObject = CPools::GetObjectPool()->GetSlot((uintptr)aPickUps[i].m_pObject - 1);
}
- ReadSaveBuf(&CollectedPickUpIndex, buf);
- SkipSaveBuf(buf, 2);
+ CollectedPickUpIndex = ReadSaveBuf<uint16>(buf);
+ ReadSaveBuf<uint16>(buf);
NumMessages = 0;
for (uint16 i = 0; i < NUMCOLLECTEDPICKUPS; i++)
- ReadSaveBuf(&aPickUpsCollected[i], buf);
+ aPickUpsCollected[i] = ReadSaveBuf<int32>(buf);
VALIDATESAVEBUF(size)
}