[Scummvm-git-logs] scummvm master -> 505c26f3352f47ce67a84f30c9090dc1a32030dd

somaen noreply at scummvm.org
Fri May 6 18:25:31 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
505c26f335 TINSEL: Add keymapping for F2/F3 for inventory/notebook (NOIR) (WIP)


Commit: 505c26f3352f47ce67a84f30c9090dc1a32030dd
    https://github.com/scummvm/scummvm/commit/505c26f3352f47ce67a84f30c9090dc1a32030dd
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2022-05-06T20:25:15+02:00

Commit Message:
TINSEL: Add keymapping for F2/F3 for inventory/notebook (NOIR) (WIP)

Changed paths:
    engines/tinsel/events.cpp
    engines/tinsel/events.h
    engines/tinsel/tinsel.cpp


diff --git a/engines/tinsel/events.cpp b/engines/tinsel/events.cpp
index 51315f41e99..cbc51fa6fa9 100644
--- a/engines/tinsel/events.cpp
+++ b/engines/tinsel/events.cpp
@@ -42,6 +42,7 @@
 #include "tinsel/tinlib.h"	// For control()
 #include "tinsel/tinsel.h"
 #include "tinsel/token.h"
+#include "tinsel/noir/notebook.h"
 
 namespace Tinsel {
 
@@ -448,6 +449,18 @@ void PlayerEvent(PLR_EVENT pEvent, const Common::Point &coOrds) {
 		_vm->_dialogs->OpenMenu(MAIN_MENU);
 		break;
 
+	case PLR_INVENTORY:
+		if (TinselVersion == 3) {
+			_vm->_dialogs->PopUpInventory(INV_1);
+		}
+		break;
+
+	case PLR_NOTEBOOK:
+		if (TinselVersion == 3) {
+			_vm->_notebook->Show(false);
+		}
+		break;
+
 	case PLR_JUMP:
 		_vm->_dialogs->OpenMenu(HOPPER_MENU1);
 		break;
diff --git a/engines/tinsel/events.h b/engines/tinsel/events.h
index 9379439f07e..0fa888591e5 100644
--- a/engines/tinsel/events.h
+++ b/engines/tinsel/events.h
@@ -67,6 +67,9 @@ enum PLR_EVENT {
 	PLR_WHEEL_UP = 19,
 	PLR_WHEEL_DOWN = 20,
 
+	PLR_INVENTORY = 21,
+	PLR_NOTEBOOK = 22,
+
 	// Aliases used for DW1 actions
 	PLR_SLEFT = PLR_WALKTO,
 	PLR_DLEFT = PLR_ACTION,
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 501d8531ddc..0fd70a370d3 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -228,6 +228,12 @@ void KeyboardProcess(CORO_PARAM, const void *) {
 			// Options dialog
 			ProcessKeyEvent(PLR_MENU);
 			continue;
+		case Common::KEYCODE_F2:
+			ProcessKeyEvent(PLR_INVENTORY);
+			continue;
+		case Common::KEYCODE_F3:
+			ProcessKeyEvent(PLR_NOTEBOOK);
+			continue;
 		case Common::KEYCODE_5:
 		case Common::KEYCODE_F5:
 			// Save game




More information about the Scummvm-git-logs mailing list