aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2013-07-27 16:55:50 +0200
committeruruk2013-07-27 16:55:50 +0200
commit541f5f9c3b20311140d11f64f71678de2cc5c663 (patch)
treee224834f67fd8e61f783371362261c83bf59b67e /engines/avalanche
parent7d3b69251fa0dc3cca7fa5e3f8f86198050e8177 (diff)
downloadscummvm-rg350-541f5f9c3b20311140d11f64f71678de2cc5c663.tar.gz
scummvm-rg350-541f5f9c3b20311140d11f64f71678de2cc5c663.tar.bz2
scummvm-rg350-541f5f9c3b20311140d11f64f71678de2cc5c663.zip
AVALANCHE: Implement Avalot::handleKeyDown() further.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/avalot.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index 3f967fb868..ef0de65635 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -89,7 +89,7 @@ void Avalot::setup() {
_vm->_lucerna->load_digits();
_vm->_gyro->cheat = false;
_vm->_gyro->cp = 0;
- _vm->_gyro->curpos = 1;
+ _vm->_gyro->curpos = 0;
_vm->_gyro->quote = true;
_vm->_gyro->ledstatus = 177;
_vm->_gyro->defaultled = 2;
@@ -172,6 +172,29 @@ void Avalot::handleKeyDown(const Common::Event &event) {
_vm->_trip->handleMoveKey(event); // Fallthroughs are intended.
break;
}
+
+ if (((32 <= event.kbd.ascii) && (event.kbd.ascii <= 46)) || ((48 <= event.kbd.ascii) && (event.kbd.ascii <= 223))
+ || ((225 <= event.kbd.ascii) && (event.kbd.ascii <= 255))) {
+ 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();
+ }
+ }
}