[Scummvm-git-logs] scummvm master -> 4d6c8569137cf6e6a3c3b2f499c303c0163bcb11

dreammaster noreply at scummvm.org
Thu Jan 8 10:10:29 UTC 2026


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

Summary:
a623c6e204 ULTIMA: ULTIMA0: Match dungeon wall colors to original
e1e9cd0567 ULTIMA: ULTIMA0: Monsters touching hidden door tiles reveals them
52a182dd6f ULTIMA: ULTIMA0: Added monster console comand
4d6c856913 ULTIMA: ULTIMA0: Fixes to display of monster attacking messages


Commit: a623c6e204999359bbfda2f4337e9f75990d3359
    https://github.com/scummvm/scummvm/commit/a623c6e204999359bbfda2f4337e9f75990d3359
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-01-08T21:10:11+11:00

Commit Message:
ULTIMA: ULTIMA0: Match dungeon wall colors to original

For some reason, the first level uses white walls,
whilst level 2 onwards uses blue

Changed paths:
    engines/ultima/ultima0/data/defines.h


diff --git a/engines/ultima/ultima0/data/defines.h b/engines/ultima/ultima0/data/defines.h
index ea855279e14..cc8b928b2fc 100644
--- a/engines/ultima/ultima0/data/defines.h
+++ b/engines/ultima/ultima0/data/defines.h
@@ -88,7 +88,8 @@ constexpr int DUNGEON_MINIMAP_SIZE = DUNGEON_MAP_SIZE * MINIMAP_TILE_SIZE;
 #define ISDRAWDOOR(x)   ((x) == DT_DOOR)
 #define ISDRAWOPEN(x)	(ISDRAWWALL(x) == 0 && ISDRAWDOOR(x) == 0)
 
-#define	COL_WALL		(C_GREEN)			// Object Colours
+// Object Colours
+#define	COL_WALL		(g_engine->_player._level == 1 ? C_WHITE : C_BLUE)
 #define	COL_LADDER		(C_RED)
 #define COL_DOOR		(C_BLUE)
 #define COL_HOLE		(C_RED)


Commit: e1e9cd056766b646dec818d248c3bcd7247383ea
    https://github.com/scummvm/scummvm/commit/e1e9cd056766b646dec818d248c3bcd7247383ea
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-01-08T21:10:11+11:00

Commit Message:
ULTIMA: ULTIMA0: Monsters touching hidden door tiles reveals them

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


diff --git a/engines/ultima/ultima0/data/monster_logic.cpp b/engines/ultima/ultima0/data/monster_logic.cpp
index 3343e3e5ef6..cbc2829fa8a 100644
--- a/engines/ultima/ultima0/data/monster_logic.cpp
+++ b/engines/ultima/ultima0/data/monster_logic.cpp
@@ -126,7 +126,13 @@ void MonsterLogic::move(MonsterEntry &m, PlayerInfo &p, DungeonMapInfo &d) {
 		return;
 	if (x == p._dungeonPos.x &&			// Can't move onto us
 		y == p._dungeonPos.y) return;
-	m._loc.x = x; m._loc.y = y;			// Move to new position
+
+	// Move to new position
+	m._loc.x = x; m._loc.y = y;
+
+	// If the tile was for a hidden door, flag it as a normal visible door
+	if (d._map[x][y] == DT_HIDDENDOOR)
+		d._map[x][y] = DT_DOOR;
 }
 
 bool MonsterLogic::canMoveTo(DungeonMapInfo &d, int x, int y) {


Commit: 52a182dd6f5600ca859f3cfb07d1c1373835666b
    https://github.com/scummvm/scummvm/commit/52a182dd6f5600ca859f3cfb07d1c1373835666b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-01-08T21:10:12+11:00

Commit Message:
ULTIMA: ULTIMA0: Added monster console comand

Changed paths:
    engines/ultima/ultima0/console.cpp
    engines/ultima/ultima0/console.h
    engines/ultima/ultima0/data/data.cpp
    engines/ultima/ultima0/data/data.h
    engines/ultima/ultima0/views/dungeon.cpp
    engines/ultima/ultima0/views/dungeon.h


diff --git a/engines/ultima/ultima0/console.cpp b/engines/ultima/ultima0/console.cpp
index 1611df3efc5..51ac0e8947b 100644
--- a/engines/ultima/ultima0/console.cpp
+++ b/engines/ultima/ultima0/console.cpp
@@ -32,6 +32,7 @@ Console::Console() : GUI::Debugger() {
 	registerCmd("gold", WRAP_METHOD(Console, cmdGold));
 	registerCmd("demo", WRAP_METHOD(Console, cmdDemo));
 	registerCmd("debug", WRAP_METHOD(Console, cmdDebug));
+	registerCmd("monster", WRAP_METHOD(Console, cmdMonster));
 }
 
 Console::~Console() {
@@ -133,5 +134,36 @@ bool Console::cmdDebug(int argc, const char **argv) {
 	return false;
 }
 
+bool Console::cmdMonster(int argc, const char **argv) {
+	const auto &player = g_engine->_player;
+	auto &dungeon = g_engine->_dungeon;
+
+	if (argc != 2) {
+		debugPrintf("monster <1 to 10>\n");
+		return true;
+	} else if (player._level == 0) {
+		debugPrintf("Not in a dungeon.\n");
+		return true;
+	} else {
+		Common::Point pt = player._dungeonPos + player._dungeonDir;
+
+		if (!ISWALKTHRU(dungeon._map[pt.x][pt.y])) {
+			debugPrintf("No free spot in front of player.\n");
+			return true;
+		} else {
+			int num = atoi(argv[1]);
+
+			if (num >= 1 && num <= 10) {
+				dungeon.addMonsterAtPos(player, pt, num);
+				g_events->send("Dungeon", GameMessage("ENDOFTURN"));
+				return false;
+			} else {
+				debugPrintf("Invalid monster number.\n");
+				return true;
+			}
+		}
+	}
+}
+
 } // namespace Ultima0
 } // namespace Ultima
