summaryrefslogtreecommitdiffstats
path: root/src/control/Restart.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-06-25 18:03:05 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-25 18:03:51 +0200
commit2b67aba94cb6448fb24c869559465eddf2bad069 (patch)
tree5c68ff4f8ce3153640a7b864495e167bec04cce8 /src/control/Restart.cpp
parentUpdate invite link (diff)
downloadre3-2b67aba94cb6448fb24c869559465eddf2bad069.tar
re3-2b67aba94cb6448fb24c869559465eddf2bad069.tar.gz
re3-2b67aba94cb6448fb24c869559465eddf2bad069.tar.bz2
re3-2b67aba94cb6448fb24c869559465eddf2bad069.tar.lz
re3-2b67aba94cb6448fb24c869559465eddf2bad069.tar.xz
re3-2b67aba94cb6448fb24c869559465eddf2bad069.tar.zst
re3-2b67aba94cb6448fb24c869559465eddf2bad069.zip
Diffstat (limited to '')
-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 4ca18c3b..2f5e3d45 100644
--- a/src/control/Restart.cpp
+++ b/src/control/Restart.cpp
@@ -1,6 +1,7 @@
#include "common.h"
#include "Restart.h"
+#include "SaveBuf.h"
#include "Zones.h"
#include "PathFind.h"
@@ -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);
}