diff options
author | Max Horn | 2004-10-07 21:23:29 +0000 |
---|---|---|
committer | Max Horn | 2004-10-07 21:23:29 +0000 |
commit | f488f4c15fbdc1342f1729b5701a01de6a483fea (patch) | |
tree | c18bfbaea91b95e266747a87c07ff59f9b1da0f0 /scumm/actor.cpp | |
parent | 186201c68f9910fa3001e668024339cb8e2a7244 (diff) | |
download | scummvm-rg350-f488f4c15fbdc1342f1729b5701a01de6a483fea.tar.gz scummvm-rg350-f488f4c15fbdc1342f1729b5701a01de6a483fea.tar.bz2 scummvm-rg350-f488f4c15fbdc1342f1729b5701a01de6a483fea.zip |
Another attempt at a fix for bug #1032964 (INDY3-VGA: actors walking in wrong places), by making sure all actor walkdata is saved
svn-id: r15455
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r-- | scumm/actor.cpp | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index c95968986e..f0da57d535 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -46,31 +46,36 @@ void Actor::initActorClass(ScummEngine *scumm) { Actor::Actor() { assert(_vm != 0); - _offsX = _offsY = 0; - top = bottom = 0; number = 0; - needRedraw = needBgReset = costumeNeedsInit = visible = false; - flip = false; - speedx = 8; - speedy = 2; - frame = 0; - _walkbox = 0; - animProgress = 0; - skipLimb = false; - drawToBackBuf = false; - memset(animVariable, 0, sizeof(animVariable)); - memset(palette, 0, sizeof(palette)); - memset(sound, 0, sizeof(sound)); - memset(&cost, 0, sizeof(CostumeData)); - memset(&walkdata, 0, sizeof(ActorWalkData)); - walkdata.point3.x = 32000; - walkScript = 0; - memset(talkQueue, 0, sizeof(talkQueue)); - initActor(1); + initActor(-1); } void Actor::initActor(int mode) { + if (mode == -1) { + _offsX = _offsY = 0; + top = bottom = 0; + needRedraw = needBgReset = costumeNeedsInit = visible = false; + flip = false; + speedx = 8; + speedy = 2; + frame = 0; + _walkbox = 0; + animProgress = 0; + skipLimb = false; + drawToBackBuf = false; + memset(animVariable, 0, sizeof(animVariable)); + memset(palette, 0, sizeof(palette)); + memset(sound, 0, sizeof(sound)); + memset(&cost, 0, sizeof(CostumeData)); + memset(&walkdata, 0, sizeof(ActorWalkData)); + walkdata.point3.x = 32000; + walkScript = 0; + memset(talkQueue, 0, sizeof(talkQueue)); + + mode = 1; + } + if (mode == 1) { costume = 0; room = 0; @@ -2055,6 +2060,9 @@ const SaveLoadEntry *Actor::getSaveLoadEntries() { MKLINE(Actor, walkdata.deltaYFactor, sleInt32, VER(8)), MKLINE(Actor, walkdata.xfrac, sleUint16, VER(8)), MKLINE(Actor, walkdata.yfrac, sleUint16, VER(8)), + + MKLINE(Actor, walkdata.point3.x, sleUint16, VER(42)), + MKLINE(Actor, walkdata.point3.y, sleUint16, VER(42)), MKARRAY(Actor, cost.active[0], sleByte, 16, VER(8)), MKLINE(Actor, cost.stopped, sleUint16, VER(8)), |