aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2014-11-21 00:54:13 +0100
committerPaul Gilbert2014-12-12 22:36:36 -0500
commit60ee5456c9b7436e0830ba30a30acb53051d2820 (patch)
tree39c116e4defb80d3adb7c9852f9ed0211872f806
parent7427f29e85dc5988126349b2579d37a0cf3997f1 (diff)
downloadscummvm-rg350-60ee5456c9b7436e0830ba30a30acb53051d2820.tar.gz
scummvm-rg350-60ee5456c9b7436e0830ba30a30acb53051d2820.tar.bz2
scummvm-rg350-60ee5456c9b7436e0830ba30a30acb53051d2820.zip
ACCESS: Implement jungleMove
-rw-r--r--engines/access/amazon/amazon_scripts.cpp33
1 files changed, 30 insertions, 3 deletions
diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp
index f7d1df5503..7272564fdb 100644
--- a/engines/access/amazon/amazon_scripts.cpp
+++ b/engines/access/amazon/amazon_scripts.cpp
@@ -280,7 +280,35 @@ void AmazonScripts::initJWalk2() {
}
void AmazonScripts::jungleMove() {
- warning("TODO jungleMove");
+ const static int jungleY[3] = {27, 30, 29};
+ int cx = 1;
+ int dx = 0;
+ if (_vm->_timers[0]._flag == 0) {
+ _vm->_timers[0]._flag = 1;
+ _vm->_screen->_scrollX += _vm->_player->_scrollAmount;
+ for (int i = 0; i <= 3; i++) {
+ int newJCnt = (_jCnt[i] + 1) % 8;
+ _jCnt[i] = newJCnt;
+ _jungleX[i] += 5;
+ }
+ dx = 4;
+ if (_game->_allenFlag != 1)
+ cx = 2;
+ else
+ cx = 3;
+ }
+
+ for (int i = 0; i <= cx; i++) {
+ ImageEntry ie;
+ ie._flags = 8;
+ ie._spritesPtr = _vm->_objectsTable[24];
+ ie._frameNumber = _jCnt[i] + dx;
+ ie._position = Common::Point(_jungleX[i], jungleY[i]);
+ ie._offsetY = jungleY[i];
+
+ _vm->_images.addToList(ie);
+ dx += 8;
+ }
}
void AmazonScripts::mWhileJWalk2() {
@@ -293,9 +321,8 @@ void AmazonScripts::mWhileJWalk2() {
_vm->_events->_vbCount = 6;
_pImgNum[0] = _game->_plane._xCount;
while ((screen._scrollCol + screen._vWindowWidth) != _vm->_room->_playFieldWidth) {
- int scrollX = screen._scrollCol + screen._vWindowWidth;
jungleMove();
- while (scrollX >= TILE_WIDTH) {
+ while (screen._scrollX >= TILE_WIDTH) {
screen._scrollX -= TILE_WIDTH;
++screen._scrollCol;
_vm->_buffer1.moveBufferLeft();