aboutsummaryrefslogtreecommitdiff
path: root/engines/cine
diff options
context:
space:
mode:
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;