diff options
Diffstat (limited to 'engines/avalanche/timer.cpp')
-rw-r--r-- | engines/avalanche/timer.cpp | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/engines/avalanche/timer.cpp b/engines/avalanche/timer.cpp index 40f2af529a..b7a8433e71 100644 --- a/engines/avalanche/timer.cpp +++ b/engines/avalanche/timer.cpp @@ -327,12 +327,11 @@ void Timer::hangAround2() { _vm->_animation->_sprites[0]->remove(); spr->remove(); // Get rid of Robin Hood and Friar Tuck. - addTimer(1, kProcAfterTheShootemup, kReasonHangingAround); - // Immediately call the following proc (when you have a chance). + addTimer(1, kProcAfterTheShootemup, kReasonHangingAround); // Immediately call the following proc (when you have a chance). _vm->_tiedUp = false; - // _vm->_enid->backToBootstrap(1); Call the shoot-'em-up. TODO: Replace it with proper ScummVM-friendly function(s)! Do not remove until then! + _vm->_shootemup->run(); } void Timer::afterTheShootemup() { @@ -492,7 +491,7 @@ void Timer::buyDrinks() { _vm->_malagauche = 0; _vm->_dialogs->displayScrollChain('D', _vm->_drinking); // Display message about it. - _vm->_pingo->wobble(); // Do the special effects. + _vm->_animation->wobble(); // Do the special effects. _vm->_dialogs->displayScrollChain('D', 1); // That'll be thruppence. if (_vm->decreaseMoney(3)) // Pay 3d. _vm->_dialogs->displayScrollChain('D', 3); // Tell 'em you paid up. @@ -632,17 +631,39 @@ void Timer::arkataShouts() { addTimer(160, kProcArkataShouts, kReasonArkataShouts); } +/** + * @remarks Contains the content of the function 'winning_pic', originally located in PINGO. + */ void Timer::winning() { _vm->_dialogs->displayScrollChain('Q', 79); - _vm->_pingo->winningPic(); - warning("STUB: Timer::winning()"); -#if 0 - do { - _vm->checkclick(); - } while (!(_vm->mrelease == 0)); -#endif - // TODO: To be implemented with Pingo::winningPic(). + // This was originally located in winning_pic: + CursorMan.showMouse(false); + _vm->_graphics->saveScreen(); + _vm->fadeOut(); + _vm->_graphics->drawWinningPic(); + _vm->_graphics->refreshScreen(); + _vm->fadeIn(); + + // Waiting for a keypress or a left mouseclick: + Common::Event event; + bool escape = false; + while (!_vm->shouldQuit() && !escape) { + _vm->_graphics->refreshScreen(); + while (_vm->getEvent(event)) { + if ((event.type == Common::EVENT_LBUTTONUP) || (event.type == Common::EVENT_KEYDOWN)) { + escape = true; + break; + } + } + } + + _vm->fadeOut(); + _vm->_graphics->restoreScreen(); + _vm->_graphics->removeBackup(); + _vm->fadeIn(); + CursorMan.showMouse(true); + // winning_pic's end. _vm->callVerb(kVerbCodeScore); _vm->_dialogs->displayText(" T H E E N D "); |