diff options
Diffstat (limited to 'engines/access/amazon/amazon_logic.cpp')
-rw-r--r-- | engines/access/amazon/amazon_logic.cpp | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp index de53da51cd..08006fe1b7 100644 --- a/engines/access/amazon/amazon_logic.cpp +++ b/engines/access/amazon/amazon_logic.cpp @@ -185,16 +185,24 @@ void CampScene::mWhileDoOpen() { _vm->_numAnimTimers = 0; _vm->_images.clear(); - if (_vm->_conversation == 2) { - // Cutscene at end of Chapter 6 - Resource *spriteData = _vm->_files->loadFile(28, 37); - _vm->_objectsTable[28] = new SpriteResource(_vm, spriteData); - delete spriteData; - - _vm->_animation->freeAnimationData(); - animResource = _vm->_files->loadFile(28, 38); - _vm->_animation->loadAnimations(animResource); - delete animResource; + if (_vm->isCD()) { + if (_vm->_conversation == 2) { + // Cutscene at end of Chapter 6 + Resource *spriteData = _vm->_files->loadFile(28, 37); + _vm->_objectsTable[28] = new SpriteResource(_vm, spriteData); + delete spriteData; + + _vm->_animation->freeAnimationData(); + animResource = _vm->_files->loadFile(28, 38); + _vm->_animation->loadAnimations(animResource); + delete animResource; + } + } else { + _vm->freeCells(); + _vm->_oldRects.clear(); + _vm->_newRects.clear(); + _vm->_numAnimTimers = 0; + _vm->_images.clear(); } } @@ -1251,6 +1259,9 @@ Cast::Cast(AmazonEngine *vm) : PannedScene(vm) { void Cast::doCast(int param1) { Screen &screen = *_vm->_screen; + _vm->_buffer1.create(_vm->_screen->w, _vm->_screen->h); + _vm->_buffer2.create(_vm->_screen->w, _vm->_screen->h); + screen.setDisplayScan(); _vm->_events->hideCursor(); screen.forceFadeOut(); @@ -1294,8 +1305,8 @@ void Cast::doCast(int param1) { _pan[i]._pObjXl = _pan[i]._pObjYl = 0; } - _pNumObj = 4; - for (int i = 0; i < _pNumObj; i++) { + _pNumObj += 4; + for (int i = 0; i < 4; i++) { _pan[26 + i]._pObject = _vm->_objectsTable[1]; _pan[26 + i]._pImgNum = CAST_END_OBJ1[i][0]; _pan[26 + i]._pObjX = CAST_END_OBJ1[i][1]; @@ -1319,20 +1330,16 @@ void Cast::doCast(int param1) { _vm->plotList(); _vm->copyBlocks(); - _vm->_events->pollEvents(); + for (int idx = 0; idx < 5 && !_vm->shouldQuit() && + !_vm->_events->isKeyMousePressed(); ++idx) + _vm->_events->pollEventsAndWait(); + if (_vm->_events->isKeyMousePressed()) break; if (_yCam < -7550) { - _vm->_events->_vbCount = 50; - - while (!_vm->shouldQuit() && !_vm->_events->isKeyMousePressed() && _vm->_events->_vbCount > 0) { - _vm->_events->pollEventsAndWait(); - } - while (!_vm->shouldQuit() && !_vm->_midi->checkMidiDone()) _vm->_events->pollEventsAndWait(); - break; } } @@ -1598,7 +1605,7 @@ void River::moveCanoe() { if (events._leftButton && pt.y >= 140) { if (pt.x < _vm->_room->_rMouse[8][0]) { // Disk icon wasn't clicked - _vm->_scripts->printString(BAR_MESSAGE); + _vm->_scripts->printString(AMRES.BAR_MESSAGE); } else { // Clicked on the Disc icon. Show the ScummVM menu _vm->_room->handleCommand(9); |