diff options
author | Strangerke | 2014-11-24 00:54:45 +0100 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:41:33 -0500 |
commit | 36a3c5d2341204cbbba8bd067f90e65820edb72b (patch) | |
tree | 1d491ca007463798bc3a309287b5d17a6f498b00 /engines | |
parent | cdb2159ba282bd8218db86651199ee8072603525 (diff) | |
download | scummvm-rg350-36a3c5d2341204cbbba8bd067f90e65820edb72b.tar.gz scummvm-rg350-36a3c5d2341204cbbba8bd067f90e65820edb72b.tar.bz2 scummvm-rg350-36a3c5d2341204cbbba8bd067f90e65820edb72b.zip |
ACCESS: Implement riverJumpTest
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/amazon/amazon_scripts.cpp | 58 | ||||
-rw-r--r-- | engines/access/amazon/amazon_scripts.h | 4 |
2 files changed, 57 insertions, 5 deletions
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp index e4c58c9eb5..c61229b5d1 100644 --- a/engines/access/amazon/amazon_scripts.cpp +++ b/engines/access/amazon/amazon_scripts.cpp @@ -1733,10 +1733,60 @@ void AmazonScripts::initRiver() { _game->_saveRiver = 0; } -bool AmazonScripts::JUMPTEST() { - warning("TODO: JUMPTEST();"); +void AmazonScripts::RESETPOSITIONS() { + warning("TODO: RESETPOSITIONS"); +} + +void AmazonScripts::CHECKRIVERPAN() { + warning("TODO: CHECKRIVERPAN"); +} + +bool AmazonScripts::riverJumpTest() { + if (_vm->_screen->_scrollCol == 120 || _vm->_screen->_scrollCol == 60 || _vm->_screen->_scrollCol == 0) { + int val = _game->_mapPtr[0]; + ++_game->_mapPtr; + if (val == 0xFF) + return true; + _game->_oldScrollCol = _vm->_screen->_scrollCol; + + if (val == 0) { + _vm->_screen->_scrollCol = 139; + _vm->_screen->_scrollX = 14; + _vm->_room->buildScreen(); + RESETPOSITIONS(); + return false; + } + } else if (_vm->_screen->_scrollCol == 105) { + int val1 = _game->_mapPtr[1]; + int val2 = _game->_mapPtr[2]; + _game->_mapPtr += 3; + if (_game->_canoeLane < 3) { + if (val1 != 0) { + _game->_deathFlag = true; + _game->_deathCount = 300; + _game->_deathType = val2; + } + } else { + if (val1 != 1) { + _game->_deathFlag = true; + _game->_deathCount = 300; + _game->_deathType = val2; + } + _game->_oldScrollCol = _vm->_screen->_scrollCol; + _vm->_screen->_scrollCol = 44; + _vm->_screen->_scrollX = 14; + _vm->_room->buildScreen(); + RESETPOSITIONS(); + return false; + } + } - return true; + _vm->_screen->_scrollX = 14; + --_vm->_screen->_scrollCol; + _vm->_buffer1.moveBufferRight(); + _vm->_room->buildColumn(_vm->_screen->_scrollCol, 0); + CHECKRIVERPAN(); + return false; } void AmazonScripts::riverSound() { @@ -1784,7 +1834,7 @@ void AmazonScripts::RIVER() { int bx = _vm->_player->_scrollAmount - _screenVertX; if (_vm->_screen->_scrollX == 0) { _vm->_sound->midiRepeat(); - if (JUMPTEST()) { + if (riverJumpTest()) { CHICKENOUTFLG = false; return; } diff --git a/engines/access/amazon/amazon_scripts.h b/engines/access/amazon/amazon_scripts.h index 7162bab057..155afb8ac7 100644 --- a/engines/access/amazon/amazon_scripts.h +++ b/engines/access/amazon/amazon_scripts.h @@ -96,7 +96,9 @@ protected: void doCast(int param1); void loadBackground(int param1, int param2); void initRiver(); - bool JUMPTEST(); + void RESETPOSITIONS(); + void CHECKRIVERPAN(); + bool riverJumpTest(); void riverSound(); void MOVECANOE(); void UPDATEOBSTACLES(); |