diff --git a/engines/ultima/ultima0/console.h b/engines/ultima/ultima0/console.h
index cab8cde6e55..327c496c27f 100644
--- a/engines/ultima/ultima0/console.h
+++ b/engines/ultima/ultima0/console.h
@@ -36,6 +36,7 @@ private:
 	bool cmdHP(int argc, const char **argv);
 	bool cmdDemo(int argc, const char **argv);
 	bool cmdDebug(int argc, const char **argv);
+	bool cmdMonster(int argc, const char **argv);
 
 public:
 	Console();
diff --git a/engines/ultima/ultima0/data/data.cpp b/engines/ultima/ultima0/data/data.cpp
index 6c0780d6a88..77071885fc8 100644
--- a/engines/ultima/ultima0/data/data.cpp
+++ b/engines/ultima/ultima0/data/data.cpp
@@ -323,12 +323,6 @@ void DungeonMapInfo::addMonster(const PlayerInfo &player, int type) {
 	if (RND() > 0.6)
 		return;
 
-	// Fill in details
-	MonsterEntry m;
-	m._type = type;
-	m._strength = level + 3 + player._level;
-	m._alive = true;
-
 	// Find a place for it. Must be empty, not player
 	do {
 		x = urand() % DUNGEON_MAP_SIZE;
@@ -336,8 +330,20 @@ void DungeonMapInfo::addMonster(const PlayerInfo &player, int type) {
 	} while (_map[x][y] != DT_SPACE ||
 		(x == player._dungeonPos.x && y == player._dungeonPos.y));
 
+	addMonsterAtPos(player, Common::Point(x, y), type);
+}
+
+void DungeonMapInfo::addMonsterAtPos(const PlayerInfo &player, const Common::Point &pt, int type) {
+	int level = MONSTER_INFO[type]._level;
+
+	// Fill in details
+	MonsterEntry m;
+	m._type = type;
+	m._strength = level + 3 + player._level;
+	m._alive = true;
+
 	// Record position
-	m._loc.x = x; m._loc.y = y;
+	m._loc = pt;
 
 	_monsters.push_back(m);
 }
diff --git a/engines/ultima/ultima0/data/data.h b/engines/ultima/ultima0/data/data.h
index fcc97461963..2412fc74296 100644
--- a/engines/ultima/ultima0/data/data.h
+++ b/engines/ultima/ultima0/data/data.h
@@ -68,7 +68,7 @@ struct MonsterEntry {
  */
 struct DungeonMapInfo {
 private:
-	void addMonster(const PlayerInfo &player, int Type);
+	void addMonster(const PlayerInfo &player, int type);
 	int generateContent(int c);
 
 public:
@@ -82,6 +82,8 @@ public:
 	 * Find Monster ID at given location
 	 */
 	int findMonster(const Common::Point &c) const;
+
+	void addMonsterAtPos(const PlayerInfo &player, const Common::Point &pt, int type);
 };
 
 /**
diff --git a/engines/ultima/ultima0/views/dungeon.cpp b/engines/ultima/ultima0/views/dungeon.cpp
index 65a5ad1f5a1..8405e9f175d 100644
--- a/engines/ultima/ultima0/views/dungeon.cpp
+++ b/engines/ultima/ultima0/views/dungeon.cpp
@@ -279,6 +279,15 @@ void Dungeon::interact() {
 	}
 }
 
+bool Dungeon::msgGame(const GameMessage &msg) {
+	if (msg._name == "ENDOFTURN") {
+		endOfTurn();
+		return true;
+	}
+
+	return false;
+}
+
 void Dungeon::timeout() {
 	const auto &player = g_engine->_player;
 	g_engine->stopMidi();
diff --git a/engines/ultima/ultima0/views/dungeon.h b/engines/ultima/ultima0/views/dungeon.h
index cd494eb9cb9..a1428e9c9e0 100644
--- a/engines/ultima/ultima0/views/dungeon.h
+++ b/engines/ultima/ultima0/views/dungeon.h
@@ -53,6 +53,7 @@ public:
 	void draw() override;
 	bool msgAction(const ActionMessage &msg) override;
 	bool msgKeypress(const KeypressMessage &msg) override;
+	bool msgGame(const GameMessage &msg) override;
 	void timeout() override;
 };
 


Commit: 4d6c8569137cf6e6a3c3b2f499c303c0163bcb11
    https://github.com/scummvm/scummvm/commit/4d6c8569137cf6e6a3c3b2f499c303c0163bcb11
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-01-08T21:10:12+11:00

Commit Message:
ULTIMA: ULTIMA0: Fixes to display of monster attacking messages

Changed paths:
    engines/ultima/ultima0/data/defines.h
    engines/ultima/ultima0/data/monster_logic.cpp
    engines/ultima/ultima0/data/monster_logic.h
    engines/ultima/ultima0/ultima0.cpp


diff --git a/engines/ultima/ultima0/data/defines.h b/engines/ultima/ultima0/data/defines.h
index cc8b928b2fc..0253a84f6ae 100644
--- a/engines/ultima/ultima0/data/defines.h
+++ b/engines/ultima/ultima0/data/defines.h
@@ -62,6 +62,7 @@ constexpr int DUNGEON_MINIMAP_SIZE = DUNGEON_MAP_SIZE * MINIMAP_TILE_SIZE;
 #define C_ROSE      8
 #define C_VIOLET    9
 #define C_GREY      10
+#define C_TOMATO	11
 
 #define C_TEXT_DEFAULT C_CYAN
 
diff --git a/engines/ultima/ultima0/data/monster_logic.cpp b/engines/ultima/ultima0/data/monster_logic.cpp
index cbc2829fa8a..41943f63cd4 100644
--- a/engines/ultima/ultima0/data/monster_logic.cpp
+++ b/engines/ultima/ultima0/data/monster_logic.cpp
@@ -64,27 +64,39 @@ void MonsterLogic::showLines(const Common::String &msg) {
 int MonsterLogic::attack(MonsterEntry &m, PlayerInfo &p) {
 	int n;
 
-	if (m._type == MN_GREMLIN ||		// Special case for Gremlin/Thief
-		m._type == MN_THIEF)
-		if (RND() > 0.5)				// Half the time
-			return steal(m, p);
-
-	Common::String msg = Common::String::format("You are being attacked by a %s !!!.\n",
-		MONSTER_INFO[m._type]._name);
+	Common::String msg = "You are being attacked\nby a ";
+	msg += (char)C_BLUE;
+	msg += MONSTER_INFO[m._type]._name;
+	msg += (char)C_TEXT_DEFAULT;
+	msg += '\n';
+
+	// Special case for Gremlin/Thief stealing
+	if (m._type == MN_GREMLIN || m._type == MN_THIEF)
+		if (RND() > 0.5)
+			// Half the time
+			return steal(msg, m, p);
 
 	n = urand() % 20;					// Calculate hit chance
 	if (p._object[OB_SHIELD] > 0) n--;
 	n = n - p._attr[AT_STAMINA];
 	n = n + m._type + p._level;
+
 	if (n < 0) {
-		// Missed !
-		msg += "Missed !\n";
+		// Missed
+		msg += (char)C_TOMATO;
+		msg += "Missed!";
 	} else {
-		// Hit !
+		// Hit
 		n = urand() % m._type;			// Calculate damage done.
 		n = n + p._level;
 		p._attr[AT_HP] -= n;			// Adjust hit points
-		msg += "Hit !!!\n";
+
+		msg += (char)C_TOMATO;
+		msg += "Hit! ";
+		msg += (char)C_TEXT_DEFAULT;
+		msg += " Damage = ";
+		msg += (char)C_BLUE;
+		msg += Common::String::format("%d", n);
 	}
 
 	showLines(msg);
@@ -146,14 +158,23 @@ bool MonsterLogic::canMoveTo(DungeonMapInfo &d, int x, int y) {
 	return d.findMonster(c) < 0;
 }
 
-int MonsterLogic::steal(MonsterEntry &m, PlayerInfo &p) {
+int MonsterLogic::steal(const Common::String &attackStr, MonsterEntry &m, PlayerInfo &p) {
 	int n;
 	const char *s1, *s2;
 
+	Common::String msg = attackStr;
+	msg += (char)C_GREEN;
+	msg += "A ";
+	msg += MONSTER_INFO[m._type]._name;
+	msg += " stole ";
+
 	if (m._type == MN_GREMLIN) {
 		// HALVES the food.... aargh
 		p._object[OB_FOOD] = floor(p._object[OB_FOOD]) / 2.0;
-		showLines("A Gremlin stole some food.\n");
+		msg += "some ";
+		msg += (char)C_BLUE;
+		msg += "Food";
+		showLines(msg);
 
 	} else if (m._type == MN_THIEF) {
 		// Figure out what stolen
@@ -162,12 +183,17 @@ int MonsterLogic::steal(MonsterEntry &m, PlayerInfo &p) {
 		} while (p._object[n] == 0);
 
 		p._object[n]--;					// Stole one
-		s2 = OBJECT_INFO[n]._name; s1 = "a";
+		s2 = OBJECT_INFO[n]._name;
+		s1 = "a";
 
 		if (strchr("aeiou", tolower(*s2))) s1 = "an";
 		if (n == 0) s1 = "some";
 
-		showLines(Common::String::format("A Thief stole %s %s.\n", s1, s2));
+		msg += s1;
+		msg += ' ';
+		msg += (char)C_BLUE;
+		msg += s2;
+		showLines(msg);
 	}
 
 	return 1;
diff --git a/engines/ultima/ultima0/data/monster_logic.h b/engines/ultima/ultima0/data/monster_logic.h
index 5b7a6f7f8bc..5ec0ccbbb82 100644
--- a/engines/ultima/ultima0/data/monster_logic.h
+++ b/engines/ultima/ultima0/data/monster_logic.h
@@ -52,7 +52,7 @@ private:
 	/**
 	 * Monster Stealing
 	 */
-	static int steal(MonsterEntry &m, PlayerInfo &p);
+	static int steal(const Common::String &attackStr, MonsterEntry &m, PlayerInfo &p);
 
 public:
 	/**
diff --git a/engines/ultima/ultima0/ultima0.cpp b/engines/ultima/ultima0/ultima0.cpp
index 98629917b28..5cffd748dd8 100644
--- a/engines/ultima/ultima0/ultima0.cpp
+++ b/engines/ultima/ultima0/ultima0.cpp
@@ -41,7 +41,7 @@ static const byte PALETTE[][3] = {
 	{ 255, 0, 128 },	// Rose
 	{ 80, 80, 255 },	// Violet
 	{ 180, 180, 180 },	// Grey
-	{ 220, 20, 130 }	// Transparent. Needed?
+	{ 255, 80, 80 }		// Orange
 };
 
 




More information about the Scummvm-git-logs mailing list