[Scummvm-cvs-logs] scummvm master -> b46224ef3d529befdea8cdf085813e9a633b3517

urukgit urukgit at users.noreply.github.com
Fri Feb 14 05:01:50 CET 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b46224ef3d AVALANCHE: Get rid of continueHelp(), fix run().


Commit: b46224ef3d529befdea8cdf085813e9a633b3517
    https://github.com/scummvm/scummvm/commit/b46224ef3d529befdea8cdf085813e9a633b3517
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-13T20:01:12-08:00

Commit Message:
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.

Changed paths:
    engines/avalanche/help.cpp
    engines/avalanche/help.h



diff --git a/engines/avalanche/help.cpp b/engines/avalanche/help.cpp
index 5b8158e..2314843 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 c63bacd..53fe81b 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






More information about the Scummvm-git-logs mailing list