[Scummvm-git-logs] scummvm master -> 9b4905229983bf64508bafbd4d830bbe39875d02

dreammaster noreply at scummvm.org
Sun Jan 4 09:49:09 UTC 2026


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

Summary:
9be8530cdf ULTIMA: ULTIMA0: Workaround to prevent incompletable random dungeons
9b49052299 ULTIMA: ULTIMA0: Add missing Pass/Wait action


Commit: 9be8530cdfa4b3de45a60143aabc37d48bc30e56
    https://github.com/scummvm/scummvm/commit/9be8530cdfa4b3de45a60143aabc37d48bc30e56
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-01-04T20:48:35+11:00

Commit Message:
ULTIMA: ULTIMA0: Workaround to prevent incompletable random dungeons

Changed paths:
    engines/ultima/ultima0/data/data.cpp


diff --git a/engines/ultima/ultima0/data/data.cpp b/engines/ultima/ultima0/data/data.cpp
index 7b4b1dd1db4..6c0780d6a88 100644
--- a/engines/ultima/ultima0/data/data.cpp
+++ b/engines/ultima/ultima0/data/data.cpp
@@ -250,6 +250,52 @@ void DungeonMapInfo::create(const PlayerInfo &player) {
 		_map[SIZE - 3][3] = DT_SPACE;	// No other ladder up
 	}
 
+	// WORKAROUND: Make sure dungeon is completable
+	byte mapTrace[DUNGEON_MAP_SIZE][DUNGEON_MAP_SIZE];
+	bool isValid;
+	do {
+		isValid = false;
+
+		// Start a new trace, mark solid spaces
+		for (y = 0; y < DUNGEON_MAP_SIZE; ++y)
+			for (x = 0; x < DUNGEON_MAP_SIZE; ++x)
+				mapTrace[x][y] = _map[x][y] == DT_SOLID ? DT_SOLID : DT_SPACE;
+
+		// Iterate through figuring out route
+		Common::Queue<Common::Point> points;
+		if (player._level % 2 == 0)
+			points.push(Common::Point(SIZE - 3, 3));
+		else
+			points.push(Common::Point(3, SIZE - 3));
+		while (!points.empty() && !isValid) {
+			Common::Point pt = points.pop();
+			isValid = _map[pt.x][pt.y] == DT_LADDERUP;
+			if (isValid)
+				break;
+
+			mapTrace[pt.x][pt.y] = DT_LADDERDN;
+			if (pt.x > 1 && _map[pt.x - 1][pt.y] != DT_SOLID && mapTrace[pt.x - 1][pt.y] == DT_SPACE)
+				points.push(Common::Point(pt.x - 1, pt.y));
+			if (pt.x < SIZE && _map[pt.x + 1][pt.y] != DT_SOLID && mapTrace[pt.x + 1][pt.y] == DT_SPACE)
+				points.push(Common::Point(pt.x + 1, pt.y));
+			if (pt.y > 1 && _map[pt.x][pt.y - 1] != DT_SOLID && mapTrace[pt.x][pt.y - 1] == DT_SPACE)
+				points.push(Common::Point(pt.x, pt.y - 1));
+			if (pt.y < SIZE && _map[pt.x][pt.y + 1] != DT_SOLID && mapTrace[pt.x][pt.y + 1] == DT_SPACE)
+				points.push(Common::Point(pt.x, pt.y + 1));
+		}
+
+		if (!isValid) {
+			// If a path wasn't found, randomly replace a solid square. We'll then
+			// loop to check whether the path can now be completed
+			do {
+				x = g_engine->getRandomNumber(1, SIZE);
+				y = g_engine->getRandomNumber(1, SIZE);
+			} while (_map[x][y] != DT_SOLID);
+
+			_map[x][y] = DT_HIDDENDOOR;
+		}
+	} while (!isValid);
+
 	// Add monsters
 	_monsters.clear();
 	for (i = 1; i <= MAX_MONSTERS; ++i)


Commit: 9b4905229983bf64508bafbd4d830bbe39875d02
    https://github.com/scummvm/scummvm/commit/9b4905229983bf64508bafbd4d830bbe39875d02
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-01-04T20:48:35+11:00

Commit Message:
ULTIMA: ULTIMA0: Add missing Pass/Wait action

Changed paths:
    engines/ultima/ultima0/metaengine.cpp
    engines/ultima/ultima0/metaengine.h
    engines/ultima/ultima0/views/dungeon.cpp
    engines/ultima/ultima0/views/world_map.cpp


