diff options
author | Arnaud Boutonné | 2010-09-27 20:24:36 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2010-09-27 20:24:36 +0000 |
commit | 3db60d9e441cbf48701d0a0565ac87f6c69b1d15 (patch) | |
tree | 64e3bfcc5723dadddfa226de8944a5a952e4fc66 /engines/hugo/parser.cpp | |
parent | 2e57bcad525cb00d1866b09c2ca2a34877c0fa1f (diff) | |
download | scummvm-rg350-3db60d9e441cbf48701d0a0565ac87f6c69b1d15.tar.gz scummvm-rg350-3db60d9e441cbf48701d0a0565ac87f6c69b1d15.tar.bz2 scummvm-rg350-3db60d9e441cbf48701d0a0565ac87f6c69b1d15.zip |
HUGO: Add F3 behavior (recall), little cleanup
- Add F3 behavior
- Move drawStatusText() to Screen
svn-id: r52920
Diffstat (limited to 'engines/hugo/parser.cpp')
-rw-r--r-- | engines/hugo/parser.cpp | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp index e4d7364b61..c4833c295b 100644 --- a/engines/hugo/parser.cpp +++ b/engines/hugo/parser.cpp @@ -98,10 +98,12 @@ void Parser::keyHandler(uint16 nChar, uint16 nFlags) { _vm.sound().toggleMusic(); break; case Common::KEYCODE_F3: // Repeat last line + gameStatus.recallFl = true; + break; case Common::KEYCODE_F4: // Save game case Common::KEYCODE_F5: // Restore game case Common::KEYCODE_F9: // Boss button - warning("STUB: KeyHandler() - F3-F9 (DOS)"); + warning("STUB: KeyHandler() - F4-F5-F9 (DOS)"); break; default: // Any other key if (!gameStatus.storyModeFl) { // Keyboard disabled @@ -184,8 +186,8 @@ void Parser::charHandler() { lineIndex = strlen(cmdLine); } - sprintf(_statusLine, ">%s%c", cmdLine, cursor); - sprintf(_scoreLine, "F1-Help %s Score: %d of %d Sound %s", (_config.turboFl) ? "T" : " ", _vm.getScore(), _vm.getMaxScore(), (_config.soundFl) ? "On" : "Off"); + sprintf(_vm._statusLine, ">%s%c", cmdLine, cursor); + sprintf(_vm._scoreLine, "F1-Help %s Score: %d of %d Sound %s", (_config.turboFl) ? "T" : " ", _vm.getScore(), _vm.getMaxScore(), (_config.soundFl) ? "On" : "Off"); // See if "look" button pressed if (gameStatus.lookFl) { @@ -194,24 +196,6 @@ void Parser::charHandler() { } } -void Parser::drawStatusText() { - debugC(4, kDebugParser, "drawStatusText"); - - _vm.screen().loadFont(U_FONT8); - uint16 sdx = _vm.screen().stringLength(_statusLine); - uint16 sdy = _vm.screen().fontHeight() + 1; // + 1 for shadow - uint16 posX = 0; - uint16 posY = YPIX - sdy; - // Display the string and add rect to display list - _vm.screen().writeStr(posX, posY, _statusLine, _TLIGHTYELLOW); - _vm.screen().displayList(D_ADD, posX, posY, sdx, sdy); - - sdx = _vm.screen().stringLength(_scoreLine); - posY = 0; - _vm.screen().writeStr(posX, posY, _scoreLine, _TCYAN); - _vm.screen().displayList(D_ADD, posX, posY, sdx, sdy); -} - // Perform an immediate command. Takes parameters a la sprintf // Assumes final string will not overrun line[] length void Parser::command(const char *format, ...) { |