aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/keyboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi/keyboard.cpp')
-rw-r--r--engines/agi/keyboard.cpp67
1 files changed, 33 insertions, 34 deletions
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index 051ae48470..d93038b493 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -34,32 +34,32 @@ namespace Agi {
// IBM-PC keyboard scancodes
//
const uint8 scancodeTable[26] = {
- 30, // A
- 48, // B
- 46, // C
- 32, // D
- 18, // E
- 33, // F
- 34, // G
- 35, // H
- 23, // I
- 36, // J
- 37, // K
- 38, // L
- 50, // M
- 49, // N
- 24, // O
- 25, // P
- 16, // Q
- 19, // R
- 31, // S
- 20, // T
- 22, // U
- 47, // V
- 17, // W
- 45, // X
- 21, // Y
- 44 // Z
+ 30, // A
+ 48, // B
+ 46, // C
+ 32, // D
+ 18, // E
+ 33, // F
+ 34, // G
+ 35, // H
+ 23, // I
+ 36, // J
+ 37, // K
+ 38, // L
+ 50, // M
+ 49, // N
+ 24, // O
+ 25, // P
+ 16, // Q
+ 19, // R
+ 31, // S
+ 20, // T
+ 22, // U
+ 47, // V
+ 17, // W
+ 45, // X
+ 21, // Y
+ 44 // Z
};
void AgiEngine::processEvents() {
@@ -291,7 +291,7 @@ bool AgiEngine::handleMouseClicks(uint16 &key) {
if (displayLineRect.contains(_mouse.pos)) {
// Mouse is inside first line of the screen
- if (getFlag(VM_FLAG_MENUS_ACCESSIBLE) && _menu->isAvailable()) {
+ if (getFlag(VM_FLAG_MENUS_ACCESSIBLE) && _menu->isAvailable()) {
_menu->delayedExecuteViaMouse();
key = 0; // eat event
return true;
@@ -330,10 +330,10 @@ bool AgiEngine::handleMouseClicks(uint16 &key) {
if (displayRect.contains(_mouse.pos)) {
// user clicked inside the input space
- showPredictiveDialog();
+ showPredictiveDialog();
- key = 0; // eat event
- return true;
+ key = 0; // eat event
+ return true;
}
break;
}
@@ -396,14 +396,13 @@ bool AgiEngine::handleController(uint16 key) {
// Otherwise go on and look for the ESC controller
}
-
// AGI 3.149 games, The Black Cauldron and King's Quest 4 need KEY_ESCAPE to use menus
// Games with the GF_ESCPAUSE flag need KEY_ESCAPE to pause the game
// (key == KEY_ESCAPE && getVersion() != 0x3149 && getGameID() != GID_BC && getGameID() != GID_KQ4 && !(getFeatures() & GF_ESCPAUSE)) )
// return false;
if ((getGameID() == GID_MH1 || getGameID() == GID_MH2) && (key == AGI_KEY_ENTER) &&
- (_game.inputMode == INPUTMODE_NONE)) {
+ (_game.inputMode == INPUTMODE_NONE)) {
key = 0x20; // Set Enter key to Space in Manhunter when there's no text input
}
@@ -456,7 +455,7 @@ bool AgiEngine::handleController(uint16 key) {
if (getGameID() == GID_PQ1 && getVar(VM_VAR_CURRENT_ROOM) == 116) {
// WORKAROUND: Special handling for mouse clicks in the newspaper
// screen of PQ1. Fixes bug #3018770.
- newDirection = 3; // fake a right arrow key (next page)
+ newDirection = 3; // fake a right arrow key (next page)
} else {
// Click-to-walk mouse interface
@@ -586,7 +585,7 @@ bool AgiEngine::isKeypress() {
int AgiEngine::getKeypress() {
int k;
- while (_keyQueueStart == _keyQueueEnd) // block
+ while (_keyQueueStart == _keyQueueEnd) // block
pollTimer();
keyDequeue(k);