Mitchell Richters
733b6a7367
- Fix GCC warning warning: ‘vec.TVector2<double>::X’ may be used uninitialized [-Wmaybe-uninitialized]
.
2022-01-01 20:50:58 +11:00
Christoph Oelckers
f679b61a30
- fixed issue with wall sprite angle check.
...
The resulting value had no sign, so 'abs' did not work. It now uses some bit shifting magic to get a proper sign.
2021-12-30 22:56:33 +01:00
Christoph Oelckers
a9b162b8e9
- moved the tsprite flags from cstat2 to clipdist which was already holding other ones.
...
cstat2 should only hold flags for game-side sprites.
2021-12-30 19:00:35 +01:00
Christoph Oelckers
6c381d4392
- removed sector() method from low level sprite type.
2021-12-30 16:58:48 +01:00
Christoph Oelckers
88e4bb9f79
- moved sectno method to DCoreActor.
2021-12-30 16:39:43 +01:00
Christoph Oelckers
eb00fe52db
- more spritetype references eliminated.
2021-12-30 16:11:14 +01:00
Mitchell Richters
9bbb54fe2e
- Replace every line that just contains spaces or tabs with an empty line feed in all files except 3rd party libraries.
2021-12-30 20:30:21 +11:00
Christoph Oelckers
e670cf2786
- re-tabified several files that got mangled by repeated merging
2021-12-30 09:58:47 +01:00
Christoph Oelckers
d46a7abb0e
- better wall sprite handling.
...
When they are directly on a wall, project their coordinates onto the wall to eliminate the imprecisions from Build's ad-hoc setup.
2021-12-30 09:58:46 +01:00
Christoph Oelckers
1a2b9d43f7
- fixed check for wallsprites on walls.
...
This completely ignored the case where a wall was flagged as one-sided which was the main reason with that sneaky sign in E2L1.
The problem is not entirely fixed with this but now it will detect that it's on a wall.
2021-12-30 09:58:46 +01:00
Christoph Oelckers
4f8f85c634
- backend update from GZDoom.
2021-12-30 09:58:46 +01:00
Christoph Oelckers
b1d8f92ded
- added wall edge splitting for gl_seamless.
2021-12-30 09:58:44 +01:00
Christoph Oelckers
f7e7476010
- hooking up the vertex map with the rest of the engine.
2021-12-30 09:58:44 +01:00
Christoph Oelckers
27ae8d627b
- vertex height map creator for precise render mode like in GZDoom.
2021-12-30 09:58:44 +01:00
Christoph Oelckers
059412b75e
- first batch of routing all write access to sectortype::ceilingz and floorz through a function interface.
...
We need this for implementing "precise" rendering to flag vertices as dirty.
2021-12-30 09:58:14 +01:00
Christoph Oelckers
8710e76a2d
- delete voxel models when shutting down
2021-12-30 09:58:10 +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
50bad91f14
- handle edge case in clipper where adding a new window will remove the entire clipper's content before adding the new range.
...
This case would have passed the actual logic but not the asserts.
2021-12-30 09:58:09 +01:00
Christoph Oelckers
04f3268893
- silenced the debug output that was still present in the section creator.
2021-12-30 09:58:08 +01:00
Christoph Oelckers
9e14b168bb
- addressed more shadowed variables in common code.
2021-12-30 09:57:32 +01:00
Christoph Oelckers
ca9d73ffee
- renamed some shadowing variables in common code.
2021-12-30 09:57:32 +01:00
Christoph Oelckers
3992dfae84
- fixed: When merging clip nodes the redundant one needs to be deleted with RemoveRange.
...
Calling Free is not enough.
2021-12-30 09:57:29 +01:00
Christoph Oelckers
b00f197be3
- fixed: RemoveClipRange did not shorten the range if it had to split it up.
2021-12-30 09:57:29 +01:00
Christoph Oelckers
5699488bea
- get rid of spritetype in inactive code. (Search noise removal)
2021-12-30 09:57:20 +01:00
Christoph Oelckers
40a307650d
- the really final parts of the shared code using s() cleaned up.
2021-12-30 09:57:15 +01:00
Christoph Oelckers
09634c4993
- use actors instead of sprites in the new renderer's API.
2021-12-30 09:57:15 +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
Christoph Oelckers
d0143db8fe
- got rid of sx() and sm() inlines.
2021-12-30 09:57:13 +01:00
Mitchell Richters
baf78848eb
- Replace spritetypebase
z
with pos.Z
calls and eliminate spritetypebase
pos
union.
2021-12-30 09:57:06 +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
b2ab64bb62
- Capitalise vec3_t
z
variable.
2021-12-30 09:57:03 +01:00
Mitchell Richters
68e2691be7
- Capitalise vec3_t
y
variable.
2021-12-30 09:57:03 +01:00
Mitchell Richters
c549cc5276
- Capitalise vec3_t
x
variable.
2021-12-30 09:57:02 +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
d9d05e90b5
- globally replaced all occurences of '->s().' with '->spr.'
2021-12-30 09:57:00 +01:00
Christoph Oelckers
beddf1e1ca
- add slope sprite support to the new renderer.
...
Some fudging was needed to avoid positioning problems as the renderer is more sensitive to this than Polymost.
2021-12-30 09:56:55 +01:00
Christoph Oelckers
df0c577cf4
- replaced most of numsectors, too.
2021-12-30 09:56:54 +01:00
Christoph Oelckers
f1c0298825
- replaced numwalls with wall.Size in several places.
2021-12-30 09:56:54 +01:00
Christoph Oelckers
6608096ea3
- added a bit more debug validation to the new clipper code.
2021-12-30 09:56:53 +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
82fb03e399
- another batch of search&replace, with smaller results.
2021-12-30 09:56:48 +01:00
Christoph Oelckers
11f41a97d5
- made gotpic a FixedBitArray.
...
gets rid of some inline garbage.
2021-12-30 09:53:56 +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
4a5de6f56e
- make sure that all changes of wall coordinates invalidate associated data.
...
walltype::move should be the preferred function to be used for this, otherwise walltype::moved needs to be called.
2021-12-30 09:53:11 +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
Mitchell Richters
95d60deecd
- Rename remaining hw_sections*.*
files to hw_sections.*
.
2021-12-30 09:53:11 +01:00
Mitchell Richters
520412075f
- Delete empty hw_sections.cpp
file.
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
d46e3c87e0
- removed development output of the loop grouping code.
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
bb9313454d
- removed SectorGeometry class.
2021-12-30 09:53:09 +01:00
Christoph Oelckers
7a9596ae81
- use SectionGeometry for 3D rendering.
2021-12-30 09:53:09 +01:00
Christoph Oelckers
37e49ed775
After this any old mesh has become invalid and needs to be rebuilt.
...
- use only one Section type.
2021-12-30 09:53:09 +01:00
Christoph Oelckers
8e01d559e8
- store sector as an index in Section2 and renamed walls to lines.
...
Now everything has the same name and type as in the old section.
2021-12-30 09:53:08 +01:00
Christoph Oelckers
208ca4f783
- merge old SectionLine and new Section2Wall into one type and use the same global array.
2021-12-30 09:53:08 +01:00
Christoph Oelckers
d353787d31
- add a global list of section walls.
2021-12-30 09:53:08 +01:00
Christoph Oelckers
f8f6c345fc
- use index fields in Section2Wall.
...
There's little benefit of using pointers here - it inflates a critical render struct, does not make any code more readable and requires quite deep refactoring of hw_bunchdrawer.
Now, with all fields having the same tyoe and name a lot less code needs to be changed.
2021-12-30 09:53:08 +01:00
Christoph Oelckers
a407e86ff6
- migrated automap to new SectionGeometry class.
2021-12-30 09:53:08 +01:00
Christoph Oelckers
362b824775
- ClipWindow WIP
2021-12-30 09:53:08 +01:00
Christoph Oelckers
4364e68d05
- automap work to transition to new sections.
2021-12-30 09:53:08 +01:00
Christoph Oelckers
411e3e6f9c
- make SectionGeometry create some data.
2021-12-30 09:53:07 +01:00
Christoph Oelckers
ca19c265f8
- interface from Section2 to the flat processing.
2021-12-30 09:53:07 +01:00
Christoph Oelckers
69593fd5c7
- Triangulation WIP
...
# Conflicts:
# source/core/sectorgeometry.cpp
2021-12-30 09:53:07 +01:00
Christoph Oelckers
449362dcb3
- better debug output.
2021-12-30 09:53:07 +01:00
Christoph Oelckers
a255e90c96
- more work on the new section creator.
2021-12-30 09:53:06 +01:00
Christoph Oelckers
b1bf12df9d
- section fixes.
2021-12-30 09:53:06 +01:00
Christoph Oelckers
ad018db80a
- new section builder.
2021-12-30 09:53:06 +01:00
Christoph Oelckers
9397eb6a19
- automatically handle one specific case of bad wall loops.
...
Both RRRA E3L1.map and SW $yamato.map have this:
Wall x and Wall x+1 have identical properties and both reference Wall x+2 as point2.
The duplicate in this case can be safely deleted to make the sector well formed.
2021-12-30 09:53:06 +01:00
Christoph Oelckers
a733de618f
- new section WIP.
2021-12-30 09:53:06 +01:00
Mitchell Richters
14b8eda436
- Get rid of some now irrelevant comments.
2021-12-26 23:10:03 +01:00
Christoph Oelckers
106ec53d1f
- disabled sector splitter for now because it's broken and useless.
...
The entire section format needs to be redone for better triangulation so fixing this messy code is pointless.
2021-12-26 23:10:03 +01:00
Christoph Oelckers
b8c4354691
- got rid of the MAX... constants and adjusted all places still using them.
2021-12-26 23:10:02 +01:00
Christoph Oelckers
1a3b9f8ac0
- made several arrays holding sector related data dynamic.
2021-12-26 23:10:02 +01:00
Christoph Oelckers
838bed7800
- final cleanup of sectnum related stuff.
...
Made sure that remaining uses of sector indices are safe to be kept and deleted a few redundant functions.
2021-12-26 23:10:01 +01:00
Christoph Oelckers
6a43a270fa
- use sectno() access function where we really need a sector index.
2021-12-26 23:10:01 +01:00
Christoph Oelckers
38c8f2a3b8
- the last 16 bit limits in the new renderer.
2021-12-26 23:09:59 +01:00
Christoph Oelckers
b0ecf7e87b
- unlimit the wall index in sections.
2021-12-26 23:09:57 +01:00
Christoph Oelckers
a2e280e188
- use wallsofsector in 4 more places.
...
# Conflicts:
# source/build/src/polymost.cpp
2021-12-26 23:09:57 +01:00
Christoph Oelckers
e79cd8d87f
- don't store sprite indices in walltype::portalnum
2021-12-26 23:09:54 +01:00
Christoph Oelckers
eaff9e359f
- refactored the owner index in tspritetype.
...
This is now a separate type from spritetype which contains an actor pointer instead so that sprite display can be handled without requiring a static sprite array.
2021-12-26 23:09:53 +01:00
Christoph Oelckers
f9b1164747
- use point2Wall wherever possible.
2021-12-26 23:09:48 +01:00
Christoph Oelckers
b663b8ea26
- wallptr reduction.
2021-12-26 23:09:48 +01:00
Christoph Oelckers
eb0f91e26b
- pass sector pointer to render_camtex.
2021-12-26 23:09:47 +01:00
Christoph Oelckers
a22634f228
- sectnum reduction.
2021-12-26 23:09:47 +01:00
Christoph Oelckers
4c13f24357
- rename FBunch's sectnum because it complicated searching for other stuff.
2021-12-26 23:09:47 +01:00
Christoph Oelckers
12f6b05cbe
- use access functions, all done by search & replace.
2021-12-26 23:09:44 +01:00
Christoph Oelckers
2aefe4398b
- sector[tspr->sectnum] globally replaced.
2021-12-26 23:09:43 +01:00
Christoph Oelckers
4928187b02
- handle the RR geometry hack
2021-12-25 21:28:57 +01:00
Christoph Oelckers
b30be9bc12
- unlimited blockingpairs
2021-12-25 21:28:50 +01:00