summaryrefslogtreecommitdiffstats
path: root/src/control/Garages.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/Garages.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/Garages.cpp28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 3410c881..792d3bda 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -24,7 +24,6 @@
#include "Vehicle.h"
#include "Wanted.h"
#include "World.h"
-#include "SaveBuf.h"
#define CRUSHER_GARAGE_X1 (1135.5f)
#define CRUSHER_GARAGE_Y1 (57.0f)
@@ -2362,25 +2361,22 @@ void CGarages::Load(uint8* buf, uint32 size)
assert(size == 5484);
#endif
CloseHideOutGaragesBeforeSave();
- ReadSaveBuf(&NumGarages, buf);
- int32 tempInt;
- ReadSaveBuf(&tempInt, buf);
- BombsAreFree = tempInt ? true : false;
- ReadSaveBuf(&tempInt, buf);
- RespraysAreFree = tempInt ? true : false;
- ReadSaveBuf(&CarsCollected, buf);
- ReadSaveBuf(&BankVansCollected, buf);
- ReadSaveBuf(&PoliceCarsCollected, buf);
+ NumGarages = ReadSaveBuf<uint32>(buf);
+ BombsAreFree = ReadSaveBuf<uint32>(buf);
+ RespraysAreFree = ReadSaveBuf<uint32>(buf);
+ CarsCollected = ReadSaveBuf<int32>(buf);
+ BankVansCollected = ReadSaveBuf<int32>(buf);
+ PoliceCarsCollected = ReadSaveBuf<int32>(buf);
for (int i = 0; i < TOTAL_COLLECTCARS_GARAGES; i++)
- ReadSaveBuf(&CarTypesCollected[i], buf);
- ReadSaveBuf(&LastTimeHelpMessage, buf);
+ CarTypesCollected[i] = ReadSaveBuf<uint32>(buf);
+ LastTimeHelpMessage = ReadSaveBuf<uint32>(buf);
for (int i = 0; i < NUM_GARAGE_STORED_CARS; i++) {
- ReadSaveBuf(&aCarsInSafeHouse1[i], buf);
- ReadSaveBuf(&aCarsInSafeHouse2[i], buf);
- ReadSaveBuf(&aCarsInSafeHouse3[i], buf);
+ aCarsInSafeHouse1[i] = ReadSaveBuf<CStoredCar>(buf);
+ aCarsInSafeHouse2[i] = ReadSaveBuf<CStoredCar>(buf);
+ aCarsInSafeHouse3[i] = ReadSaveBuf<CStoredCar>(buf);
}
for (int i = 0; i < NUM_GARAGES; i++) {
- ReadSaveBuf(&aGarages[i], buf);
+ aGarages[i] = ReadSaveBuf<CGarage>(buf);
aGarages[i].m_pDoor1 = nil;
aGarages[i].m_pDoor2 = nil;
aGarages[i].m_pTarget = nil;