aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/parser.cpp
diff options
context:
space:
mode:
authorArnaud Boutonné2010-08-18 16:14:38 +0000
committerArnaud Boutonné2010-08-18 16:14:38 +0000
commitfa41f9ffd05a97c90a59fb629a7b6e61abf231fa (patch)
tree023165eae292ff3bc78ae87bcdde45d54a17e494 /engines/hugo/parser.cpp
parentfc94562c771a528ba6be57504c9bc097cac9d426 (diff)
downloadscummvm-rg350-fa41f9ffd05a97c90a59fb629a7b6e61abf231fa.tar.gz
scummvm-rg350-fa41f9ffd05a97c90a59fb629a7b6e61abf231fa.tar.bz2
scummvm-rg350-fa41f9ffd05a97c90a59fb629a7b6e61abf231fa.zip
Hugo - Check double F1, display properly the content of help.dat if present
svn-id: r52189
Diffstat (limited to 'engines/hugo/parser.cpp')
-rw-r--r--engines/hugo/parser.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp
index c9c3b8dc4e..60a33425de 100644
--- a/engines/hugo/parser.cpp
+++ b/engines/hugo/parser.cpp
@@ -54,6 +54,7 @@ namespace Hugo {
Parser::Parser(HugoEngine &vm) :
_vm(vm), _putIndex(0), _getIndex(0) {
+ _checkDoubleF1Fl = false;
}
void Parser::keyHandler(uint16 nChar, uint16 nFlags) {
@@ -81,11 +82,12 @@ void Parser::keyHandler(uint16 nChar, uint16 nFlags) {
}
break;
case Common::KEYCODE_F1: // User Help (DOS)
- if (repeatedFl) {
+ if (_checkDoubleF1Fl) {
_vm.file().instructions();
- nChar = '\0';
+ _checkDoubleF1Fl = false;
} else
_vm.screen().userHelp();
+ _checkDoubleF1Fl = true;
break;
case Common::KEYCODE_F2: // Toggle sound
case Common::KEYCODE_F3: // Repeat last line
@@ -110,6 +112,8 @@ void Parser::keyHandler(uint16 nChar, uint16 nFlags) {
}
break;
}
+ if ((_checkDoubleF1Fl) && (nChar != Common::KEYCODE_F1))
+ _checkDoubleF1Fl = false;
}
// Add any new chars to line buffer and display them.
@@ -125,10 +129,6 @@ void Parser::charHandler() {
// bool updateFl = (_getIndex != _putIndex); // TRUE if any chars processed
// command_t status_line; // Includes prompt, cursor
-//Strangerke : Useless ?
-// bool updateFl = (_getIndex != _putIndex); // TRUE if any chars processed
- //command_t status_line; // Includes prompt, cursor
-
debugC(4, kDebugParser, "charHandler");
// Check for one or more characters in ring buffer