summaryrefslogtreecommitdiffstats
path: root/src/control/Script.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-04 18:52:26 +0200
committerGitHub <noreply@github.com>2020-05-04 18:52:26 +0200
commit131e8af174a106e2bf98da8ef3ab7ba0bb55e09e (patch)
treeb59b5a35fb3b7c596b0501152e23f537727aaf01 /src/control/Script.h
parentMerge pull request #507 from aap/master (diff)
parentdeny coach in crusher (diff)
downloadre3-131e8af174a106e2bf98da8ef3ab7ba0bb55e09e.tar
re3-131e8af174a106e2bf98da8ef3ab7ba0bb55e09e.tar.gz
re3-131e8af174a106e2bf98da8ef3ab7ba0bb55e09e.tar.bz2
re3-131e8af174a106e2bf98da8ef3ab7ba0bb55e09e.tar.lz
re3-131e8af174a106e2bf98da8ef3ab7ba0bb55e09e.tar.xz
re3-131e8af174a106e2bf98da8ef3ab7ba0bb55e09e.tar.zst
re3-131e8af174a106e2bf98da8ef3ab7ba0bb55e09e.zip
Diffstat (limited to 'src/control/Script.h')
-rw-r--r--src/control/Script.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/control/Script.h b/src/control/Script.h
index 2eed29fe..01cad269 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -423,14 +423,10 @@ class CRunningScript
public:
void SetIP(uint32 ip) { m_nIp = ip; }
CRunningScript* GetNext() const { return next; }
- void BuildFromSaved(const CRunningScript& pSaved)
- {
- CRunningScript* n = next;
- CRunningScript* p = prev;
- *this = pSaved;
- next = n;
- prev = p;
- }
+
+ void Save(uint8*& buf);
+ void Load(uint8*& buf);
+
void UpdateTimers(float timeStep) {
m_anLocalVariables[NUM_LOCAL_VARS] += timeStep;
m_anLocalVariables[NUM_LOCAL_VARS + 1] += timeStep;
@@ -442,6 +438,8 @@ public:
void RemoveScriptFromList(CRunningScript**);
void AddScriptToList(CRunningScript**);
+ static const uint32 nSaveStructSize;
+
private:
void CollectParameters(uint32*, int16);
int32 CollectNextParameterWithoutIncreasingPC(uint32);