diff options
Diffstat (limited to 'engines/m4/mads_player.cpp')
-rw-r--r-- | engines/m4/mads_player.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/m4/mads_player.cpp b/engines/m4/mads_player.cpp index 0b83b54ff5..73480088ee 100644 --- a/engines/m4/mads_player.cpp +++ b/engines/m4/mads_player.cpp @@ -46,7 +46,7 @@ MadsPlayer::MadsPlayer() { _unk4 = false; _spritesChanged = true; - + _direction = 0; _newDirection = 0; _priorTimer = 0; @@ -131,7 +131,7 @@ void MadsPlayer::update() { // Figure out the depth for the sprite int newDepth = 1; int yp = MIN(_playerPos.y, (int16)155); - + for (int idx = 1; idx < 15; ++idx) { if (_madsVm->scene()->getSceneResources()._depthBands[newDepth] >= yp) newDepth = idx + 1; @@ -199,7 +199,7 @@ void MadsPlayer::updateFrame() { _unk2 = 0; } else { _unk2 = _actionList2[_actionIndex]; - + if (_actionIndex > 0) --_actionIndex; } @@ -237,7 +237,7 @@ void MadsPlayer::setupFrame() { _frameCount = spriteSet.getCount(); _yScale = spriteSet._charInfo->_yScale; - + if ((_frameNum <= 0) || (_frameNum > _frameCount)) _frameNum = 1; _forceRefresh = true; @@ -336,7 +336,7 @@ void MadsPlayer::setDest(int destX, int destY, int facing) { setTicksAmount(); _moving = true; _destFacing = facing; - + _madsVm->scene()->getSceneResources().setRouteNode(_madsVm->scene()->getSceneResources()._nodes.size() - 2, _playerPos, _madsVm->scene()->_depthSurface); _madsVm->scene()->getSceneResources().setRouteNode(_madsVm->scene()->getSceneResources()._nodes.size() - 1, @@ -448,7 +448,7 @@ void MadsPlayer::move() { bool routeFlag = false; if (_moving) { - int idx = _routeCount; + int idx = _routeCount; while (!_v844C0 && (_destPos.x == _playerPos.x) && (_destPos.y == _playerPos.y)) { if (idx != 0) { --idx; @@ -650,7 +650,7 @@ int MadsPlayer::scanPath(M4Surface *depthSurface, const Common::Point &srcPos, c srcP += xDirection; } - + return 0; } @@ -730,12 +730,12 @@ void MadsPlayer::startMovement() { int majorChange = MAX(xDiff, yDiff); _v84530 = (majorChange == 0) ? 0 : _hypotenuse / majorChange; - + if (_playerPos.x > _destPos.x) _v8452C = MAX(_posChange.x, _posChange.y); else _v8452C = 0; - + _hypotenuse /= 100; _v8452E = -_v84530; } |