[Scummvm-git-logs] scummvm master -> 480c02a26aad14270a4acd50a7417f84a38b670c

mduggan noreply at scummvm.org
Tue Jun 2 10:35:49 UTC 2026


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

Summary:
480c02a26a ACCESS: Add keyboard support for commands


Commit: 480c02a26aad14270a4acd50a7417f84a38b670c
    https://github.com/scummvm/scummvm/commit/480c02a26aad14270a4acd50a7417f84a38b670c
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2026-06-02T20:35:33+10:00

Commit Message:
ACCESS: Add keyboard support for commands

Avoid having to go through the menu.  Also fixes the menu usage and mouse
cursor slightly.

Changed paths:
    engines/access/noctropolis/noctropolis_inventory.cpp
    engines/access/noctropolis/noctropolis_room.cpp
    engines/access/polygon.cpp


diff --git a/engines/access/noctropolis/noctropolis_inventory.cpp b/engines/access/noctropolis/noctropolis_inventory.cpp
index e4af7990a6f..98b780cafc6 100644
--- a/engines/access/noctropolis/noctropolis_inventory.cpp
+++ b/engines/access/noctropolis/noctropolis_inventory.cpp
@@ -49,6 +49,8 @@ int NoctropolisInventory::displayInv() {
 
 	setUseItem(-1);
 
+	_vm->_events->setCursor(CURSOR_ARROW);
+
 	if (!_keepInventoryPosition) {
 		int16 warpMouseX, warpMouseY;
 		_inventoryBase.x = _vm->_events->clipMouseCenter(_vm->_events->_mousePos.x, 252, 640, warpMouseX);
@@ -84,6 +86,10 @@ int NoctropolisInventory::displayInv() {
 		int x = _vm->_events->_mousePos.x - _inventoryBase.x - 23;
 		int y = _vm->_events->_mousePos.y - _inventoryBase.y - 26;
 
+		Common::CustomEventType action;
+		if (_vm->_events->getAction(action) && action == kActionSkip)
+			break;
+
 		if (prevTopItemIndex != _topItemIndex) {
 
 			int slotIndex = 0, slotCount = 20, skipIndex = 0;
diff --git a/engines/access/noctropolis/noctropolis_room.cpp b/engines/access/noctropolis/noctropolis_room.cpp
index eecec716f0f..e75a26b183c 100644
--- a/engines/access/noctropolis/noctropolis_room.cpp
+++ b/engines/access/noctropolis/noctropolis_room.cpp
@@ -201,12 +201,20 @@ void NoctropolisRoom::doCommands() {
 	if (_vm->_events->_interfaceOff) {
 		_vm->_events->setNormalCursor(CURSOR_DARK_ANKH);
 	} else {
+		Common::CustomEventType action;
 		if (_vm->_events->_rightButton) {
 			_vm->_events->debounceRight();
 			roomMenu();
+		} else if (_vm->_events->getAction(action)) {
+			const AccessActionCode *actionCodes = _vm->getActionCodes();
+			for (int i = 0; actionCodes[i]._action != kActionNone; ++i) {
+				if (actionCodes[i]._action == action) {
+					handleCommand(actionCodes[i]._code);
+					break;
+				}
+			}
 		}
 
-		// TODO: Check keyboard commands
 		Common::Point pt = _vm->_events->calcRawMouse();
 		int hotspotIndex = -1;
 
@@ -357,6 +365,7 @@ int NoctropolisRoom::validateBox(int boxId) {
 
 
 void NoctropolisRoom::roomMenu() {
+	_vm->_events->setCursor(CURSOR_ARROW);
 	// Move the mouse to the centre of the menu
 	// see NoctRoomMenu::setPositionFromMouse.
 	Common::Point mousePt = _vm->_events->getMousePos();
diff --git a/engines/access/polygon.cpp b/engines/access/polygon.cpp
index 2884537206e..6b99f374a71 100644
--- a/engines/access/polygon.cpp
+++ b/engines/access/polygon.cpp
@@ -30,7 +30,8 @@ bool pointInside(const Common::Point * const points, int16 x, int16 y) {
 	uint j = 0;
 	while (points[j] != LISTEND)
 		j++;
-	for (uint k = 0; points[k].x >= 0 && points[k].y >= 0; k++) {
+	j--;
+	for (uint k = 0; points[k] != LISTEND; k++) {
 		if ((points[k].y <= y && y < points[j].y) ||
 			(points[j].y <= y && y < points[k].y)) {
 			if (x < (points[j].x - points[k].x) * (y - points[k].y) /




More information about the Scummvm-git-logs mailing list