diff options
-rw-r--r-- | engines/scumm/actor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index e3f93e5c97..f48f0ba46b 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -565,13 +565,13 @@ int Actor::actorWalkStep() { _pos.y -= 1; } } else { - tmpX = (_pos.x << 16) + _walkdata.xfrac + (_walkdata.deltaXFactor >> 8) * _scalex; + tmpX = (_pos.x * (1 << 16)) + _walkdata.xfrac + (_walkdata.deltaXFactor / 256) * _scalex; _walkdata.xfrac = (uint16)tmpX; - _pos.x = (tmpX >> 16); + _pos.x = (tmpX / (1 << 16)); - tmpY = (_pos.y << 16) + _walkdata.yfrac + (_walkdata.deltaYFactor >> 8) * _scaley; + tmpY = (_pos.y * (1 << 16)) + _walkdata.yfrac + (_walkdata.deltaYFactor / 256) * _scaley; _walkdata.yfrac = (uint16)tmpY; - _pos.y = (tmpY >> 16); + _pos.y = (tmpY / (1 << 16)); } if (ABS(_pos.x - _walkdata.cur.x) > distX) { |