diff options
author | uruk | 2014-04-06 19:42:46 +0200 |
---|---|---|
committer | uruk | 2014-04-06 19:42:46 +0200 |
commit | 647679b925e2548f0d15d4e27a3aa2c908151c5a (patch) | |
tree | 86941c4fbe96f368f7043af05a8a276858fcce38 /engines | |
parent | aa55e41b75ac773aa53c2c976b8a036fd4357927 (diff) | |
download | scummvm-rg350-647679b925e2548f0d15d4e27a3aa2c908151c5a.tar.gz scummvm-rg350-647679b925e2548f0d15d4e27a3aa2c908151c5a.tar.bz2 scummvm-rg350-647679b925e2548f0d15d4e27a3aa2c908151c5a.zip |
AVALANCHE: Remove some leftovers of the mini-games.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/parser.cpp | 3 | ||||
-rw-r--r-- | engines/avalanche/shootemup.cpp | 6 | ||||
-rw-r--r-- | engines/avalanche/shootemup.h | 2 | ||||
-rw-r--r-- | engines/avalanche/timer.cpp | 27 | ||||
-rw-r--r-- | engines/avalanche/timer.h | 2 |
5 files changed, 16 insertions, 24 deletions
diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp index 7db0d14890..da365fe93f 100644 --- a/engines/avalanche/parser.cpp +++ b/engines/avalanche/parser.cpp @@ -2021,8 +2021,7 @@ void Parser::doThat() { break; case 55: if (_vm->_room == kRoomArgentPub) - // play_nim(); - warning("STUB: Parser::doThat() - case kVerbCodeplay - play_nim()"); + _vm->_nim->playNim(); else _vm->_dialogs->displayText(kWhat); break; diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp index 8d61316daa..cabd19d6f9 100644 --- a/engines/avalanche/shootemup.cpp +++ b/engines/avalanche/shootemup.cpp @@ -95,7 +95,7 @@ ShootEmUp::ShootEmUp(AvalancheEngine *vm) { _gotOut = false; } -void ShootEmUp::run() { +uint16 ShootEmUp::run() { CursorMan.showMouse(false); _vm->_graphics->saveScreen(); _vm->fadeOut(); @@ -142,12 +142,14 @@ void ShootEmUp::run() { if (delay <= 55) _vm->_system->delayMillis(55 - delay); // Replaces slowdown(); 55 comes from 18.2 Hz (B Flight). }; - + _vm->fadeOut(); _vm->_graphics->restoreScreen(); _vm->_graphics->removeBackup(); _vm->fadeIn(); CursorMan.showMouse(true); + + return _score; } bool ShootEmUp::overlap(uint16 a1x, uint16 a1y, uint16 a2x, uint16 a2y, uint16 b1x, uint16 b1y, uint16 b2x, uint16 b2y) { diff --git a/engines/avalanche/shootemup.h b/engines/avalanche/shootemup.h index 4c010aa71e..3cdcc1d5cd 100644 --- a/engines/avalanche/shootemup.h +++ b/engines/avalanche/shootemup.h @@ -35,7 +35,7 @@ class ShootEmUp { public: ShootEmUp(AvalancheEngine *vm); - void run(); + uint16 run(); private: struct Sprite { diff --git a/engines/avalanche/timer.cpp b/engines/avalanche/timer.cpp index 7b6e1ee1ce..8a7ef9a316 100644 --- a/engines/avalanche/timer.cpp +++ b/engines/avalanche/timer.cpp @@ -333,12 +333,11 @@ void Timer::hangAround2() { // We don't need the ShootEmUp during the whole game, it's only playable once. ShootEmUp *shootemup = new ShootEmUp(_vm); - shootemup->run(); + _shootEmUpScore = shootemup->run(); delete shootemup; } void Timer::afterTheShootemup() { - // Only placed this here to replace the minigame. TODO: Remove it when the shoot em' up is implemented! _vm->flipRoom(_vm->_room, 1); _vm->_animation->_sprites[0]->init(0, true); // Avalot. @@ -347,27 +346,17 @@ void Timer::afterTheShootemup() { _vm->_objects[kObjectCrossbow - 1] = true; _vm->refreshObjectList(); - // Same as the added line above: TODO: Remove it later!!! - _vm->_dialogs->displayText(Common::String("P.S.: There should have been the mini-game called \"shoot em' up\", " \ - "but I haven't implemented it yet: you get the crossbow automatically.") + kControlNewLine + kControlNewLine + "Peter (uruk)"); + byte gain = (_shootEmUpScore + 5) / 10; // Rounding up. -#if 0 - byte shootscore, gain; - - shootscore = mem[storage_seg * storage_ofs]; - gain = (shootscore + 5) / 10; // Rounding up. - - display(string("\6Your score was ") + strf(shootscore) + '.' + "\r\rYou gain (" + - strf(shootscore) + " 0xF6 10) = " + strf(gain) + " points."); + _vm->_dialogs->displayText(kControlItalic + Common::String("Your score was ") + Common::String::format("%d", _shootEmUpScore) + '.' + kControlNewLine + kControlNewLine + "You gain (" + + Common::String::format("%d", _shootEmUpScore) + " " + 0xF6 + " 10) = " + Common::String::format("%d", gain) + " points."); if (gain > 20) { - display("But we won't let you have more than 20 points!"); - points(20); + _vm->_dialogs->displayText("But we won't let you have more than 20 points!"); + _vm->incScore(20); } else - points(gain); -#endif + _vm->incScore(gain); - warning("STUB: Timer::after_the_shootemup()"); _vm->_dialogs->displayScrollChain('Q', 70); } @@ -712,6 +701,8 @@ void Timer::resetVariables() { _times[i]._action = 0; _times[i]._reason = 0; } + + _shootEmUpScore = 0; } } // End of namespace Avalanche. diff --git a/engines/avalanche/timer.h b/engines/avalanche/timer.h index fd51544fd1..ad6ac0eae6 100644 --- a/engines/avalanche/timer.h +++ b/engines/avalanche/timer.h @@ -170,7 +170,7 @@ public: private: AvalancheEngine *_vm; - + byte _shootEmUpScore; }; } // End of namespace Avalanche. |