diff options
Diffstat (limited to 'engines/avalanche/avalot.cpp')
-rw-r--r-- | engines/avalanche/avalot.cpp | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index d7dcff9677..ceaf754601 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -89,8 +89,8 @@ void Avalot::setup() { _vm->_lucerna->load_digits(); _vm->_gyro->cheat = false; _vm->_gyro->cp = 0; - _vm->_gyro->curpos = 0; - _vm->_gyro->quote = true; + _vm->_parser->inputTextPos = 0; + _vm->_parser->quote = true; _vm->_gyro->ledstatus = 177; _vm->_gyro->defaultled = 2; /* TSkellern:=0; { Replace with a more local variable sometime }*/ @@ -173,27 +173,8 @@ void Avalot::handleKeyDown(const Common::Event &event) { break; } - if ((32 <= event.kbd.ascii) && (event.kbd.ascii <= 128) && (event.kbd.ascii != 47)) { - byte inChar = event.kbd.ascii; - if (_vm->_dropdown->ddm_o.menunow) { - _vm->_dropdown->parsekey(inChar, _vm->_enhanced->extd); - } else { - if (_vm->_gyro->inputText.size() < 76) { - if ((inChar == '"') || (inChar == '`')) { - if (_vm->_gyro->quote) - inChar = '`'; - else - inChar = '"'; - _vm->_gyro->quote = !_vm->_gyro->quote; // quote - unquote - } - - _vm->_gyro->inputText.insertChar(inChar, _vm->_gyro->curpos); - _vm->_gyro->curpos++; - _vm->_basher->plottext(); - } else - _vm->_gyro->blip(); - } - } + if ((32 <= event.kbd.ascii) && (event.kbd.ascii <= 128) && (event.kbd.ascii != 47)) + _vm->_parser->handleInputText(event); } |