diff --git a/engines/ultima/ultima0/metaengine.cpp b/engines/ultima/ultima0/metaengine.cpp
index dc9b8e3017a..c7a20cf662b 100644
--- a/engines/ultima/ultima0/metaengine.cpp
+++ b/engines/ultima/ultima0/metaengine.cpp
@@ -69,6 +69,7 @@ static const KeybindingRecord OVERWORLD_KEYS[] = {
 	{ KEYBIND_ENTER, "ENTER", _s("Enter/Exit"), "e", "JOY_B" },
 	{ KEYBIND_INFO, "INFO", _s("Info"), "z", "JOY_X" },
 	{ KEYBIND_QUIT, "QUIT", _s("Quit"), "q", nullptr },
+	{ KEYBIND_PASS, "PASS", _s("Pass/Wait"), "SPACE", nullptr },
 	{ KEYBIND_MINIMAP, "MINIMAP", _s("Minimap"), "m", nullptr },
 	{ KEYBIND_NONE, nullptr, nullptr, nullptr, nullptr }
 };
@@ -82,6 +83,7 @@ static const KeybindingRecord DUNGEON_KEYS[] = {
 	{ KEYBIND_ENTER, "ENTER", _s("Enter/Exit"), "e", "JOY_B" },
 	{ KEYBIND_INFO, "INFO", _s("Info"), "z", "JOY_X" },
 	{ KEYBIND_QUIT, "QUIT", _s("Quit"), "q", nullptr },
+	{ KEYBIND_PASS, "PASS", _s("Pass/Wait"), "SPACE", nullptr },
 	{ KEYBIND_MINIMAP, "MINIMAP", _s("Minimap"), "m", nullptr },
 	{ KEYBIND_NONE, nullptr, nullptr, nullptr, nullptr }
 };
diff --git a/engines/ultima/ultima0/metaengine.h b/engines/ultima/ultima0/metaengine.h
index 932740c074f..a406f46cc3a 100644
--- a/engines/ultima/ultima0/metaengine.h
+++ b/engines/ultima/ultima0/metaengine.h
@@ -30,7 +30,7 @@ namespace Ultima0 {
 enum KeybindingAction {
 	KEYBIND_UP, KEYBIND_DOWN, KEYBIND_LEFT, KEYBIND_RIGHT,
 	KEYBIND_ESCAPE, KEYBIND_QUIT, KEYBIND_ENTER, KEYBIND_INFO,
-	KEYBIND_ATTACK, KEYBIND_SWING, KEYBIND_THROW,
+	KEYBIND_PASS, KEYBIND_ATTACK, KEYBIND_SWING, KEYBIND_THROW,
 	KEYBIND_AMULET1, KEYBIND_AMULET2, KEYBIND_AMULET3, KEYBIND_AMULET4,
 	KEYBIND_MINIMAP,
 
diff --git a/engines/ultima/ultima0/views/dungeon.cpp b/engines/ultima/ultima0/views/dungeon.cpp
index c7e05a31881..520a8909168 100644
--- a/engines/ultima/ultima0/views/dungeon.cpp
+++ b/engines/ultima/ultima0/views/dungeon.cpp
@@ -129,6 +129,9 @@ bool Dungeon::msgAction(const ActionMessage &msg) {
 	case KEYBIND_ENTER:
 		interact();
 		break;
+	case KEYBIND_PASS:
+		showMessage("");
+		break;
 	case KEYBIND_ATTACK:
 		showMessage(" \x9""Attack!");
 		_status.draw();		// Render the message before we switch views
diff --git a/engines/ultima/ultima0/views/world_map.cpp b/engines/ultima/ultima0/views/world_map.cpp
index 4d9925da51f..36c6179e911 100644
--- a/engines/ultima/ultima0/views/world_map.cpp
+++ b/engines/ultima/ultima0/views/world_map.cpp
@@ -94,6 +94,9 @@ bool WorldMap::msgAction(const ActionMessage &msg) {
 	case KEYBIND_ENTER:
 		enter();
 		break;
+	case KEYBIND_PASS:
+		showMessage("");
+		break;
 	case KEYBIND_QUIT:
 		// "Quit" in the original which merely saves the game. For ScummVM,
 		// we open the GMM, allowing the user to either save or quit




More information about the Scummvm-git-logs mailing list