aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2014-02-12 21:39:29 +0100
committeruruk2014-02-12 21:39:38 +0100
commitcb2b1d5ca1e28a1192e86a89b37006d72cc6b078 (patch)
tree606922eb9b2f9f827e63d4fe50015d14169b7a43 /engines
parent24d2e246b48a0061c4c2f6c37b5bb5d8646d4e99 (diff)
downloadscummvm-rg350-cb2b1d5ca1e28a1192e86a89b37006d72cc6b078.tar.gz
scummvm-rg350-cb2b1d5ca1e28a1192e86a89b37006d72cc6b078.tar.bz2
scummvm-rg350-cb2b1d5ca1e28a1192e86a89b37006d72cc6b078.zip
AVALANCHE: Rename/implement rest of getMe().
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/help.cpp41
-rw-r--r--engines/avalanche/help.h2
2 files changed, 39 insertions, 4 deletions
diff --git a/engines/avalanche/help.cpp b/engines/avalanche/help.cpp
index c75be19cea..12ea31ebde 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 f2d02f3e32..626709b6c3 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();