diff options
author | Borja Lorente | 2016-06-24 21:00:06 +0200 |
---|---|---|
committer | Borja Lorente | 2016-08-14 18:38:10 +0200 |
commit | 499ebc0b54c79e89f4ee38628cea1f64cdf40bf2 (patch) | |
tree | 57076c28b48766e0a831badbc54f366f2fa5349a /engines/macventure/script.h | |
parent | ba5ed7fc88a69da782f3df18698837a67a59eb6b (diff) | |
download | scummvm-rg350-499ebc0b54c79e89f4ee38628cea1f64cdf40bf2.tar.gz scummvm-rg350-499ebc0b54c79e89f4ee38628cea1f64cdf40bf2.tar.bz2 scummvm-rg350-499ebc0b54c79e89f4ee38628cea1f64cdf40bf2.zip |
MACVENTURE: Script engine fixes
Diffstat (limited to 'engines/macventure/script.h')
-rw-r--r-- | engines/macventure/script.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/engines/macventure/script.h b/engines/macventure/script.h index 178e054e05..1a143cffd0 100644 --- a/engines/macventure/script.h +++ b/engines/macventure/script.h @@ -63,6 +63,8 @@ public: bool hasNext(); void branch(word amount); + ObjID getId(); + private: void loadInstructions(); @@ -82,12 +84,12 @@ public: } void push(word data) { + sp--; stack[sp] = unneg16(data); - sp--; } word pop() { - byte v = stack[sp]; + word v = stack[sp]; sp++; return v; } @@ -102,6 +104,9 @@ public: void clear() { sp = 0x80; + for (int i = 0; i < sp; i++) { + stack[i] = 0; + } } word size() { @@ -139,7 +144,7 @@ struct EngineFrame { int x; int y; EngineState state; - Common::Array<ScriptAsset> scripts; + Common::List<ScriptAsset> scripts; Common::Array<FunCall> saves; uint32 familyIdx; @@ -288,7 +293,7 @@ private: private: MacVentureEngine *_engine; World *_world; - Common::Array<EngineFrame> _frames; + Common::List<EngineFrame> _frames; Container *_scripts; }; |