diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/actor.cpp | 5 | ||||
-rw-r--r-- | scumm/actor.h | 4 | ||||
-rw-r--r-- | scumm/saveload.h | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 5690bf6d61..3d9b19ce92 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -1994,7 +1994,10 @@ const SaveLoadEntry *Actor::getSaveLoadEntries() { MKARRAY_OLD(Actor, sound[0], sleByte, 8, VER(8), VER(36)), MKARRAY(Actor, sound[0], sleByte, 32, VER(37)), - MKARRAY(Actor, animVariable[0], sleUint16, 8, VER(8)), + // Actor animVariable grew from 8 to 27 + MKARRAY_OLD(Actor, animVariable[0], sleUint16, 8, VER(8), VER(40)), + MKARRAY(Actor, animVariable[0], sleUint16, 27, VER(41)), + MKLINE(Actor, targetFacing, sleUint16, VER(8)), MKLINE(Actor, moving, sleByte, VER(8)), MKLINE(Actor, ignoreBoxes, sleByte, VER(8)), diff --git a/scumm/actor.h b/scumm/actor.h index e4e219c9ec..acb8110e68 100644 --- a/scumm/actor.h +++ b/scumm/actor.h @@ -152,7 +152,7 @@ protected: byte animProgress, animSpeed; bool costumeNeedsInit; ActorWalkData walkdata; - int16 animVariable[16]; + int16 animVariable[27]; static ScummEngine *_vm; @@ -222,9 +222,11 @@ public: } int getAnimVar(byte var) const { + checkRange(26, 0, var, "getAnimVar %d out of range(r)"); return animVariable[var]; } void setAnimVar(byte var, int value) { + checkRange(26, 0, var, "setAnimVar %d out of range(r)"); animVariable[var] = value; } diff --git a/scumm/saveload.h b/scumm/saveload.h index 93f46307eb..4a06c6104e 100644 --- a/scumm/saveload.h +++ b/scumm/saveload.h @@ -32,7 +32,7 @@ namespace Scumm { // Can be useful for other ports too :) #define VER(x) x -#define CURRENT_VER 40 +#define CURRENT_VER 41 // To work around a warning in GCC 3.2 (and 3.1 ?) regarding non-POD types, // we use a small trick: instead of 0 we use 42. Why? Well, it seems newer GCC |