diff options
-rw-r--r-- | engines/access/amazon/amazon_player.cpp | 16 | ||||
-rw-r--r-- | engines/access/amazon/amazon_resources.cpp | 13 | ||||
-rw-r--r-- | engines/access/amazon/amazon_resources.h | 13 | ||||
-rw-r--r-- | engines/access/martian/martian_player.cpp | 7 | ||||
-rw-r--r-- | engines/access/martian/martian_resources.h | 5 | ||||
-rw-r--r-- | engines/access/player.cpp | 27 | ||||
-rw-r--r-- | engines/access/player.h | 1 | ||||
-rw-r--r-- | engines/access/resources.cpp | 13 | ||||
-rw-r--r-- | engines/access/resources.h | 13 |
9 files changed, 63 insertions, 45 deletions
diff --git a/engines/access/amazon/amazon_player.cpp b/engines/access/amazon/amazon_player.cpp index 2f32db1a9b..903da6c532 100644 --- a/engines/access/amazon/amazon_player.cpp +++ b/engines/access/amazon/amazon_player.cpp @@ -78,6 +78,22 @@ void AmazonPlayer::load() { _diagDownWalkMin = 0; _diagDownWalkMax = 5; _game->_guard->setPosition(Common::Point(56, 190)); + } else { + for (int i = 0; i < _vm->_playerDataCount; ++i) { + _walkOffRight[i] = SIDEOFFR[i]; + _walkOffLeft[i] = SIDEOFFL[i]; + _walkOffUp[i] = SIDEOFFU[i]; + _walkOffDown[i] = SIDEOFFD[i]; + + _walkOffUR[i].x = DIAGOFFURX[i]; + _walkOffUR[i].y = DIAGOFFURY[i]; + _walkOffDR[i].x = DIAGOFFDRX[i]; + _walkOffDR[i].y = DIAGOFFDRY[i]; + _walkOffUL[i].x = DIAGOFFULX[i]; + _walkOffUL[i].y = DIAGOFFULY[i]; + _walkOffDL[i].x = DIAGOFFDLX[i]; + _walkOffDL[i].y = DIAGOFFDLY[i]; + } } } diff --git a/engines/access/amazon/amazon_resources.cpp b/engines/access/amazon/amazon_resources.cpp index 2b36ca943a..5ffb91d9fd 100644 --- a/engines/access/amazon/amazon_resources.cpp +++ b/engines/access/amazon/amazon_resources.cpp @@ -72,6 +72,19 @@ const char *const FILENAMES_DEMO[] = { "CHAPTER.AP", "MUSIC.AP", "SOUND.AP", "INV.AP" }; +const int SIDEOFFR[] = { 5, 5, 5, 5, 5, 5, 5, 5, 0 }; +const int SIDEOFFL[] = { 5, 5, 5, 5, 5, 5, 5, 5, 0 }; +const int SIDEOFFU[] = { 2, 2, 2, 2, 2, 2, 2, 2, 0 }; +const int SIDEOFFD[] = { 2, 2, 2, 2, 2, 2, 2, 2, 0 }; +const int DIAGOFFURX[] = { 4, 5, 2, 2, 3, 4, 2, 2, 0 }; +const int DIAGOFFURY[] = { 2, 3, 2, 2, 2, 3, 1, 1, 0 }; +const int DIAGOFFDRX[] = { 4, 5, 4, 3, 5, 4, 5, 1, 0 }; +const int DIAGOFFDRY[] = { 3, 2, 1, 2, 2, 1, 2, 1, 0 }; +const int DIAGOFFULX[] = { 4, 5, 4, 3, 3, 2, 2, 2, 0 }; +const int DIAGOFFULY[] = { 3, 3, 1, 2, 2, 1, 1, 1, 0 }; +const int DIAGOFFDLX[] = { 4, 5, 3, 3, 5, 4, 6, 1, 0 }; +const int DIAGOFFDLY[] = { 2, 2, 1, 2, 3, 1, 2, 1, 0 }; + const byte MOUSE0[] = { // hotspot x and y, uint16 LE 0, 0, 0, 0, diff --git a/engines/access/amazon/amazon_resources.h b/engines/access/amazon/amazon_resources.h index 190424b841..9801fd9dee 100644 --- a/engines/access/amazon/amazon_resources.h +++ b/engines/access/amazon/amazon_resources.h @@ -45,6 +45,19 @@ struct RiverStruct { extern const char *const FILENAMES[]; extern const char *const FILENAMES_DEMO[]; +extern const int SIDEOFFR[]; +extern const int SIDEOFFL[]; +extern const int SIDEOFFU[]; +extern const int SIDEOFFD[]; +extern const int DIAGOFFURX[]; +extern const int DIAGOFFURY[]; +extern const int DIAGOFFDRX[]; +extern const int DIAGOFFDRY[]; +extern const int DIAGOFFULX[]; +extern const int DIAGOFFULY[]; +extern const int DIAGOFFDLX[]; +extern const int DIAGOFFDLY[]; + extern const byte *const CURSORS[10]; extern const int TRAVEL_POS[][2]; diff --git a/engines/access/martian/martian_player.cpp b/engines/access/martian/martian_player.cpp index f461751438..598664a600 100644 --- a/engines/access/martian/martian_player.cpp +++ b/engines/access/martian/martian_player.cpp @@ -47,6 +47,13 @@ void MartianPlayer::load() { _downDelta = -5; _scrollConst = 5; + for (int i = 0; i < _vm->_playerDataCount; ++i) { + _walkOffRight[i] = SIDEOFFR[i]; + _walkOffLeft[i] = SIDEOFFL[i]; + _walkOffUp[i] = SIDEOFFU[i]; + _walkOffDown[i] = SIDEOFFD[i]; + } + _sideWalkMin = 0; _sideWalkMax = 7; _upWalkMin = 8; diff --git a/engines/access/martian/martian_resources.h b/engines/access/martian/martian_resources.h index fb147ac149..cf74cbbbf0 100644 --- a/engines/access/martian/martian_resources.h +++ b/engines/access/martian/martian_resources.h @@ -31,6 +31,11 @@ namespace Martian { extern const char *const FILENAMES[]; +extern const int SIDEOFFR[]; +extern const int SIDEOFFL[]; +extern const int SIDEOFFU[]; +extern const int SIDEOFFD[]; + extern const byte *const CURSORS[4]; extern const int TRAVEL_POS[][2]; diff --git a/engines/access/player.cpp b/engines/access/player.cpp index fe555ec49a..e7a7b3f3c0 100644 --- a/engines/access/player.cpp +++ b/engines/access/player.cpp @@ -112,21 +112,6 @@ void Player::load() { _downDelta = -10; _scrollConst = 5; - for (int i = 0; i < dataCount; ++i) { - _walkOffRight[i] = SIDEOFFR[i]; - _walkOffLeft[i] = SIDEOFFL[i]; - _walkOffUp[i] = SIDEOFFU[i]; - _walkOffDown[i] = SIDEOFFD[i]; - _walkOffUR[i].x = DIAGOFFURX[i]; - _walkOffUR[i].y = DIAGOFFURY[i]; - _walkOffDR[i].x = DIAGOFFDRX[i]; - _walkOffDR[i].y = DIAGOFFDRY[i]; - _walkOffUL[i].x = DIAGOFFULX[i]; - _walkOffUL[i].y = DIAGOFFULY[i]; - _walkOffDL[i].x = DIAGOFFDLX[i]; - _walkOffDL[i].y = DIAGOFFDLY[i]; - } - _sideWalkMin = 0; _sideWalkMax = 7; _upWalkMin = 16; @@ -394,7 +379,7 @@ void Player::walkRight() { if (_frame > _sideWalkMax) _frame = _sideWalkMin; - plotCom(0); + plotCom0(); } } @@ -671,15 +656,19 @@ void Player::checkMove() { } void Player::plotCom(int flags) { - _flags &= ~2; - _flags &= ~8; + _flags &= ~IMGFLAG_BACKWARDS; + _flags &= ~IMGFLAG_UNSCALED; _flags |= flags; plotCom3(); } +void Player::plotCom0() { + plotCom(_vm->getGameID() == GType_Amazon ? 0 : IMGFLAG_BACKWARDS); +} + void Player::plotCom1() { - plotCom(2); + plotCom(_vm->getGameID() == GType_Amazon ? IMGFLAG_BACKWARDS : 0); } void Player::plotCom2() { diff --git a/engines/access/player.h b/engines/access/player.h index db88892d7c..8cecb6710e 100644 --- a/engines/access/player.h +++ b/engines/access/player.h @@ -60,6 +60,7 @@ protected: int _inactiveYOff; void plotCom(int v1); + void plotCom0(); void plotCom1(); void plotCom2(); void plotCom3(); diff --git a/engines/access/resources.cpp b/engines/access/resources.cpp index 118e887721..b1cc64840b 100644 --- a/engines/access/resources.cpp +++ b/engines/access/resources.cpp @@ -46,19 +46,6 @@ const byte INITIAL_PALETTE[18 * 3] = { 0x00, 0x00, 0x00 }; -const int SIDEOFFR[] = { 5, 5, 5, 5, 5, 5, 5, 5, 0 }; -const int SIDEOFFL[] = { 5, 5, 5, 5, 5, 5, 5, 5, 0 }; -const int SIDEOFFU[] = { 2, 2, 2, 2, 2, 2, 2, 2, 0 }; -const int SIDEOFFD[] = { 2, 2, 2, 2, 2, 2, 2, 2, 0 }; -const int DIAGOFFURX[] = { 4, 5, 2, 2, 3, 4, 2, 2, 0 }; -const int DIAGOFFURY[] = { 2, 3, 2, 2, 2, 3, 1, 1, 0 }; -const int DIAGOFFDRX[] = { 4, 5, 4, 3, 5, 4, 5, 1, 0 }; -const int DIAGOFFDRY[] = { 3, 2, 1, 2, 2, 1, 2, 1, 0 }; -const int DIAGOFFULX[] = { 4, 5, 4, 3, 3, 2, 2, 2, 0 }; -const int DIAGOFFULY[] = { 3, 3, 1, 2, 2, 1, 1, 1, 0 }; -const int DIAGOFFDLX[] = { 4, 5, 3, 3, 5, 4, 6, 1, 0 }; -const int DIAGOFFDLY[] = { 2, 2, 1, 2, 3, 1, 2, 1, 0 }; - const char *const LOOK_MESSAGE = "LOOKING THERE REVEALS NOTHING OF INTEREST."; const char *const GET_MESSAGE = "YOU CAN'T TAKE THAT."; const char *const OPEN_MESSAGE = "THAT DOESN'T OPEN."; diff --git a/engines/access/resources.h b/engines/access/resources.h index 2ef931b11a..07b8e5ada9 100644 --- a/engines/access/resources.h +++ b/engines/access/resources.h @@ -29,19 +29,6 @@ namespace Access { extern const byte INITIAL_PALETTE[18 * 3]; -extern const int SIDEOFFR[]; -extern const int SIDEOFFL[]; -extern const int SIDEOFFU[]; -extern const int SIDEOFFD[]; -extern const int DIAGOFFURX[]; -extern const int DIAGOFFURY[]; -extern const int DIAGOFFDRX[]; -extern const int DIAGOFFDRY[]; -extern const int DIAGOFFULX[]; -extern const int DIAGOFFULY[]; -extern const int DIAGOFFDLX[]; -extern const int DIAGOFFDLY[]; - extern const char *const GENERAL_MESSAGES[]; extern const int INVCOORDS[][4]; |