Christoph Oelckers
2954603573
- got rid of integer vector math in hw_bunchdrawer.cpp
2022-10-10 17:37:17 +02:00
Mitchell Richters
951734beae
- Eliminate last remaining uses of binangle
and the class itself.
...
* https://www.youtube.com/watch?v=RgKAFK5djSk
2022-10-05 00:36:29 +02:00
Mitchell Richters
4f56138027
- Change all remaining BunchDrawer
properties from binangle
to angle_t
types.
2022-10-05 00:36:25 +02:00
Mitchell Richters
e6fe9b7031
- Change all binangle
members in Clipper
struct to angle_t
.
2022-10-05 00:36:25 +02:00
Mitchell Richters
914930ff9a
- Change BunchDrawer::ang1
, BunchDrawer::ang2
and BunchDrawer::angrange
from binangle
to angle_t
.
2022-10-05 00:36:25 +02:00
Mitchell Richters
e17d24ce0b
- Change FBunch::startangle
and FBunch::endangle
from binangle
to angle_t
.
2022-10-05 00:36:25 +02:00
Mitchell Richters
36d76a71ea
- Change walltype::clipangle
from binangle
to angle_t
.
2022-10-05 00:36:25 +02:00
Christoph Oelckers
f54e4b8a9a
- more int_ang()
2022-10-04 23:56:43 +02:00
Christoph Oelckers
735b9a8fed
- renamed ang to __int_angle
2022-10-04 23:56:42 +02:00
Christoph Oelckers
ad9931081e
-fix some bugs, handle occurences in recently changed code
2022-08-26 19:53:10 +02:00
Christoph Oelckers
4d423004e9
- unlimited the displayable sprites.
...
Now with Polymost gone this can finally be done properly.
2022-08-07 10:25:15 +02:00
Christoph Oelckers
9e6fe2cbaa
- added workaround to render the crane in WT's 'Docks' map correctly.
...
This one violates engine specifications by creating overlapping walls when the crane is rotated.
2022-06-26 09:36:01 +02:00
Christoph Oelckers
a1339f014c
- store indices in sectionsPerSector.
2022-02-20 23:11:04 +01:00
Christoph Oelckers
71943abed0
- changed math utilities to floating point coordinate system.
2022-02-15 22:18:26 +01:00
Christoph Oelckers
a781517780
- renamed PlanesAtPointf to PlanesAtPoint
...
The old PlanesAtPoint is not needed anymore.
2022-02-15 22:18:24 +01:00
Christoph Oelckers
bd95da423a
- use PlanesAtPointf in most places where PlanesAtPoint was used.
2022-02-15 22:18:24 +01:00
Christoph Oelckers
f44736a5b6
-use an access function for reading wall positions so that we have a non-modifiable value wherever this is possible.
2022-02-15 22:18:23 +01:00
Christoph Oelckers
89ef81da55
- renamed walltype::pos as preparation for refactoring.
...
no functional changes here
2022-02-15 22:18:22 +01:00
Christoph Oelckers
686a648aa1
- fixed inverted logic when checking for dragged sectors.
2022-01-29 09:59:29 +01:00
Christoph Oelckers
e2061dbcc6
- fixed bad wall array access when handling a sector that got split up.
2022-01-14 22:56:00 +01:00
Christoph Oelckers
37e7f92182
- made a few changes to the timer calls for renderer profiling.
...
A few items were counted double, other were in the wrong slot.
2022-01-14 00:15:33 +01:00
Christoph Oelckers
8d84bc2599
- disable window clipping entirely in outside areas.
...
This is a first grade performance killer on large maps and doesn't offer much in clipping robustness.
On maps like Clear the Coast or Wpudrichem omitting this check reduces map traversal time by 40%.
2022-01-13 19:46:04 +01:00
Christoph Oelckers
1b162ececc
- do not add two-sided walls outside of the visible range to the clipper
...
This caused a render glitch in Duke E4L2.
2022-01-13 00:04:32 +01:00
Christoph Oelckers
91d51d518b
- this hack is needed because dragging vertices around can randomly create wall intersection.
...
In clear English: Geometry in Build maps is always broken by design. :(
2022-01-09 20:38:07 +01:00
Christoph Oelckers
a0e6ee0e2e
- added a bit more logic to handle overlapping walls.
...
All this is needed to make the back door to the cinema in Duke E1L1 render properly without making the clipper break on complex overlapping sector setups, like some of the ducts in Duke E2L7.
2022-01-09 12:05:36 +01:00
Christoph Oelckers
98258e0bb2
- fix handling in the clipper for a new range that completely covers an existing one.
...
The handling for this was from the first draft of the clipper that made very different assumptions than the final version.
This cannot simply delete the old range - it has to explicitly alter it and recursively insert the outer sub-ranges separately.
2022-01-06 16:34:04 +01:00
Christoph Oelckers
159409d5d2
- allow a bit of tolerance when sorting walls, so that microscopic intersections can be ignored.
2022-01-06 00:43:47 +01:00
Christoph Oelckers
d5daa8ee84
- fixed: The bunch drawer's gotwall array was cleared before resizing.
...
This means that on the first frame of a new map it'd operate on partially uninitialized data.
2022-01-04 17:18:26 +01:00
Christoph Oelckers
e5c9691166
- fixed clipping issue with sloped walls.
...
The window was calculated too narrow for this case, it needs to use the lower point of a floor slope and the upper point of a ceiling slope.
2021-12-30 09:58:09 +01:00
Christoph Oelckers
f602cf3806
- deal with s() in shared code.
...
clip.cpp was left alone, except for the actual call.
2021-12-30 09:57:14 +01:00
Mitchell Richters
cecb8dc48e
- Replace spritetypebase
y
with pos.Y
calls.
2021-12-30 09:57:05 +01:00
Mitchell Richters
33ca55023f
- Replace spritetypebase
x
with pos.X
calls.
2021-12-30 09:57:05 +01:00
Mitchell Richters
09e00a69fe
- Replace walltype
y
with pos.Y
calls and eliminate walltype
pos
union.
2021-12-30 09:57:04 +01:00
Mitchell Richters
51b647da87
- Replace walltype
x
with pos.X
calls.
2021-12-30 09:57:04 +01:00
Mitchell Richters
118ceb18ca
- Capitalise vec2_t
y
variable.
2021-12-30 09:57:02 +01:00
Mitchell Richters
3c9cd926ba
- Capitalise vec2_t
x
variable.
2021-12-30 09:57:02 +01:00
Christoph Oelckers
df0c577cf4
- replaced most of numsectors, too.
2021-12-30 09:56:54 +01:00
Christoph Oelckers
fd741c4d49
- Disable debug output
2021-12-30 09:56:52 +01:00
Christoph Oelckers
756ed1c14b
- removed the workaround to make Lunatic Fringe not glitch.
2021-12-30 09:56:52 +01:00
Christoph Oelckers
c141c89cfd
- fixed the clipper.
...
* must do proper checks for merged ranges when inserting new ones. The checking code assumes that closed ranges are contiguous.
* when discarding parts of overlapping ranges this may not use merged clip values for its checks.
* ranges that have their clip values altered must be released and reinserted to ensure everything is correct.
2021-12-30 09:56:52 +01:00
Christoph Oelckers
f152a4d9b5
- clipper clean up.
...
The horizontal part of the logic should work now.
2021-12-30 09:56:52 +01:00
Christoph Oelckers
213ed28398
- WindowClipper WIP
2021-12-30 09:56:52 +01:00
Christoph Oelckers
dddf48fd3e
- cleaned up and renamed buildtypes.h.
...
Content was reordered so that the file can contain the inlines belonging to the map data types that previously had to be stored elsewhere.
Also moved out of the Build folder because virtually everything in here can be traced to content available in Duke Nukem 3D's and Shadow Warrior's source releases.
2021-12-30 09:53:46 +01:00
Christoph Oelckers
0e6242626c
- removed the viewpoint from the clipper as we don't need this.
...
ClipWindow will go elsewhere, it has no place here.
2021-12-30 09:53:11 +01:00
Christoph Oelckers
4700299fc6
- fixed bad assert.
...
This can indeed be called with both angles being identical and should accept this case.
2021-12-30 09:53:10 +01:00
Christoph Oelckers
7c5080f654
- reimplemented sector splitting.
...
With the new setup this is a lot easier than with the old one.
2021-12-30 09:53:10 +01:00
Christoph Oelckers
fc41a2bd85
- renamed sections2 and sections2PerSector.
...
No more need for a '2'.
2021-12-30 09:53:10 +01:00
Christoph Oelckers
f6d852b5a0
- removed the old section builder
2021-12-30 09:53:09 +01:00
Christoph Oelckers
b0e4b49771
- removed the node builder.
...
With libtess2 working we do not need this anymore.
2021-12-30 09:53:09 +01:00
Christoph Oelckers
7a9596ae81
- use SectionGeometry for 3D rendering.
2021-12-30 09:53:09 +01:00