aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-02-14 05:01:12 +0100
committeruruk2014-02-14 05:01:12 +0100
commitb46224ef3d529befdea8cdf085813e9a633b3517 (patch)
treed2cf4522d64675e08c82193ced16779dec685293
parent5dbe676011ec9d24030fd10ff3e213045798df12 (diff)
downloadscummvm-rg350-b46224ef3d529befdea8cdf085813e9a633b3517.tar.gz
scummvm-rg350-b46224ef3d529befdea8cdf085813e9a633b3517.tar.bz2
scummvm-rg350-b46224ef3d529befdea8cdf085813e9a633b3517.zip
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.
-rw-r--r--engines/avalanche/help.cpp30
-rw-r--r--engines/avalanche/help.h2
2 files changed, 13 insertions, 19 deletions
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