[Scummvm-git-logs] scummvm master -> 1e7bad99a9d132500c7ec9eedc78a9ebf64e4f8f

OMGPizzaGuy noreply at scummvm.org
Wed Sep 27 03:39:31 UTC 2023


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

Summary:
e3ac8447d1 ULTIMA8: Fix incorrect assignment in sort item test
ab851fad40 ULTIMA8: Avoid logging of paint dependency cycles when limiting the item sorter.
f6d4a1a42d ULTIMA8: Limit adjoined occlusion squares to 4x4.
1e7bad99a9 ULTIMA8: Add sort item test for inconsistent sceenspace position.


Commit: e3ac8447d1124eec9f7a2afb0d57f6bb493f89a2
    https://github.com/scummvm/scummvm/commit/e3ac8447d1124eec9f7a2afb0d57f6bb493f89a2
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2023-09-26T22:39:13-05:00

Commit Message:
ULTIMA8: Fix incorrect assignment in sort item test

Changed paths:
    test/engines/ultima/ultima8/world/sort_item.h


diff --git a/test/engines/ultima/ultima8/world/sort_item.h b/test/engines/ultima/ultima8/world/sort_item.h
index 120ba39a558..916c033964c 100644
--- a/test/engines/ultima/ultima8/world/sort_item.h
+++ b/test/engines/ultima/ultima8/world/sort_item.h
@@ -94,8 +94,8 @@ class U8SortItemTestSuite : public CxxTest::TestSuite {
 
 		Ultima::Ultima8::Box b1(34142, 41150, 0, 256, 64, 8);
 		si1.setBoxBounds(b1, 0, 0);
-		si2._solid = true;
-		si2._land = true;
+		si1._solid = true;
+		si1._land = true;
 
 		Ultima::Ultima8::Box b2(34110, 41118, 0, 64, 64, 0);
 		si2.setBoxBounds(b2, 0, 0);


Commit: ab851fad40a3d885fd428c3e6db7ddac1d870247
    https://github.com/scummvm/scummvm/commit/ab851fad40a3d885fd428c3e6db7ddac1d870247
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2023-09-26T22:39:13-05:00

Commit Message:
ULTIMA8: Avoid logging of paint dependency cycles when limiting the item sorter.
This make logs a little easier read when attempting to debug sort item issues

Changed paths:
    engines/ultima/ultima8/world/item_sorter.cpp


diff --git a/engines/ultima/ultima8/world/item_sorter.cpp b/engines/ultima/ultima8/world/item_sorter.cpp
index 0cb6de2ee2b..ca282e3af4d 100644
--- a/engines/ultima/ultima8/world/item_sorter.cpp
+++ b/engines/ultima/ultima8/world/item_sorter.cpp
@@ -411,8 +411,10 @@ bool ItemSorter::PaintSortItem(RenderSurface *surf, SortItem *si, bool showFootp
 	SortItem::DependsList::iterator end = si->_depends.end();
 	while (it != end) {
 		if ((*it)->_order == -2) {
-			debugC(kDebugObject, "Cycle in paint dependency graph %d -> %d -> ... -> %d",
-					si->_shapeNum, (*it)->_shapeNum, si->_shapeNum);
+			if (!_sortLimit) {
+				debugC(kDebugObject, "Cycle in paint dependency graph %d -> %d -> ... -> %d",
+					   si->_shapeNum, (*it)->_shapeNum, si->_shapeNum);
+			}
 			break;
 		}
 		else if ((*it)->_order == -1) {


Commit: f6d4a1a42d65e9a2ef705ab37e501a220f327364
    https://github.com/scummvm/scummvm/commit/f6d4a1a42d65e9a2ef705ab37e501a220f327364
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2023-09-26T22:39:13-05:00

Commit Message:
ULTIMA8: Limit adjoined occlusion squares to 4x4.
This appears sufficient to occlude all items below on smaller roof tiles.

Changed paths:
    engines/ultima/ultima8/world/item_sorter.cpp


diff --git a/engines/ultima/ultima8/world/item_sorter.cpp b/engines/ultima/ultima8/world/item_sorter.cpp
index ca282e3af4d..605e92a89ec 100644
--- a/engines/ultima/ultima8/world/item_sorter.cpp
+++ b/engines/ultima/ultima8/world/item_sorter.cpp
@@ -305,8 +305,8 @@ void ItemSorter::PaintDisplayList(RenderSurface *surf, bool item_highlight, bool
 			int32 group = si1->_itemNum;
 			si1->_groupNum = group;
 
-			// Expand NxN adjoined square
-			for (int n = 2; n < 6; n++) {
+			// Expand NxN adjoined square - up to 4x4 appears sufficient
+			for (int n = 2; n <= 4; n++) {
 				// Expand out 1 from X and Y edge points
 				SortItem *p1 = siX->_xAdjoin;
 				SortItem *p2 = siY->_yAdjoin;


Commit: 1e7bad99a9d132500c7ec9eedc78a9ebf64e4f8f
    https://github.com/scummvm/scummvm/commit/1e7bad99a9d132500c7ec9eedc78a9ebf64e4f8f
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2023-09-26T22:39:14-05:00

Commit Message:
ULTIMA8: Add sort item test for inconsistent sceenspace position.
The original game may have been more lossy when translating worldspace position to screenspace.

Changed paths:
    test/engines/ultima/ultima8/world/sort_item.h


diff --git a/test/engines/ultima/ultima8/world/sort_item.h b/test/engines/ultima/ultima8/world/sort_item.h
index 916c033964c..f5c2456ad71 100644
--- a/test/engines/ultima/ultima8/world/sort_item.h
+++ b/test/engines/ultima/ultima8/world/sort_item.h
@@ -12,6 +12,36 @@ class U8SortItemTestSuite : public CxxTest::TestSuite {
 	U8SortItemTestSuite() {
 	}
 
+	/**
+	 * Floor tile placed in position not consistent with others nearby
+	 * Test case for rendering issue at MainActor::teleport 37 18168 17656 104
+	 *
+	 * !TODO: One of the Y values will need to change by one to properly align.
+	 * The original game may have been more lossy when translating worldspace position to screenspace.
+	 */
+	void test_screenspace_position() {
+		Ultima::Ultima8::SortItem si1;
+
+		si1._flat = true;
+		si1._solid = true;
+		si1._occl = true;
+		si1._fbigsq = true;
+		si1._roof = true;
+		si1._land = true;
+
+		// Normal placement
+		Ultima::Ultima8::Box b1(18047, 17663, 104, 128, 128, 104);
+		si1.setBoxBounds(b1, 0, 0);
+		TS_ASSERT(si1._sxBot == 96);
+		TS_ASSERT(si1._syBot == 4359);
+
+		// Inconsistent placement
+		Ultima::Ultima8::Box b2(18168, 17656, 104, 128, 128, 104);
+		si1.setBoxBounds(b2, 0, 0);
+		TS_ASSERT(si1._sxBot == 128);
+		TS_ASSERT(si1._syBot == 4374);
+	}
+
 	/* Non-overlapping with lower Y position should always be below */
 	void test_basic_y_sort() {
 		Ultima::Ultima8::SortItem si1;




More information about the Scummvm-git-logs mailing list