summaryrefslogtreecommitdiffstats
path: root/src/control/Script5.cpp
diff options
context:
space:
mode:
authorwithmorten <morten.with@gmail.com>2021-07-05 18:07:26 +0200
committerwithmorten <morten.with@gmail.com>2021-07-10 17:30:27 +0200
commit011aafa0435d2c60dc4e0769ed4c93ed1761e3f6 (patch)
tree4f6c78844f547651730f82043b28662a9b7239e9 /src/control/Script5.cpp
parentreadme: fix lto option (diff)
downloadre3-011aafa0435d2c60dc4e0769ed4c93ed1761e3f6.tar
re3-011aafa0435d2c60dc4e0769ed4c93ed1761e3f6.tar.gz
re3-011aafa0435d2c60dc4e0769ed4c93ed1761e3f6.tar.bz2
re3-011aafa0435d2c60dc4e0769ed4c93ed1761e3f6.tar.lz
re3-011aafa0435d2c60dc4e0769ed4c93ed1761e3f6.tar.xz
re3-011aafa0435d2c60dc4e0769ed4c93ed1761e3f6.tar.zst
re3-011aafa0435d2c60dc4e0769ed4c93ed1761e3f6.zip
Diffstat (limited to 'src/control/Script5.cpp')
-rw-r--r--src/control/Script5.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp
index a9aec18e..953a1f50 100644
--- a/src/control/Script5.cpp
+++ b/src/control/Script5.cpp
@@ -2089,33 +2089,33 @@ VALIDATESAVEBUF(size)
void CRunningScript::Save(uint8*& buf)
{
#ifdef COMPATIBLE_SAVES
- SkipSaveBuf(buf, 8);
+ ZeroSaveBuf(buf, 8);
for (int i = 0; i < 8; i++)
- WriteSaveBuf<char>(buf, m_abScriptName[i]);
- WriteSaveBuf<uint32>(buf, m_nIp);
+ WriteSaveBuf(buf, m_abScriptName[i]);
+ WriteSaveBuf(buf, m_nIp);
#ifdef CHECK_STRUCT_SIZES
static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6");
#endif
for (int i = 0; i < MAX_STACK_DEPTH; i++)
- WriteSaveBuf<uint32>(buf, m_anStack[i]);
- WriteSaveBuf<uint16>(buf, m_nStackPointer);
- SkipSaveBuf(buf, 2);
+ WriteSaveBuf(buf, m_anStack[i]);
+ WriteSaveBuf(buf, m_nStackPointer);
+ ZeroSaveBuf(buf, 2);
#ifdef CHECK_STRUCT_SIZES
static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18");
#endif
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
- WriteSaveBuf<int32>(buf, m_anLocalVariables[i]);
- WriteSaveBuf<bool>(buf, m_bCondResult);
- WriteSaveBuf<bool>(buf, m_bIsMissionScript);
- WriteSaveBuf<bool>(buf, m_bSkipWakeTime);
- SkipSaveBuf(buf, 1);
- WriteSaveBuf<uint32>(buf, m_nWakeTime);
- WriteSaveBuf<uint16>(buf, m_nAndOrState);
- WriteSaveBuf<bool>(buf, m_bNotFlag);
- WriteSaveBuf<bool>(buf, m_bDeatharrestEnabled);
- WriteSaveBuf<bool>(buf, m_bDeatharrestExecuted);
- WriteSaveBuf<bool>(buf, m_bMissionFlag);
- SkipSaveBuf(buf, 2);
+ WriteSaveBuf(buf, m_anLocalVariables[i]);
+ WriteSaveBuf(buf, m_bCondResult);
+ WriteSaveBuf(buf, m_bIsMissionScript);
+ WriteSaveBuf(buf, m_bSkipWakeTime);
+ ZeroSaveBuf(buf, 1);
+ WriteSaveBuf(buf, m_nWakeTime);
+ WriteSaveBuf(buf, m_nAndOrState);
+ WriteSaveBuf(buf, m_bNotFlag);
+ WriteSaveBuf(buf, m_bDeatharrestEnabled);
+ WriteSaveBuf(buf, m_bDeatharrestExecuted);
+ WriteSaveBuf(buf, m_bMissionFlag);
+ ZeroSaveBuf(buf, 2);
#else
WriteSaveBuf(buf, *this);
#endif