Commit Graph

26 Commits

Author SHA1 Message Date
Christoph Oelckers 6dcd7e2557 - do not crash on badly defined walls where the end point is missing. 2021-09-12 18:18:26 +02:00
Christoph Oelckers 5d3f7947bf - avoid calling the node builder to triangulate degenerate sectors.
This tends to crash.
2021-08-14 09:48:05 +02:00
Christoph Oelckers 62a5a720e8 - Check for maps with bad setup of their wall lists.
Lo Wang In Time's map 11 does not include wall 0 into its sector, which caused crashes when trying to triangulate this sector.
2021-07-06 10:29:24 +02:00
Christoph Oelckers 15635ec7c8 - fixed crash when trying to triangulate broken sectors.
In these cases it is possible that the wall index may go below 0.
2021-06-11 23:18:46 +02:00
Christoph Oelckers 2b8a80c6ce - added the out-of-bounds vertex handler to the secondary triangulator as well.
If SW does this, triangulation must not be attempted as it will inevitably fail.
2021-05-29 13:19:44 +02:00
Christoph Oelckers 0b181c67b9 - don't skip lines when an empty one gets deleted. 2021-05-23 17:22:29 +02:00
Christoph Oelckers f212421547 - don't let the triangulator choke on empty sectors. 2021-05-23 17:19:01 +02:00
Christoph Oelckers 572f45ca53 - delete lines in proper order when eliminating a pair.
Deleting the lower one first will delete the wrong second one.
2021-05-23 16:36:06 +02:00
Christoph Oelckers cc1def8d77 - fixed: When the node builder is used for triangulation, all zero-length lines must be eliminated first.
These can cause triangulation errors.
2021-05-23 09:16:30 +02:00
Christoph Oelckers 234f303348 - fixed typo in line segment culler. 2021-05-21 18:40:34 +02:00
Christoph Oelckers 716b8840af - when using the node builder to triangulate sectors we must delete overlapping walls.
The node builder can create bad geometry from them because it does bad ordering when two lines facing in opposite directions overlap.
2021-05-21 14:32:01 +02:00
Christoph Oelckers d097c8e635 - removed the non-functional and long abandoned level music alias feature.
With RMAPINFO such a hack is no longer needed for anything.
2021-05-12 21:48:40 +02:00
Christoph Oelckers 30b1b046e4 - added an intermediate data structure to decouple the rendering from the immediate map data.
This will be needed for sectors consisting of disjoint parts and for providing some help with addressing rendering anomalies
2021-05-03 00:04:36 +02:00
Christoph Oelckers 82bcd90755 - fixed some remaining triangulation issues. 2021-04-03 15:10:06 +02:00
Christoph Oelckers f7dd0ec4a2 - use ZDoom's node builder for triangulating sectors that fail the simple approach.
As it turned out, the triangulator only works fine for regular polygons, but creates incomplete meshes for sectors with multiple sections or some degenerate areas, which are quite common with swinging doors.
The node builder is more costly and creates wall splits, of course, but it does not create broken output for degenerate sectors so it's a good fallback.
2021-04-03 12:44:30 +02:00
Christoph Oelckers dc234ea72d - implemented RR's geometry effect.
The grossest of all gross render hack that were ever done with Build...
2021-04-02 22:52:46 +02:00
Christoph Oelckers 3c4429f2a8 - fixed sector mesh generator to allow sectors with non-continuous wall loops.
Blood has a few such sectors.
2021-03-31 21:26:57 +02:00
Christoph Oelckers 4cc0afe587 - fixed texture coordinate generation for sloped planes.
Since these depend on the slope, the sector's ceiling and floorz need to be the same as for the mesh when creating them.
2021-03-31 20:20:19 +02:00
Christoph Oelckers 15fb89d08f - workaround for SO interpolation potentially writing bad values to wall positions.
That messed up interpolation code really needs to be thrown away and replaced later, for now this has to suffice.
2021-03-30 21:30:12 +02:00
Christoph Oelckers a4174352c7 - keep separate sector compare data for floor and ceiling.
Otherwise there can be problems if floor and ceiling change at the same time.
2021-03-30 20:43:52 +02:00
Christoph Oelckers 9cccd6f89b - store plane meshes without height information.
This avoids retriangulation when just the plane's z changes.
2021-03-30 20:30:35 +02:00
Christoph Oelckers d2a1f9ea88 - fixed issue with constantly regenerating sector ceiling triangle meshes. 2021-03-29 20:29:09 +02:00
Christoph Oelckers b93502f0d0 - fixed bad assignments for vertex compare data in sector triangulator. 2021-03-29 10:15:06 +02:00
Christoph Oelckers e0fe8d2ed9 - fixed interpolation issues with sector objects in SW.
SO's vertex interpolation does not use the common framework so it got missed by the sector retriangulation checks.
We need to check two wall positions as well to make sure that sector movement is properly detected.
2021-03-29 09:25:26 +02:00
Christoph Oelckers d9ff2fd1e2 - used display size for all texture positioning. 2021-03-28 18:22:30 +02:00
Christoph Oelckers 88706e8e13 - added a cache for the sector geometry.
Now it only needs recreation if the sector changes.
2021-03-19 23:18:09 +01:00