diff options
author | Paul Gilbert | 2014-11-23 18:59:39 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:41:45 -0500 |
commit | 74a15d659989f90140b8ff30ad4af4783802b758 (patch) | |
tree | 220651b9251b685686b29714124d632e2386aa94 /engines | |
parent | 36a3c5d2341204cbbba8bd067f90e65820edb72b (diff) | |
download | scummvm-rg350-74a15d659989f90140b8ff30ad4af4783802b758.tar.gz scummvm-rg350-74a15d659989f90140b8ff30ad4af4783802b758.tar.bz2 scummvm-rg350-74a15d659989f90140b8ff30ad4af4783802b758.zip |
ACCESS: Fix the mWhileDownRiver cutscene
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/amazon/amazon_resources.cpp | 17 | ||||
-rw-r--r-- | engines/access/amazon/amazon_resources.h | 2 | ||||
-rw-r--r-- | engines/access/amazon/amazon_scripts.cpp | 70 |
3 files changed, 45 insertions, 44 deletions
diff --git a/engines/access/amazon/amazon_resources.cpp b/engines/access/amazon/amazon_resources.cpp index 192af2c9b6..af631eae7e 100644 --- a/engines/access/amazon/amazon_resources.cpp +++ b/engines/access/amazon/amazon_resources.cpp @@ -1557,6 +1557,23 @@ const byte MAP2[32] = { const byte *MAPTBL[3] = {MAP0, MAP1, MAP2}; +const int DOWNRIVEROBJ[14][4] = { + { 3, 77, 0, 40 }, + { 2, 30, 0, 30 }, + { 2, 290, 0, 50 }, + { 1, 210, 0, 70 }, + { 2, 350, 0, 30 }, + { 1, 370, 0, 20 }, + { 2, 480, 0, 60 }, + { 3, 395, 0, 10 }, + { 1, 550, 0, 30 }, + { 2, 620, 0, 50 }, + { 1, 690, 0, 10 }, + { 2, 715, 0, 40 }, + { 1, 770, 0, 30 }, + { 3, 700, 0, 20 } +}; + const RiverStruct RIVER0OBJECTS[45] = { {16, 31, 6400, 0, 4, 12}, {16, 31, 6200, 0, 2, 12}, diff --git a/engines/access/amazon/amazon_resources.h b/engines/access/amazon/amazon_resources.h index ec412766bc..02560ccac4 100644 --- a/engines/access/amazon/amazon_resources.h +++ b/engines/access/amazon/amazon_resources.h @@ -99,6 +99,8 @@ extern const byte MAP2[32]; extern const byte *MAPTBL[3]; +extern const int DOWNRIVEROBJ[14][4]; + extern const RiverStruct RIVER0OBJECTS[45]; extern const RiverStruct ENDRIVER0[1]; extern const RiverStruct RIVER1OBJECTS[49]; diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp index c61229b5d1..4fc0a4ba91 100644 --- a/engines/access/amazon/amazon_scripts.cpp +++ b/engines/access/amazon/amazon_scripts.cpp @@ -782,23 +782,6 @@ void AmazonScripts::scrollRiver() { } void AmazonScripts::mWhileDownRiver() { - static const int RIVEROBJ[14][4] = { - {3, 77, 0, 40}, - {2, 30, 0, 30}, - {2, 290, 0, 50}, - {1, 210, 0, 70}, - {2, 350, 0, 30}, - {1, 370, 0, 20}, - {2, 480, 0, 60}, - {3, 395, 0, 10}, - {1, 550, 0, 30}, - {2, 620, 0, 50}, - {1, 690, 0, 10}, - {2, 715, 0, 40}, - {1, 770, 0, 30}, - {3, 700, 0, 20} - }; - _vm->_events->hideCursor(); _vm->_screen->setDisplayScan(); _vm->_screen->clearScreen(); @@ -813,8 +796,6 @@ void AmazonScripts::mWhileDownRiver() { _vm->_room->buildScreen(); _vm->copyBF2Vid(); - // KEYFLG = 0; - _vm->_player->_scrollAmount = 2; _vm->_destIn = &_vm->_buffer2; _xTrack = -7; @@ -829,10 +810,10 @@ void AmazonScripts::mWhileDownRiver() { _pNumObj = 14; for (int i = 0; i <_pNumObj; i++) { _pObject[i] = _vm->_objectsTable[33]; - _pImgNum[i] = RIVEROBJ[i][0]; - _pObjX[i] = RIVEROBJ[i][1]; - _pObjY[i] = RIVEROBJ[i][2]; - _pObjZ[i] = RIVEROBJ[i][3]; + _pImgNum[i] = DOWNRIVEROBJ[i][0]; + _pObjX[i] = DOWNRIVEROBJ[i][1]; + _pObjY[i] = DOWNRIVEROBJ[i][2]; + _pObjZ[i] = DOWNRIVEROBJ[i][3]; _pObjXl[i] = _pObjYl[i] = 0; } @@ -843,34 +824,35 @@ void AmazonScripts::mWhileDownRiver() { _game->_timers[4]._initTm = 350; ++_game->_timers[4]._flag; - while(true) { + while (!_vm->shouldQuit() && !_vm->_events->isKeyMousePressed() && + (_vm->_screen->_scrollCol + _vm->_screen->_vWindowWidth != _vm->_room->_playFieldWidth)) { _vm->_images.clear(); _vm->_events->_vbCount = 6; - while ((_vm->_screen->_scrollCol + _vm->_screen->_vWindowWidth != _vm->_room->_playFieldWidth) && _vm->_events->_vbCount) { - jungleMove(); - while (_vm->_screen->_scrollX >= TILE_WIDTH) { - _vm->_screen->_scrollX -= TILE_WIDTH; - ++_vm->_screen->_scrollCol; - _vm->_buffer1.moveBufferLeft(); - _vm->_room->buildColumn(_vm->_screen->_scrollCol + _vm->_screen->_vWindowWidth, _vm->_screen->_vWindowBytesWide); - } - pan(); - scrollRiver(); + _vm->_screen->_scrollX += _vm->_player->_scrollAmount; + while (_vm->_screen->_scrollX >= TILE_WIDTH) { + _vm->_screen->_scrollX -= TILE_WIDTH; + ++_vm->_screen->_scrollCol; + _vm->_buffer1.moveBufferLeft(); + _vm->_room->buildColumn(_vm->_screen->_scrollCol + _vm->_screen->_vWindowWidth, _vm->_screen->_vWindowBytesWide); + } - if (_game->_timers[3]._flag == 0) { - _game->_timers[3]._flag = 1; - _vm->_sound->playSound(1); - } else if (_game->_timers[4]._flag == 0) { - _game->_timers[4]._flag = 1; - _vm->_sound->playSound(0); - } + pan(); + scrollRiver(); - while (!_vm->shouldQuit() && _vm->_events->_vbCount > 0) { - _vm->_events->pollEventsAndWait(); - } + if (!_game->_timers[3]._flag) { + ++_game->_timers[3]._flag; + _vm->_sound->playSound(1); + } else if (!_game->_timers[4]._flag) { + ++_game->_timers[4]._flag; + _vm->_sound->playSound(0); + } + + while (!_vm->shouldQuit() && _vm->_events->_vbCount > 0) { + _vm->_events->pollEventsAndWait(); } } + _vm->_events->showCursor(); } |