aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorathrxx2011-06-17 17:35:00 +0200
committerJohannes Schickel2011-12-26 16:18:11 +0100
commit6853452bcbed083aa84638f11e4ce04ca189f0a1 (patch)
tree35ce230273f8c3a1377cc35728ddea85267a7843 /engines
parent514c77625f3f4d60ca463c1af34fc0672c75df45 (diff)
downloadscummvm-rg350-6853452bcbed083aa84638f11e4ce04ca189f0a1.tar.gz
scummvm-rg350-6853452bcbed083aa84638f11e4ce04ca189f0a1.tar.bz2
scummvm-rg350-6853452bcbed083aa84638f11e4ce04ca189f0a1.zip
KYRA: (EOB) - fix shift key input
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/eobcommon.cpp6
-rw-r--r--engines/kyra/gui_eob.cpp12
-rw-r--r--engines/kyra/kyra_v1.cpp7
-rw-r--r--engines/kyra/loleobbase.cpp2
-rw-r--r--engines/kyra/loleobbase.h2
5 files changed, 17 insertions, 12 deletions
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp
index b7f31702dd..89a20a0ea3 100644
--- a/engines/kyra/eobcommon.cpp
+++ b/engines/kyra/eobcommon.cpp
@@ -40,7 +40,7 @@ EobCoreEngine::EobCoreEngine(OSystem *system, const GameFlags &flags) : LolEobBa
_teleporterWallId(flags.gameID == GI_EOB1 ? 52 : 44) {
_screen = 0;
_gui = 0;
-TTTTT=false;
+ //_processingButtons=false;
//_runLoopUnk2 = 0;
//_runLoopTimerUnk = 0;
_playFinale = false;
@@ -411,7 +411,7 @@ void EobCoreEngine::runLoop() {
while (!shouldQuit() && _runFlag) {
//_runLoopUnk2 = _currentBlock;
updateCharacterEvents(true);
- checkInput(_activeButtons, true);
+ checkInput(_activeButtons, true, 0);
removeInputTop();
if (_updateHandItemCursor) {
@@ -1269,7 +1269,7 @@ void EobCoreEngine::displayParchment(int id) {
removeInputTop();
while (!shouldQuit()) {
delay(_tickLength);
- if (checkInput(0) & 0xff)
+ if (checkInput(0, false, 0) & 0xff)
break;
removeInputTop();
}
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index 56c5acd3df..10eabe937f 100644
--- a/engines/kyra/gui_eob.cpp
+++ b/engines/kyra/gui_eob.cpp
@@ -1570,7 +1570,7 @@ int GUI_Eob::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
uint16 in = inputFlags & 0xff;
uint16 buttonReleaseFlag = 0;
bool clickEvt = false;
- _vm->TTTTT = true;
+ //_vm->_processingButtons = true;
_flagsMouseLeft = (_vm->_mouseClick == 1) ? 2 : 4;
_flagsMouseRight = (_vm->_mouseClick == 2) ? 2 : 4;
_vm->_mouseClick = 0;
@@ -1589,7 +1589,7 @@ int GUI_Eob::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
inputFlags = 0;
clickEvt = true;
- } else {
+ } else if (inputFlags & 0x8000) {
inputFlags &= 0xff;
}
@@ -1668,13 +1668,13 @@ int GUI_Eob::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
uint16 vR = 0;
if (inputFlags) {
- if (buttonList->keyCode == in) {
+ if (buttonList->keyCode == inputFlags) {
_progress = 1;
_flagsMouseLeft = 1;
flgs2 ^= 1;
result = iFlag;
v6 = 1;
- } else if (buttonList->keyCode2 == in) {
+ } else if (buttonList->keyCode2 == inputFlags) {
_progress = 2;
_flagsMouseRight = 1;
result = iFlag;
@@ -1941,7 +1941,9 @@ int GUI_Eob::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
if (!result)
result = inputFlags;
-_vm-> TTTTT=false;
+
+ //_vm->_processingButtons=false;
+
return result;
}
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index f5ef0d09ac..c1b9f2a453 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -285,10 +285,13 @@ int KyraEngine_v1::checkInput(Button *buttonList, bool mainLoop, int eventFlag)
}
} else {
KeyMap::const_iterator keycode = _keyMap.find(event.kbd.keycode);
- if (keycode != _keyMap.end())
+ if (keycode != _keyMap.end()) {
keys = keycode->_value;
- else
+ if (event.kbd.flags & Common::KBD_SHIFT)
+ keys |= 0x100;
+ } else {
keys = 0;
+ }
// When we got an keypress, which we might need to handle,
// break the event loop and pass it to GUI code.
diff --git a/engines/kyra/loleobbase.cpp b/engines/kyra/loleobbase.cpp
index 7db1a4ac68..47a261be6f 100644
--- a/engines/kyra/loleobbase.cpp
+++ b/engines/kyra/loleobbase.cpp
@@ -255,7 +255,7 @@ uint16 LolEobBaseEngine::processDialogue() {
}
}
} else {
- int e = checkInput(0, false) & 0xFF;
+ int e = checkInput(0, false, 0) & 0xFF;
removeInputTop();
if (e)
gui_notifyButtonListChanged();
diff --git a/engines/kyra/loleobbase.h b/engines/kyra/loleobbase.h
index 1be2a8b07f..a2c13827fc 100644
--- a/engines/kyra/loleobbase.h
+++ b/engines/kyra/loleobbase.h
@@ -253,7 +253,7 @@ protected:
Button *_activeButtons;
Button _activeButtonData[70];
-bool TTTTT;
+ //bool _processingButtons;
uint8 _mouseClick;
bool _preserveEvents;