Commit Graph
61 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 ad8fee8fde ULTIMA8: Add unit test for sort item overlaps 2023-09-30 15:59:28 -05:00
Matthew Jimenez 8ad443bfb7 ULTIMA8: Update sort item tests to use multiples of footpad calculations. 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 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 fa491cb998 ULTIMA8: Update sort item test to use actual position instead of reduced values. 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 1e7bad99a9 ULTIMA8: Add sort item test for inconsistent sceenspace position.
The original game may have been more lossy when translating worldspace position to screenspace.
2023-09-26 22:39:14 -05:00
Matthew Jimenez e3ac8447d1 ULTIMA8: Fix incorrect assignment in sort item test 2023-09-26 22:39:13 -05:00
Matthew Jimenez 888f1c6154 ULTIMA8: Fix tests for sort item to use bounds that properly overlap 2023-09-22 23:57:36 -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 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 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 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 1c159c0c59 ULTIMA8: Change sort item constructor to not include next pointer 2023-02-14 18:25:45 -06:00
Matthew Jimenez 5ce54293a8 ULTIMA8: Add test case for rendering issue where transparent rule should not apply 2023-02-07 18:11:38 -06:00
Matthew Jimenez 4ff10c5256 ULTIMA8: Add test case for inventory item sort rule 2023-01-28 18:06:07 -06:00
Matthew Jimenez 65b725c12a ULTIMA8: Add sprite rule to sort item listLessThan to fix rendering bug 2023-01-28 08:08:13 -06:00
Matthew Jimenez 3cafae9398 ULTIMA8: Fix sort item hidden easter egg item and test 2023-01-27 17:55:23 -06:00
Matthew Jimenez f1d6ad795a ULTIMA8: Use shape frame screen rect in sort item occludes and overlaps checks in addition to world box. Fixes #14039 2023-01-26 18:53:01 -06:00
Matthew Jimenez 5935499ff1 ULTIMA8: update all sort item tests to set box bounds 2023-01-26 18:53:01 -06:00
Matthew Jimenez 62b4aec959 ULTIMA8: Use box struct to set bounds of sort items 2023-01-26 18:53:01 -06:00
Matthew Jimenez 71bf75783d ULTIMA8: Replace sort item screenspace coords with rect 2023-01-26 18:53:01 -06:00
Matthew Jimenez 6e3a288d93 ULTIMA8: Add contains point method for sort items 2023-01-26 18:53:01 -06:00
Matthew Jimenez eb5a079fd3 ULTIMA8: Fix item sorter dependency graph cycle and add test 2023-01-24 22:59:25 -06:00
Matthew Jimenez e813af901f ULTIMA8: Remove x & y flat checks that introduced bugs 2023-01-24 21:18:23 -06:00
Matthew Jimenez edd82bb8e8 ULTIMA8: Additional item sort rules and test.
This also fixes #14035
2023-01-22 11:42:04 -06:00
Matthew Jimenez 2e11704ed9 ULTIMA8: Update box struct better match rect methods 2023-01-18 21:54:41 -06:00
Matthew Jimenez 00583aa7f5 ULTIMA8: Add basic test for sort item occludes 2023-01-17 23:19:09 -06:00
Matthew Jimenez 5d13b0831b ULTIMA8: Add item sort rules for land and roof.
This fixes Pentagram bug #276.
2023-01-13 18:57:58 -06:00
Matthew Duggan 2345a0d3a6 ULTIMA8: Add error checking for treasure loader
This might help with bug #12182 where the comment suggests there is a problem
with loading the treasure data.  To make sure it loads properly, added a lot
more error checking and error messages, and created unit tests for the same.
2022-03-25 16:44:59 +09:00
Matthew Duggan b01f927bc3 ULTIMA8: Remove unused ArgvToString function. 2021-11-22 22:29:52 +09:00
Matthew Duggan 372e08635f TESTS: Fix build after type change in ULTIMA engine 2021-11-22 21:45:05 +09:00
Matthew Duggan f185e41956 ULTIMA8: Item sorter improvements for large flat objects
Large flat squares should get sorted below other flat things.  In U8, the
definition of large is 128x128, but in Crusader they can also be larger than
that.

This fixes the paint order of hazard tape stripes in Crusader. It may also
improve paint order for Ultima 8 which has some big flat squares larger than
128x128 too (eg, shape 165 or 318 which are 256x256).

Also added tests for flat object sorting.
2021-07-24 13:48:09 +09:00
Matthew Duggan 191e7c8180 ULTIMA8: Add simple unit tests for item sorting 2021-07-07 19:34:05 +09:00
Matthew Jimenez c1b91890e5 ULTIMA8: Replace IDataSource and ODataSource with utility functions for common streams 2021-02-23 19:22:02 -06:00
Matthew Jimenez 7e8c5d46c0 ULTIMA8: Remove U8ODataSourceTestSuite 2021-02-21 16:11:23 -06:00
Matthew Duggan c308fdcb59 TEST: Touch test file to force rebuild 2021-01-04 10:45:36 +09:00
Matthew Duggan 28bb304812 ULTIMA8: Graphics refactor, use more common code
Try to use more of the built-in ScummVM rendering pipeline and remove redundant
types where possible.  Unfortunately this is a bit of a mega-commit because all
the pieces were tied together, but the main changes are:

* Remove the Texture types, as they add little over ManagedSurface
* Remove the ScalerGump as we no longer use it - we should be using the
  built-in ScummVM scalers
* Remove the Scaler types - the only remaining user after removing ScalerGump
  was in hte AVI player.  There we manually add the Crusader style interlaced
  scaling, which was an outstanding TODO anyway.
* Remove now-unused functions from the RenderSurface family
* Remove the "default" mouse cursor as we never use it in ScummVM
* Remove the memset_n header which duplicates Common::Fill functions (fixes
  #11969)
* Remove the fixed-width bitmap fonts which were used for the Pentagram
  console.

I've tested the following things that this had the potential to break:

* U8 game, credits, movies, minimap, and ttf rendering
* Crusader game and movies
* Debug tools (shape viewer, touch-highlight)
2021-01-04 09:08:20 +09:00
Matthew Duggan a70153fdd0 ULTIMA8: Add smooth Crusader turning. 2021-01-01 15:07:37 +09:00
Matthew Duggan 4f7881fe8a TEST: Add direction util tests for U8 2020-12-27 16:44:44 +09:00