diff options
author | Nicola Mettifogo | 2008-08-15 02:52:42 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-08-15 02:52:42 +0000 |
commit | ea2a2cbb7c3a0d8721f1968414bd421a43b13596 (patch) | |
tree | b72d683f779dc03c3e102ecf73d6447ceccbcf01 /engines/parallaction/objects.h | |
parent | d6ac646d0bebb1a67a3578b3462a65f4c44c4813 (diff) | |
download | scummvm-rg350-ea2a2cbb7c3a0d8721f1968414bd421a43b13596.tar.gz scummvm-rg350-ea2a2cbb7c3a0d8721f1968414bd421a43b13596.tar.bz2 scummvm-rg350-ea2a2cbb7c3a0d8721f1968414bd421a43b13596.zip |
Simplified handling of script variables (especially locals).
svn-id: r33889
Diffstat (limited to 'engines/parallaction/objects.h')
-rw-r--r-- | engines/parallaction/objects.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/engines/parallaction/objects.h b/engines/parallaction/objects.h index 7e7a811ba6..ee681a5dc4 100644 --- a/engines/parallaction/objects.h +++ b/engines/parallaction/objects.h @@ -306,8 +306,7 @@ struct Zone { uint32 _type; uint32 _flags; uint _label; - uint16 field_2C; // unused - uint16 field_2E; // unused + TypeData u; CommandList _commands; Common::Point _moveTo; @@ -328,24 +327,33 @@ struct Zone { struct LocalVariable { +protected: int16 _value; int16 _min; int16 _max; +public: + LocalVariable() { _value = 0; _min = -10000; _max = 10000; } - void wrap(); + void setRange(int16 min, int16 max); + + int16 getValue() const; + void setValue(int16 value); }; + enum ParaFlags { kParaImmediate = 1, // instruction is using an immediate parameter kParaLocal = 2, // instruction is using a local variable kParaField = 0x10, // instruction is using an animation's field - kParaRandom = 0x100 + kParaRandom = 0x100, + + kParaLValue = 0x20 }; @@ -358,8 +366,8 @@ struct ScriptVar { ScriptVar(); - int16 getRValue(); - int16* getLValue(); + int16 getValue(); + void setValue(int16 value); void setLocal(LocalVariable *local); void setField(int16 *field); @@ -431,18 +439,11 @@ typedef Common::List<ProgramPtr> ProgramList; struct Animation : public Zone { - Common::Point _oldPos; GfxObj *gfxobj; char *_scriptName; int16 _frame; - uint16 field_50; // unused int16 _z; - uint16 field_54; // unused - uint16 field_56; // unused - uint16 field_58; // unused - uint16 field_5A; // unused - uint16 field_5C; // unused - uint16 field_5E; // unused + Animation(); virtual ~Animation(); |