summaryrefslogtreecommitdiffstats
path: root/src/control/Restart.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-06-28 02:59:07 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-28 04:12:54 +0200
commitf8297df9c5a7d65d5658d1a8d85d391fbb15b95a (patch)
tree9dcfac13fc3be99320ca7b546c4ff2007bff4121 /src/control/Restart.cpp
parentRemove waiting for stream closure in multi-thread audio (diff)
downloadre3-f8297df9c5a7d65d5658d1a8d85d391fbb15b95a.tar
re3-f8297df9c5a7d65d5658d1a8d85d391fbb15b95a.tar.gz
re3-f8297df9c5a7d65d5658d1a8d85d391fbb15b95a.tar.bz2
re3-f8297df9c5a7d65d5658d1a8d85d391fbb15b95a.tar.lz
re3-f8297df9c5a7d65d5658d1a8d85d391fbb15b95a.tar.xz
re3-f8297df9c5a7d65d5658d1a8d85d391fbb15b95a.tar.zst
re3-f8297df9c5a7d65d5658d1a8d85d391fbb15b95a.zip
Diffstat (limited to 'src/control/Restart.cpp')
-rw-r--r--src/control/Restart.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/control/Restart.cpp b/src/control/Restart.cpp
index e1950a29..39c9a234 100644
--- a/src/control/Restart.cpp
+++ b/src/control/Restart.cpp
@@ -3,6 +3,7 @@
#include "Restart.h"
#include "Zones.h"
#include "PathFind.h"
+#include "SaveBuf.h"
uint8 CRestart::OverrideHospitalLevel;
uint8 CRestart::OverridePoliceStationLevel;
@@ -173,29 +174,28 @@ INITSAVEBUF
CheckSaveHeader(buf, 'R','S','T','\0', size - SAVE_HEADER_SIZE);
for (int i = 0; i < NUM_RESTART_POINTS; i++) {
- HospitalRestartPoints[i] = ReadSaveBuf<CVector>(buf);
- HospitalRestartHeadings[i] = ReadSaveBuf<float>(buf);
+ ReadSaveBuf(&HospitalRestartPoints[i], buf);
+ ReadSaveBuf(&HospitalRestartHeadings[i], buf);
}
for (int i = 0; i < NUM_RESTART_POINTS; i++) {
- PoliceRestartPoints[i] = ReadSaveBuf<CVector>(buf);
- PoliceRestartHeadings[i] = ReadSaveBuf<float>(buf);
+ ReadSaveBuf(&PoliceRestartPoints[i], buf);
+ ReadSaveBuf(&PoliceRestartHeadings[i], buf);
}
- NumberOfHospitalRestarts = ReadSaveBuf<uint16>(buf);
- NumberOfPoliceRestarts = ReadSaveBuf<uint16>(buf);
- bOverrideRestart = ReadSaveBuf<bool>(buf);
+ ReadSaveBuf(&NumberOfHospitalRestarts, buf);
+ ReadSaveBuf(&NumberOfPoliceRestarts, buf);
+ ReadSaveBuf(&bOverrideRestart, buf);
// skip something unused
- 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);
+ SkipSaveBuf(buf, 3);
+
+ ReadSaveBuf(&OverridePosition, buf);
+ ReadSaveBuf(&OverrideHeading, buf);
+ ReadSaveBuf(&bFadeInAfterNextDeath, buf);
+ ReadSaveBuf(&bFadeInAfterNextArrest, buf);
+ ReadSaveBuf(&OverrideHospitalLevel, buf);
+ ReadSaveBuf(&OverridePoliceStationLevel, buf);
VALIDATESAVEBUF(size);
}