aboutsummaryrefslogtreecommitdiff
path: root/engines/cine
diff options
context:
space:
mode:
authorEugene Sandulenko2006-04-11 23:31:03 +0000
committerEugene Sandulenko2006-04-11 23:31:03 +0000
commit83d75e119ff48f0c26fc6a14098444c6b86d4725 (patch)
treed0cb292730e733b3e465ef132c0aff02fe52c5df /engines/cine
parent24b2f65f91eacb442cd2a13ecec3e7916655a82e (diff)
downloadscummvm-rg350-83d75e119ff48f0c26fc6a14098444c6b86d4725.tar.gz
scummvm-rg350-83d75e119ff48f0c26fc6a14098444c6b86d4725.tar.bz2
scummvm-rg350-83d75e119ff48f0c26fc6a14098444c6b86d4725.zip
Add F1-F10 keymappings like in original engine.
svn-id: r21815
Diffstat (limited to 'engines/cine')
-rw-r--r--engines/cine/main_loop.cpp53
-rw-r--r--engines/cine/various.cpp31
-rw-r--r--engines/cine/various.h3
3 files changed, 76 insertions, 11 deletions
diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp
index 0b134ea1a1..d0fbc5106f 100644
--- a/engines/cine/main_loop.cpp
+++ b/engines/cine/main_loop.cpp
@@ -59,6 +59,59 @@ void manageEvents(int count) {
case OSystem::EVENT_QUIT:
g_system->quit();
break;
+ case OSystem::EVENT_KEYDOWN:
+ switch (event.kbd.keycode) {
+ case 282: // F1
+ if (allowPlayerInput) {
+ playerCommand = 0; // EXAMINE
+ makeCommandLine();
+ }
+ break;
+ case 283: // F2
+ if (allowPlayerInput) {
+ playerCommand = 1; // TAKE
+ makeCommandLine();
+ }
+ break;
+ case 284: // F3
+ if (allowPlayerInput) {
+ playerCommand = 2; // INVENTORY
+ makeCommandLine();
+ }
+ break;
+ case 285: // F4
+ if (allowPlayerInput) {
+ playerCommand = 3; // USE
+ makeCommandLine();
+ }
+ break;
+ case 286: // F5
+ if (allowPlayerInput) {
+ playerCommand = 4; // ACTIVATE
+ makeCommandLine();
+ }
+ break;
+ case 287: // F6
+ if (allowPlayerInput) {
+ playerCommand = 5; // SPEAK
+ makeCommandLine();
+ }
+ break;
+ case 290: // F9
+ if (allowPlayerInput) {
+ makeActionMenu();
+ makeCommandLine();
+ }
+ break;
+ case 291: // F10
+ if (allowPlayerInput) {
+ makeSystemMenu();
+ }
+ break;
+ default:
+ break;
+ }
+ break;
default:
break;
}
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index 11252a88c6..51247778e8 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -1797,6 +1797,25 @@ void drawMenuBox(char *command, int16 x, int16 y) {
gfxFuncGen2();
}
+void makeActionMenu(void) {
+ uint16 mouseButton;
+ uint16 mouseX;
+ uint16 mouseY;
+
+ getMouseData(mouseUpdateStatus, &mouseButton, &mouseX, &mouseY);
+
+ if (gameType == Cine::GID_OS) {
+ playerCommand = makeMenuChoice2(defaultActionCommand, 6, mouseX, mouseY, 70);
+
+ if (playerCommand >= 8000) {
+ playerCommand -= 8000;
+ canUseOnObject = 1;
+ }
+ } else {
+ playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70);
+ }
+}
+
uint16 executePlayerInput(void) {
uint16 var_5E;
uint16 var_2;
@@ -1896,17 +1915,7 @@ uint16 executePlayerInput(void) {
makeSystemMenu();
}
- if (gameType == Cine::GID_OS) {
- playerCommand = makeMenuChoice2(defaultActionCommand, 6, mouseX, mouseY, 70);
-
- if (playerCommand >= 8000) {
- playerCommand -= 8000;
- canUseOnObject = 1;
- }
- } else {
- playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70);
- }
-
+ makeActionMenu();
makeCommandLine();
} else {
int16 objIdx;
diff --git a/engines/cine/various.h b/engines/cine/various.h
index 079b458ec9..a7d20b8397 100644
--- a/engines/cine/various.h
+++ b/engines/cine/various.h
@@ -40,6 +40,9 @@ void initLanguage(Common::Language lang);
int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width);
int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width);
+void makeCommandLine(void);
+void makeSystemMenu(void);
+void makeActionMenu(void);
extern int16 allowSystemMenu;