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

urukgit urukgit at users.noreply.github.com
Wed Feb 12 21:40:09 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:
cb2b1d5ca1 AVALANCHE: Rename/implement rest of getMe().


Commit: cb2b1d5ca1e28a1192e86a89b37006d72cc6b078
    https://github.com/scummvm/scummvm/commit/cb2b1d5ca1e28a1192e86a89b37006d72cc6b078
Author: uruk (koppirnyo at gmail.com)
Date: 2014-02-12T12:39:38-08:00

Commit Message:
AVALANCHE: Rename/implement rest of getMe().

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



diff --git a/engines/avalanche/help.cpp b/engines/avalanche/help.cpp
index c75be19..12ea31e 100644
--- a/engines/avalanche/help.cpp
+++ b/engines/avalanche/help.cpp
@@ -38,7 +38,11 @@ Help::Help(AvalancheEngine *vm) {
 	_highlightWas = 0;
 }
 
-void Help::getMe(byte which) {
+/**
+ * Loads and draws the chosen page of the help.
+ * @remarks Originally called 'getme'
+ */
+void Help::switchPage(byte which) {
 	// Help icons are 80x20.
 	
 	_highlightWas = 177; // Forget where the highlight was.
@@ -83,7 +87,38 @@ void Help::getMe(byte which) {
 		y++;
 	} while (true);
 
-	warning("STUB: Help::getMe()");
+	// We are now at the end of the text. Next we must read the icons:
+	y = 0;
+	while (!file.eos()) {
+		_buttons[y]._trigger = file.readByte();
+		if (_buttons[y]._trigger == 177)
+			break;
+		byte index = file.readByte();
+		if (_buttons[y]._trigger != 0)
+			_vm->_graphics->helpDrawButton(13 + (y + 1) * 27, index);
+		_buttons[y]._whither = file.readByte(); // This is the position to jump to.
+
+		Common::String text = "";
+		switch (_buttons[y]._trigger) {
+		case 254:
+			text = Common::String("Esc");
+			break;
+		case 'Ö':
+			text = Common::String(24);
+			break;
+		case 'Ø':
+			text = Common::String(25);
+			break;
+		default:
+			text = Common::String(_buttons[y]._trigger);
+			break;
+		}
+
+		_vm->_graphics->drawBigText(text, _vm->_font, 8, 589 - (text.size() * 8), 18 + (y + 1) * 27, kColorBlack);
+		_vm->_graphics->drawBigText(text, _vm->_font, 8, 590 - (text.size() * 8), 17 + (y + 1) * 27, kColorCyan);
+		
+		y++;
+	}
 
 	_vm->_graphics->refreshScreen();
 
@@ -120,7 +155,7 @@ void Help::run() {
 
 	_vm->_graphics->loadMouse(kCurHelp);
 	
-	getMe(0);
+	switchPage(0);
 
 	continueHelp();
 
diff --git a/engines/avalanche/help.h b/engines/avalanche/help.h
index f2d02f3..626709b 100644
--- a/engines/avalanche/help.h
+++ b/engines/avalanche/help.h
@@ -49,7 +49,7 @@ private:
 	Button _buttons[10];
 	byte _highlightWas;
 
-	void getMe(byte which);
+	void switchPage(byte which);
 	Common::String getLine(Common::File &file); // It was a nested function in getMe().
 	byte checkMouse(); // Returns clicked-on button, or 0 if none.
 	void continueHelp();






More information about the Scummvm-git-logs mailing list