Commit graph

173 commits

Author SHA1 Message Date
Christoph Oelckers
faf98684a3 - rewrote cliptrace.
Completely new implementation reusing nothing of the original.

# Conflicts:
#	source/build/src/clip.cpp
#	source/core/gamefuncs.cpp
#	source/core/gamefuncs.h
2022-11-07 12:19:54 +01:00
Christoph Oelckers
8415079e32 - fixed compilation. 2022-11-07 12:19:54 +01:00
Christoph Oelckers
14cff92624 - floatified all clipmove input. 2022-11-07 12:19:53 +01:00
Christoph Oelckers
85182ae49a - more tinkering 2022-11-07 12:19:53 +01:00
Christoph Oelckers
57579444d3 - everything is floatified.
Unfortunately this is not working right.
2022-11-07 12:19:53 +01:00
Christoph Oelckers
9a1a15a5e2 - floatified a bit more of clipmove.
Still not working right with the remaining conversions.
2022-11-07 12:19:52 +01:00
Christoph Oelckers
fe56d2345d - always use the float version of keepaway
Does not work yet - movement is significantly different that the int version
2022-11-07 12:19:52 +01:00
Christoph Oelckers
66e6d166d6 - floatified part of clipmove that pushes the caller away from obstacles 2022-11-07 12:19:52 +01:00
Christoph Oelckers
b72283e9cb - updatesector interface cleanup. 2022-11-07 12:19:31 +01:00
Christoph Oelckers
3c72eb43f9 - split off one part of clipmove into a utility function. 2022-11-07 12:19:31 +01:00
Christoph Oelckers
f0ab74b188 - fixed coordinate setup in processClipSlopeSprite 2022-11-07 12:19:30 +01:00
Christoph Oelckers
c6e6b7c59d - got rid of the global compatibility modes and made 'precise' a parameter for clipmove.
This better reflects how this stuff gets used.
2022-11-07 12:19:30 +01:00
Christoph Oelckers
7ffa94d417 - move the clip object collection loop into its own function. 2022-11-07 12:19:29 +01:00
Christoph Oelckers
8baf4b539c - use BFSSectorSearch to drive the clipmove collection loop.
This gets rid of another bunch of both code and data.
2022-11-07 12:19:29 +01:00
Christoph Oelckers
fcdafd8a83 - moved the clip object storage into the clip object and floatified it. 2022-11-07 12:19:29 +01:00
Christoph Oelckers
c24251431c - float version of clipmove's slope sprite collector.
This could be simplified quite a bit by leveraging the info returned by GetFlatSpritePosition.
2022-11-07 12:19:18 +01:00
Christoph Oelckers
321eebc89d - float version of clipmove's floor sprite collector. 2022-11-07 12:19:17 +01:00
Christoph Oelckers
035ffdb733 - new floating point version of clipmove's wall sprite checker. 2022-11-07 12:19:17 +01:00
Christoph Oelckers
f6ad998e6b - float version of face sprite collector. 2022-11-07 12:19:17 +01:00
Christoph Oelckers
9d56bbdae9 - rewrote the remaining parts of clipmove's wall collector. 2022-11-07 12:19:08 +01:00
Christoph Oelckers
53a9dee485 - reimplemented the wall collision check for clipmove. 2022-11-07 12:18:00 +01:00
Mitchell Richters
7f124eef58 - Adjust chase-cam code to work in a pitch-corrected capacity. 2022-11-06 21:59:04 +11:00
Christoph Oelckers
73deae88ce - fixed neartag's trace vector maintenance for sprite hits.
The trace vector needs to be shortened so that further checks only find items in front of the sprite.
2022-11-04 13:23:01 +01:00
Christoph Oelckers
0c87bcb91b - renamed getzsofslopeptr to calcSlope and removed one redundant inline. 2022-10-30 16:51:40 +01:00
Christoph Oelckers
ce4a6fc7e3 - split off one part of clipmove into a utility function. 2022-10-30 16:51:40 +01:00
Christoph Oelckers
e3254a8546 - fixed an edge case in cansee where an actor placed directly on a two-sided wall would fail to register that wall's back sector. 2022-10-30 16:51:37 +01:00
Christoph Oelckers
14769e9b79 - reroute cliptestsector to checkOpening.
This required adding one more check for the 'precise' mode.
2022-10-30 16:51:36 +01:00
Christoph Oelckers
40271e15b3 - minor tweaks to checkOpening
mainly some extensions to let it replace cliptestsector.
2022-10-30 16:51:36 +01:00
Christoph Oelckers
2190499d63 - pushmove rewritten. 2022-10-30 16:51:36 +01:00
Christoph Oelckers
902f8c9706 - silenced lots of warnings for deliberate type conversions.
The ones in d_net.cpp are not in active code.
2022-10-30 16:51:35 +01:00
Christoph Oelckers
3c6b64d621 - renamed everything back 2022-10-30 16:51:33 +01:00
Christoph Oelckers
85b52b1c77 - removed Scale(), CopyScale() and MultScale wrappers. 2022-10-30 16:51:32 +01:00
Christoph Oelckers
51768439a9 - started removing wrappers. ScaleX() and ScaleY() done.
No manual changes in here.
2022-10-30 16:51:31 +01:00
Christoph Oelckers
520d838a8c - use Scale wrappers in global code and parts of Duke. 2022-10-30 16:51:23 +01:00
Christoph Oelckers
91c318b708 - renamed most non-sprite xrepeat and yrepeat as refactpring aid.
These will be renamed back later but now they create too much search noise.
A few local variables have been permanently renamed to scale*.
2022-10-30 16:51:20 +01:00
Christoph Oelckers
e60fafec52 - got rid of most REPEAT_SCALE factors. 2022-10-30 16:51:19 +01:00
Christoph Oelckers
8c308c8d3e - added ScaleY method to spritetype and used it to get rid of a large amount of 'yrepeat * REPEAT_SCALE' 2022-10-30 16:51:18 +01:00
Christoph Oelckers
4af4983d3e - floatified clipdist and replaced fClipdist wrapper.
This uses a new variable because a few things use clipdist as a flag byte
2022-10-30 16:51:14 +01:00
Christoph Oelckers
3577b53c4d - GetWallSpritePosition also benefits from using .dot 2022-10-30 16:51:14 +01:00
Christoph Oelckers
f1baf5c69c - use dot product for getslopeval as well 2022-10-30 16:51:13 +01:00
Christoph Oelckers
02f1f79333 - use .dot() for calculating slopes 2022-10-30 16:51:13 +01:00
Mitchell Richters
0600bf5860 - Negate everything to do with PlayerHorizon::__horiz where appropriate, including some loose horizoff members. 2022-10-30 16:51:11 +01:00
Christoph Oelckers
a4dd5bb4ce - rewrote the model storage code.
Using proper C++ containers now.
2022-10-27 16:55:54 +02:00
Christoph Oelckers
6636064d1f - did a few checks with the compatibility optioned slope adjustment and decided to enable it unconditionally.
A CVar was added to make it user-settable, but having this dramatically improves handling on slope edges.
2022-10-27 16:55:52 +02:00
Christoph Oelckers
c505da79e4 - fixed: getzrange must look a bit further for sprites affecting the current position.
This was missed when the function was rewritten because the code was too unclear about it.
2022-10-27 16:55:52 +02:00
Christoph Oelckers
8e9ddf370c - rewrote getzrange
Not using any old Build code anymore. Aside from the trivial stuff this uses code from Doom and SW instead.
2022-10-27 16:55:28 +02:00
Mitchell Richters
fc8c0b80aa - Clean up chase cam backwards scaling since we're now using floats of the same scale. 2022-10-25 07:07:14 +02:00
Mitchell Richters
3db6a38b4b - Make dragpoint() inline since its a wrapper for another function anyway. 2022-10-25 07:07:14 +02:00
Mitchell Richters
9dd27ee3a2 - Remove old integer dragpoint() interface that was used by floats in lots of places.
* Cannot wait until all the narrowing warnings can be re-enabled...
2022-10-25 07:07:14 +02:00
Christoph Oelckers
2ba68df27f - eliminate int_floorz / int_ceilingz in the backend. 2022-10-25 07:07:00 +02:00