From b46224ef3d529befdea8cdf085813e9a633b3517 Mon Sep 17 00:00:00 2001 From: uruk Date: Fri, 14 Feb 2014 05:01:12 +0100 Subject: AVALANCHE: Get rid of continueHelp(), fix run(). It was unnecessary to paint the whole screen black, we can just draw the first screen of Help immediately instead of that. --- engines/avalanche/help.cpp | 30 +++++++++++++----------------- engines/avalanche/help.h | 2 -- 2 files changed, 13 insertions(+), 19 deletions(-) (limited to 'engines/avalanche') diff --git a/engines/avalanche/help.cpp b/engines/avalanche/help.cpp index 5b8158e016..2314843146 100644 --- a/engines/avalanche/help.cpp +++ b/engines/avalanche/help.cpp @@ -218,34 +218,30 @@ bool Help::handleKeyboard(const Common::Event &event) { return false; } -void Help::continueHelp() { - bool close = false; - while (!_vm->shouldQuit() && !close) { - Common::Event event; - _vm->getEvent(event); - if (event.type == Common::EVENT_KEYDOWN) - close = handleKeyboard(event); - else if ((event.type == Common::EVENT_LBUTTONDOWN) || (event.type == Common::EVENT_LBUTTONUP) || (event.type == Common::EVENT_MOUSEMOVE)) - close = handleMouse(event); - - _vm->_graphics->refreshScreen(); - } -} - /** * @remarks Originally called 'boot_help' */ void Help::run() { _vm->_graphics->saveScreen(); _vm->fadeOut(); - _vm->_graphics->drawFilledRectangle(Common::Rect(0, 0, 640, 200), kColorBlack); // Black out the whole screen. + switchPage(0); _vm->fadeIn(); _vm->_graphics->loadMouse(kCurHelp); - switchPage(0); + // Originally it was the body of 'continue_help': + bool close = false; + while (!_vm->shouldQuit() && !close) { + Common::Event event; + _vm->getEvent(event); + if (event.type == Common::EVENT_KEYDOWN) + close = handleKeyboard(event); + else if ((event.type == Common::EVENT_LBUTTONDOWN) || (event.type == Common::EVENT_LBUTTONUP) || (event.type == Common::EVENT_MOUSEMOVE)) + close = handleMouse(event); - continueHelp(); + _vm->_graphics->refreshScreen(); + } + // End of 'continue_help'. _vm->fadeOut(); _vm->_graphics->restoreScreen(); diff --git a/engines/avalanche/help.h b/engines/avalanche/help.h index c63bacdfc6..53fe81b60e 100644 --- a/engines/avalanche/help.h +++ b/engines/avalanche/help.h @@ -57,8 +57,6 @@ private: // These two return true if we have to leave the Help: bool handleMouse(const Common::Event &event); bool handleKeyboard(const Common::Event &event); - - void continueHelp(); }; } // End of namespace Avalanche -- cgit v1.2.3