diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-06-25 23:25:59 +0200 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-06-25 23:25:59 +0200 |
commit | af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f (patch) | |
tree | 75a719bb1ab82b354f464562ecc1fae9c55f64d0 /src/control/Restart.cpp | |
parent | Merge pull request #1147 from withmorten/githash (diff) | |
download | re3-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 'src/control/Restart.cpp')
-rw-r--r-- | src/control/Restart.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/control/Restart.cpp b/src/control/Restart.cpp index 2f5e3d45..4ca18c3b 100644 --- a/src/control/Restart.cpp +++ b/src/control/Restart.cpp @@ -1,7 +1,6 @@ #include "common.h" #include "Restart.h" -#include "SaveBuf.h" #include "Zones.h" #include "PathFind.h" @@ -174,28 +173,29 @@ INITSAVEBUF CheckSaveHeader(buf, 'R','S','T','\0', size - SAVE_HEADER_SIZE); for (int i = 0; i < NUM_RESTART_POINTS; i++) { - ReadSaveBuf(&HospitalRestartPoints[i], buf); - ReadSaveBuf(&HospitalRestartHeadings[i], buf); + HospitalRestartPoints[i] = ReadSaveBuf<CVector>(buf); + HospitalRestartHeadings[i] = ReadSaveBuf<float>(buf); } for (int i = 0; i < NUM_RESTART_POINTS; i++) { - ReadSaveBuf(&PoliceRestartPoints[i], buf); - ReadSaveBuf(&PoliceRestartHeadings[i], buf); + PoliceRestartPoints[i] = ReadSaveBuf<CVector>(buf); + PoliceRestartHeadings[i] = ReadSaveBuf<float>(buf); } - ReadSaveBuf(&NumberOfHospitalRestarts, buf); - ReadSaveBuf(&NumberOfPoliceRestarts, buf); - ReadSaveBuf(&bOverrideRestart, buf); + NumberOfHospitalRestarts = ReadSaveBuf<uint16>(buf); + NumberOfPoliceRestarts = ReadSaveBuf<uint16>(buf); + bOverrideRestart = ReadSaveBuf<bool>(buf); // skip something unused - SkipSaveBuf(buf, 3); - - ReadSaveBuf(&OverridePosition, buf); - ReadSaveBuf(&OverrideHeading, buf); - ReadSaveBuf(&bFadeInAfterNextDeath, buf); - ReadSaveBuf(&bFadeInAfterNextArrest, buf); - ReadSaveBuf(&OverrideHospitalLevel, buf); - ReadSaveBuf(&OverridePoliceStationLevel, buf); + ReadSaveBuf<uint8>(buf); + ReadSaveBuf<uint16>(buf); + + OverridePosition = ReadSaveBuf<CVector>(buf); + OverrideHeading = ReadSaveBuf<float>(buf); + bFadeInAfterNextDeath = ReadSaveBuf<bool>(buf); + bFadeInAfterNextArrest = ReadSaveBuf<bool>(buf); + OverrideHospitalLevel = ReadSaveBuf<uint8>(buf); + OverridePoliceStationLevel = ReadSaveBuf<uint8>(buf); VALIDATESAVEBUF(size); } |