aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-12-06 16:07:14 -0500
committerPaul Gilbert2014-12-12 23:01:54 -0500
commit40b84172969781899347aff208f87da9d243d0ba (patch)
tree8f60d24362327acc769a65d516e3bcfa8eb7a88b /engines
parent7cd7bb9b54266f952c4049875532e587b0278415 (diff)
downloadscummvm-rg350-40b84172969781899347aff208f87da9d243d0ba.tar.gz
scummvm-rg350-40b84172969781899347aff208f87da9d243d0ba.tar.bz2
scummvm-rg350-40b84172969781899347aff208f87da9d243d0ba.zip
ACCESS: Correct down-right player movement
Diffstat (limited to 'engines')
-rw-r--r--engines/access/player.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/access/player.cpp b/engines/access/player.cpp
index 5668e9c6b9..35c5dadf02 100644
--- a/engines/access/player.cpp
+++ b/engines/access/player.cpp
@@ -516,14 +516,14 @@ void Player::walkDownRight() {
_playerDirection = DOWNRIGHT;
int walkOffset, tempL;
- bool flag = _scrollEnd == 1;
+ bool flag = _scrollEnd == 2;
if (!flag) {
calcPlayer();
- flag = (_playerX - _vm->_screen->_scaleTable1[_scrollConst] -
+ flag = (_vm->_screen->_clipWidth - _playerX - _vm->_screen->_scaleTable1[_scrollConst] -
_vm->_player->_scrollThreshold) > 0;
}
if (flag) {
- walkOffset = _walkOffUR[_frame - _sideWalkMin].x;
+ walkOffset = _walkOffUR[_frame - _diagDownWalkMin].x;
tempL = _rawPlayerLow.x + _vm->_screen->_scaleTable2[walkOffset];
_rawTempL = (byte)tempL;
_rawXTemp = _rawPlayer.x + _vm->_screen->_scaleTable1[walkOffset] +
@@ -533,7 +533,7 @@ void Player::walkDownRight() {
}
walkOffset = _walkOffDR[_frame - _diagDownWalkMin].y;
- tempL = _rawPlayerLow.y - _vm->_screen->_scaleTable2[walkOffset];
+ tempL = _rawPlayerLow.y + _vm->_screen->_scaleTable2[walkOffset];
_rawYTempL = (byte)tempL;
_rawYTemp = _rawPlayer.y + _vm->_screen->_scaleTable1[walkOffset] +
(tempL >= 0x100 ? 1 : 0);
@@ -546,17 +546,17 @@ void Player::walkDownRight() {
_rawPlayerLow.x = _rawTempL;
_rawPlayerLow.y = _rawYTempL;
- ++_frame;
calcManScale();
// This code looks totally useless as 'si' is unconditionally set in plotCom1
//if (_vm->_currentMan != 3 && (_frame == 1 || _frame == 5))
// warning("TODO: walkDownRight - si = 0?");
+ ++_frame;
if (_frame > _diagDownWalkMax)
_frame = _diagDownWalkMin;
- plotCom1();
+ plotCom(0);
}
}