diff options
author | Strangerke | 2014-11-24 13:13:53 +0100 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:42:50 -0500 |
commit | 0c4fdc6a4896a4690af45aa0aabe77d90fffcaaf (patch) | |
tree | af3d7aa351d5382573e2ba640e644334abb7bafd | |
parent | 68dc425cd4ba6907be6b1fa46c2251e5715b8803 (diff) | |
download | scummvm-rg350-0c4fdc6a4896a4690af45aa0aabe77d90fffcaaf.tar.gz scummvm-rg350-0c4fdc6a4896a4690af45aa0aabe77d90fffcaaf.tar.bz2 scummvm-rg350-0c4fdc6a4896a4690af45aa0aabe77d90fffcaaf.zip |
ACCESS: Implement some more RIVER functions
-rw-r--r-- | engines/access/amazon/amazon_scripts.cpp | 30 | ||||
-rw-r--r-- | engines/access/amazon/amazon_scripts.h | 5 |
2 files changed, 26 insertions, 9 deletions
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp index 3bd1148b64..3f0e53e6df 100644 --- a/engines/access/amazon/amazon_scripts.cpp +++ b/engines/access/amazon/amazon_scripts.cpp @@ -1727,8 +1727,15 @@ void AmazonScripts::resetPositions() { _pObjX[i] += val; } -void AmazonScripts::CHECKRIVERPAN() { - warning("TODO: CHECKRIVERPAN"); +void AmazonScripts::checkRiverPan() { + int val = (_vm->_screen->_scrollCol + 20) * 16; + + for (int i = 0; i < _pNumObj; i++) { + if (_pObjX[i] < val) + return; + } + + setRiverPan(); } bool AmazonScripts::riverJumpTest() { @@ -1775,7 +1782,7 @@ bool AmazonScripts::riverJumpTest() { --_vm->_screen->_scrollCol; _vm->_buffer1.moveBufferRight(); _vm->_room->buildColumn(_vm->_screen->_scrollCol, 0); - CHECKRIVERPAN(); + checkRiverPan(); return false; } @@ -1816,8 +1823,17 @@ void AmazonScripts::RIVERCOLLIDE() { warning("TODO: RIVERCOLLIDE()"); } -void AmazonScripts::SCROLLRIVER1() { - warning("TODO: SCROLLRIVER1()"); +void AmazonScripts::PLOTRIVER() { + warning("TODO: PLOTRIVER"); +} + +void AmazonScripts::scrollRiver1() { + _vm->copyBF1BF2(); + _vm->_newRects.clear(); + PLOTRIVER(); + _vm->plotList(); + _vm->copyRects(); + _vm->copyBF2Vid(); } void AmazonScripts::RIVER() { @@ -1876,10 +1892,10 @@ void AmazonScripts::RIVER() { if (_vm->_events->_mousePos.y >= 24 && _vm->_events->_mousePos.y <= 136) { _vm->_events->hideCursor(); - SCROLLRIVER1(); + scrollRiver1(); _vm->_events->pollEvents(); } else - SCROLLRIVER1(); + scrollRiver1(); while (!_vm->shouldQuit() && _vm->_events->_vbCount > 0) { _vm->_events->pollEventsAndWait(); diff --git a/engines/access/amazon/amazon_scripts.h b/engines/access/amazon/amazon_scripts.h index 2b634ca89a..1e3290e8e7 100644 --- a/engines/access/amazon/amazon_scripts.h +++ b/engines/access/amazon/amazon_scripts.h @@ -97,14 +97,15 @@ protected: void loadBackground(int param1, int param2); void initRiver(); void resetPositions(); - void CHECKRIVERPAN(); + void checkRiverPan(); bool riverJumpTest(); void riverSound(); void MOVECANOE(); void UPDATEOBSTACLES(); void riverSetPhysX(); void RIVERCOLLIDE(); - void SCROLLRIVER1(); + void PLOTRIVER(); + void scrollRiver1(); void setRiverPan(); void RIVER(); void plotInactive(); |