diff options
Diffstat (limited to 'engines/access/amazon')
-rw-r--r-- | engines/access/amazon/amazon_game.cpp | 23 | ||||
-rw-r--r-- | engines/access/amazon/amazon_logic.cpp | 2 | ||||
-rw-r--r-- | engines/access/amazon/amazon_player.cpp | 18 | ||||
-rw-r--r-- | engines/access/amazon/amazon_resources.cpp | 20 | ||||
-rw-r--r-- | engines/access/amazon/amazon_resources.h | 17 | ||||
-rw-r--r-- | engines/access/amazon/amazon_scripts.cpp | 6 | ||||
-rw-r--r-- | engines/access/amazon/amazon_scripts.h | 2 |
7 files changed, 74 insertions, 14 deletions
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp index 4c9df7b8ff..9c39a9bd49 100644 --- a/engines/access/amazon/amazon_game.cpp +++ b/engines/access/amazon/amazon_game.cpp @@ -260,13 +260,24 @@ void AmazonEngine::doEstablish(int screenId, int estabIndex) { _screen->setIconPalette(); _screen->forceFadeIn(); - _fonts._charSet._lo = 1; - _fonts._charSet._hi = 10; - _fonts._charFor._lo = 29; - _fonts._charFor._hi = 32; + if (getGameID() == GType_MartianMemorandum) { + _fonts._charSet._lo = 1; + _fonts._charSet._hi = 10; + _fonts._charFor._lo = 0xF7; + _fonts._charFor._hi = 0xFF; + + _screen->_maxChars = 50; + _screen->_printOrg = _screen->_printStart = Common::Point(24, 18); + } else { + _fonts._charSet._lo = 1; + _fonts._charSet._hi = 10; + _fonts._charFor._lo = 29; + _fonts._charFor._hi = 32; + + _screen->_maxChars = 37; + _screen->_printOrg = _screen->_printStart = Common::Point(48, 35); + } - _screen->_maxChars = 37; - _screen->_printOrg = _screen->_printStart = Common::Point(48, 35); loadEstablish(estabIndex); uint16 msgOffset; if (!isCD()) diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp index ce2c96b7a2..de53da51cd 100644 --- a/engines/access/amazon/amazon_logic.cpp +++ b/engines/access/amazon/amazon_logic.cpp @@ -1596,7 +1596,7 @@ void River::moveCanoe() { moveCanoe2(); } else { if (events._leftButton && pt.y >= 140) { - if (pt.x < RMOUSE[8][0]) { + if (pt.x < _vm->_room->_rMouse[8][0]) { // Disk icon wasn't clicked _vm->_scripts->printString(BAR_MESSAGE); } else { diff --git a/engines/access/amazon/amazon_player.cpp b/engines/access/amazon/amazon_player.cpp index b1ed501fce..903da6c532 100644 --- a/engines/access/amazon/amazon_player.cpp +++ b/engines/access/amazon/amazon_player.cpp @@ -48,7 +48,7 @@ void AmazonPlayer::load() { _downDelta = -2; _scrollConst = 2; - for (int i = 0; i < PLAYER_DATA_COUNT; ++i) { + for (int i = 0; i < _vm->_playerDataCount; ++i) { _walkOffRight[i] = OVEROFFR[i]; _walkOffLeft[i] = OVEROFFL[i]; _walkOffUp[i] = OVEROFFU[i]; @@ -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 2010c7d842..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, @@ -2406,6 +2419,11 @@ const int CAST_END_OBJ1[4][4] = { { 3, 103, 1300, 10 } }; -} // End of namespace Amazon +const int RMOUSE[10][2] = { + { 0, 35 }, { 0, 0 }, { 36, 70 }, { 71, 106 }, { 107, 141 }, + { 142, 177 }, { 178, 212 }, { 213, 248 }, { 249, 283 }, { 284, 318 } +}; + +} // End of namespace Amazon } // End of namespace Access diff --git a/engines/access/amazon/amazon_resources.h b/engines/access/amazon/amazon_resources.h index a952860bc2..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]; @@ -138,11 +151,11 @@ extern const int HELP1COORDS[2][4]; extern const int RIVER1OBJ[23][4]; extern const int CAST_END_OBJ[26][4]; - extern const int CAST_END_OBJ1[4][4]; -} // End of namespace Amazon +extern const int RMOUSE[10][2]; +} // End of namespace Amazon } // End of namespace Access #endif /* ACCESS_AMAZON_RESOURCES_H */ diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp index 92acb3686d..8c49424bc5 100644 --- a/engines/access/amazon/amazon_scripts.cpp +++ b/engines/access/amazon/amazon_scripts.cpp @@ -33,6 +33,8 @@ namespace Amazon { AmazonScripts::AmazonScripts(AccessEngine *vm) : Scripts(vm) { _game = (AmazonEngine *)_vm; + + setOpcodes_v2(); } void AmazonScripts::cLoop() { @@ -379,7 +381,7 @@ typedef void(AmazonScripts::*AmazonScriptMethodPtr)(); void AmazonScripts::executeCommand(int commandIndex) { static const AmazonScriptMethodPtr COMMAND_LIST[] = { - &AmazonScripts::cmdHelp, &AmazonScripts::cmdCycleBack, + &AmazonScripts::cmdHelp_v2, &AmazonScripts::cmdCycleBack, &AmazonScripts::cmdChapter, &AmazonScripts::cmdSetHelp, &AmazonScripts::cmdCenterPanel, &AmazonScripts::cmdMainPanel, &AmazonScripts::CMDRETFLASH @@ -391,7 +393,7 @@ void AmazonScripts::executeCommand(int commandIndex) { Scripts::executeCommand(commandIndex); } -void AmazonScripts::cmdHelp() { +void AmazonScripts::cmdHelp_v2() { Common::String helpMessage = readString(); if (_game->_helpLevel == 0) { diff --git a/engines/access/amazon/amazon_scripts.h b/engines/access/amazon/amazon_scripts.h index e10eefb4f5..6d992667f5 100644 --- a/engines/access/amazon/amazon_scripts.h +++ b/engines/access/amazon/amazon_scripts.h @@ -49,7 +49,7 @@ protected: void setInactive(); void boatWalls(int param1, int param2); - void cmdHelp(); + void cmdHelp_v2(); void cmdCycleBack(); void cmdChapter(); void cmdSetHelp(); |