2474 Commits

Author SHA1 Message Date
Matthew Jimenez
757e8343b7 UTLIMA8: Found test case to support the partial in front rule.
The rules that temporarily replaced this rule appear to only work well for x & y flats
2023-10-04 15:36:12 -05:00
Matthew Jimenez
4c1f8dfc59 ULTIMA8: Check x & y flat rules before z flat rules. 2023-10-04 15:36:12 -05:00
Matthew Jimenez
4d1ec7ff2b ULTIMA8: Undo sort item bounds inclusive of right screenspace edge.
This caused too many paint dependency cycles in current code.
2023-10-03 23:09:48 -05:00
Matthew Jimenez
f19a339c84 ULTIMA8: Fix sort item bounds to be inclusive of right and botton screenspace edges.
This fixes a flickering render issue where bounds did not properly check overlaps previously
2023-10-02 18:47:32 -05:00
Matthew Jimenez
478f821b7f ULTIMA8: Improve tolerance check when comparing Z in sort item.
Updated unit test with a better test case & solves a paint dependecy cycle.
2023-10-01 21:30:26 -05:00
Matthew Jimenez
c089416b38 ULTIMA8: Fix paint order of tapestry items to match original game.
Switching to screenspace checks may change order for items we have not tested, but may also be correct now.
2023-10-01 15:00:21 -05:00
Matthew Jimenez
72e2ea8b7d ULTIMA8: Exclude translucent items from also marked as occluding. 2023-10-01 15:00:21 -05:00
Matthew Jimenez
494a05a507 ULTIMA8: Update adjoined occlusion to retain a height based on the minimal height of all included items 2023-10-01 15:00:21 -05:00
Matthew Jimenez
fb9cc2365b ULTIMA8: Add debug message for unexpected paint order.
This is an indication of a paint dependency cycle.
2023-09-30 16:05:21 -05:00
Matthew Jimenez
ad8fee8fde ULTIMA8: Add unit test for sort item overlaps 2023-09-30 15:59:28 -05:00
Matthew Jimenez
b34e683d38 ULTIMA8: Cleanup checks for X & Y flat sort items 2023-09-30 13:45:21 -05:00
Matthew Jimenez
0d0555bd14 ULTIMA8: Add tolerance when comparing Z in sort item.
X & Y flats are often offset below the top of the floor they sit on but by less than the multiplier used when calculating the footpad
2023-09-29 23:02:03 -05:00
Matthew Jimenez
a899156273 ULTIMA8: Move SortItem methods from the header to a cpp file. 2023-09-29 20:47:27 -05:00
Matthew Jimenez
b21876bd9d ULTIMA8: Move sort item calculations to setBoxBounds 2023-09-29 18:11:42 -05:00
Matthew Jimenez
3bd21ab50c ULTIMA8: Add more sort item tests and fixes for flat items 2023-09-29 17:27:23 -05:00
Matthew Jimenez
7882f7d496 ULTIMA8: dump sort item info in box constructor format for easier unit test creation 2023-09-29 17:27:22 -05:00
Matthew Jimenez
88656e757c ULTIMA8: Adjust flat item rules based on more examples at map 37 2023-09-27 21:33:40 -05:00
Matthew Jimenez
cd1fb3d80b ULTIMA8: Enable y-flat sort test with a better test and an exception for non-fixed items 2023-09-27 21:33:40 -05:00
Matthew Jimenez
24c75479d7 ULTIMA8: Revert screenspace calculation changes.
Precision loss from integer division is intention and switch back to calculation prior to 7fe6e2ec
2023-09-27 21:33:40 -05:00
Matthew Jimenez
f6d4a1a42d ULTIMA8: Limit adjoined occlusion squares to 4x4.
This appears sufficient to occlude all items below on smaller roof tiles.
2023-09-26 22:39:13 -05:00
Matthew Jimenez
ab851fad40 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
2023-09-26 22:39:13 -05:00
Matthew Jimenez
4af829d7a4 ULTIMA8: Fix wrong occlusions caused by different heights in the adjoined squares 2023-09-25 21:52:58 -05:00
Matthew Jimenez
989eda8376 ULTIMA8: Add debugger command "GameMapGump::toggleFootpads"
This draws wire frames around objects similar to the "Footpads" cheat menu toggles from the original game
2023-09-25 18:55:31 -05:00
Matthew Jimenez
fc3995f351 ULTIMA8: Disable adjoined squares occlusion again.
Multiple wrong occlusions on map 39 will require more investigation.
2023-09-24 10:25:33 -05:00
Matthew Jimenez
afaa7e38e7 ULTIMA8: Skip occluded items when checking for adjoined floor square 2023-09-23 18:44:35 -05:00
Matthew Jimenez
47ab35a76c ULTIMA8: Disable Y-Flat sort rule as it was not correct at docks.
The X-Flat rule remains but likely needs reconsideration.
2023-09-22 22:54:41 -05:00
Matthew Jimenez
e7a8def252 ULTIMA8: Fix paint order issue for flat objects in center of wall.
Misplaced item was not visible in original game but caused a paint dependency loop by our ruleset.
2023-09-22 16:07:44 -05:00
Matthew Jimenez
e392c655d8 ULTIMA8: Fix bug in previous change 2023-09-21 19:52:59 -05:00
Matthew Jimenez
981b4db813 ULTIMA8: Improve speed of adjoined floor square occlusion and enable for more testing. 2023-09-21 19:30:54 -05:00
Matthew Jimenez
60c758797d ULTIMA8: Disable adjoined floor squares occlusion.
Paint speed decreased when roof tiles are smaller. Expanding the occlusion square improved speed slightly for the smaller tiles.
2023-09-20 22:03:17 -05:00
Matthew Jimenez
5677fcab43 ULTIMA8: Fix roof draws first rule & clarify rule on different test
Additional roof test documents altered behavior from orginal game & leaves opportunity to match orginal in the future if desired
2023-09-20 18:26:02 -05:00
Matthew Jimenez
fea7f124bc ULTIMA8: Fix mistakes in comments 2023-09-20 18:26:02 -05:00
Matthew Jimenez
5ffee1a67c ULTIMA8: Improve occlusion by checking for adjoined floor squares
In debug build this took average paint time from 3.9ms to 3.4ms in Central Tenebrea.
2023-09-19 18:24:36 -05:00
Eugene Sandulenko
31e83c2d8e
ULTIMA: Fix warnings 2023-09-19 15:01:22 +02:00
Matthew Jimenez
a3833a98b9 ULTIMA8: Fix box isEmpty and add extend method.
Extend might be used to improve occlusion in item sorter by switching floor tiles together.
2023-09-18 18:47:21 -05:00
Matthew Jimenez
1eea791ccf ULTIMA8: Make overlap on sort item inclusive on left/right comparison to enforce paint order checks. 2023-09-16 16:07:37 -05:00
Matthew Jimenez
f6acb92dac ULTIMA8: Fix paint order issue for flat objects slightly inside walls.
This might need to be altered to check against center points.
2023-09-16 15:39:14 -05:00
Matthew Jimenez
182e82f7f2 ULTIMA8: Fix paint order issue in catacombs.
Cobweb is a non-solid transparent flat object that should draw after objects it intersects
2023-09-16 11:44:18 -05:00
Matthew Jimenez
20ae3b79f4 ULTIMA8: Clean up fillBlended 2023-09-15 16:57:46 -05:00
Matthew Jimenez
bd32dc0fbe ULTIMA8: Move paint invisible back to a separate loop to improve speed 2023-09-15 16:57:46 -05:00
Matthew Jimenez
147b794287 ULTIMA8: Cleanup of FadedBlit and MarkedBlit 2023-09-14 22:32:28 -05:00
Matthew Jimenez
10312d25cd ULTIMA8: Move logic from pixel blend functions directly to the method using them.
This avoids a few extra pixel format calculations & improves speed for paint invisble.
2023-09-14 17:49:50 -05:00
Matthew Jimenez
31172f1684 ULTIMA8: Merge shape paint blending functions. 2023-09-13 17:37:57 -05:00
Matthew Jimenez
7315a17f3d ULTIMA8: Fix off-by-one x-coordinate on mirrored shape paint 2023-09-12 18:50:33 -05:00
Matthew Jimenez
39b6065875 ULTIMA8 - Merge PaintMirrored with other shape paint methods 2023-09-12 18:50:32 -05:00
Matthew Jimenez
b579d383eb ULTIMA8: Move createNativePalette from render surface to palette manager. 2023-09-08 19:26:03 -05:00
Matthew Jimenez
36f2a6fdf0 ULTIMA8: Add frameRect32 to replace less efficient gump border drawing 2023-09-08 18:30:26 -05:00
Matthew Jimenez
77c16212c8 ULTIMA8: Remove render surface fillAlpha method.
This was only used for composited painting of text which is not enabled and has no effect on 16bpp surfaces.
2023-09-08 18:30:26 -05:00
Matthew Jimenez
42a88e23d8 ULTIMA8: Use TEX32_PACK_RGBA in remaining places colors are hard-coded 2023-09-08 18:30:26 -05:00
Matthew Jimenez
600403e7a2 ULTIMA8: Use TEX32_PACK_RGBA macro when calling fillBlended 2023-09-08 18:30:26 -05:00