From 499ebc0b54c79e89f4ee38628cea1f64cdf40bf2 Mon Sep 17 00:00:00 2001 From: Borja Lorente Date: Fri, 24 Jun 2016 21:00:06 +0200 Subject: MACVENTURE: Script engine fixes --- engines/macventure/script.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'engines/macventure/script.h') 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 scripts; + Common::List scripts; Common::Array saves; uint32 familyIdx; @@ -288,7 +293,7 @@ private: private: MacVentureEngine *_engine; World *_world; - Common::Array _frames; + Common::List _frames; Container *_scripts; }; -- cgit v1.2.3