Commit graph

173 commits

Author SHA1 Message Date
Christoph Oelckers
e83d0930bf - clean out the unused sintable stuff 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
479c732a72 - moved some more things out of build.h 2022-10-30 16:51:10 +01:00
Christoph Oelckers
94b91f6ec3 - build.h cleanup
* moved krand and krandf into the games/duke folder because no other game uses them
* moved CVARS to gamefuncs.h.
2022-10-30 16:51:09 +01: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
Mitchell Richters
5cc9774873 - Apply same signedness fix from - fixed signedness issue with slope sprite coefficient. to spriteGetSlope(). 2022-10-25 07:07:14 +02:00
Mitchell Richters
2e8e5f99e7 - Fix mixed X/Y pos subtraction in spriteGetZOfSlopef() and use a bit more of the backend.
* Confirmed coordinate mix-up when reviewing commit `- added spriteGetZOfSlopeF for the backend`.
2022-10-25 07:07:14 +02:00
Christoph Oelckers
310eff6e71 - clean out many wrappers. 2022-10-25 07:07:10 +02:00
Christoph Oelckers
f0dc95597b - deleted several unused wrappers and overloads. 2022-10-25 07:07:05 +02:00
Christoph Oelckers
3c3af06413 - deleted getincangle. 2022-10-25 07:07:02 +02:00
Christoph Oelckers
2ba68df27f - eliminate int_floorz / int_ceilingz in the backend. 2022-10-25 07:07:00 +02:00
Christoph Oelckers
6b579156aa - Blood HitScan fixes
- changed target parameter of hitscan to a double to simplify its handling.
- HitScan's nRange parameter may be an int, but it is in texel units, not Build units.
2022-10-25 07:06:56 +02:00
Mitchell Richters
1e19b32b59 - Add CVAR to allow unclamping the player's view pitch. 2022-10-25 07:06:55 +02:00
Mitchell Richters
8d3f3c6025 - Cut over to DAngle from fixedhoriz and remove the latter. 2022-10-25 07:06:55 +02:00
Mitchell Richters
5851c0f2c6 - Clean up some q16horiz usage and how the view pitch is clamped. 2022-10-25 07:06:53 +02:00
Christoph Oelckers
74cf9a2ff2 - hitscan fully rewritten.
No traces of Build code left here! :)
2022-10-22 20:41:27 +02:00
Christoph Oelckers
2991bc752b - split out the pure math stuff from gamefuncs.h into a utility header in 'common'.
Also did a bit of reshuffling on gamefuncs.h to group content better.
2022-10-22 20:41:26 +02:00
Christoph Oelckers
116ba340b2 - further hitscan overhaul.
* added floating point sprite intersect handlers for all sprite types. Hopefully this code is more understandable than Build's original variant.
* cleaned up intersectSprite a bit and moved the geometry math into the utility header.
* made some minor corrections to neartag.
* moved SW's testpointinquad to the backend because it was useful here.
2022-10-22 20:41:26 +02:00
Christoph Oelckers
09d66914f4 - LinePlaneIntersect
This is for calculating intersections with slope sprites later.
2022-10-22 12:17:04 +02:00
Christoph Oelckers
243c071834 - got rid of bsinf and bcosf. 2022-10-22 12:17:04 +02:00
Christoph Oelckers
6dd7fac902 - eliminated the sine table and moved tilehasmodelorvoxel to a different file to delete engine.cpp. 2022-10-22 12:17:04 +02:00
Christoph Oelckers
ef2f781e09 - rewrite from scratch of neartag. 2022-10-22 12:17:04 +02:00
Christoph Oelckers
20043f6223 - use symbolic constants in neartag calls. 2022-10-22 12:17:03 +02:00
Christoph Oelckers
9c564db015 - replaced try_facespr_intersect with something independently written. 2022-10-22 12:17:03 +02:00
Christoph Oelckers
28a169d02d - cansee floating point rewrite using backend utilities. 2022-10-22 12:17:02 +02:00
Christoph Oelckers
14a8dd451e - redid lintersect with backend utilities.
I left out EDuke32's new handling for collinear traces because it not only was never active but also makes really no sense with neartag which is lintersect's only caller.
2022-10-22 12:17:02 +02:00
Mitchell Richters
95cd74bdc0 - renamed slope functions so that the int versions get a special name. 2022-10-22 12:17:02 +02:00
Christoph Oelckers
9172ab27ca - move all deprecated functions to the bottom in gamefuncs.h. 2022-10-22 12:17:02 +02:00
Christoph Oelckers
c5a5e3cef5 - deleted some unused deprecated functions. 2022-10-22 12:17:01 +02:00
Christoph Oelckers
2cc81d0165 - floating point version of rintersect, based on GZDoom's P_InterceptVector. 2022-10-22 12:17:01 +02:00
Christoph Oelckers
b7ddd9e784 - added InterceptVector from GZDoom.
This will be useful for some backend stuff.
2022-10-22 12:17:01 +02:00
Christoph Oelckers
6a1ff029b7 - floatified getslopeval and all related code. 2022-10-22 12:17:00 +02:00
Christoph Oelckers
ece8663f5e - floatified calcSlope and cleaned up the get*slope interface 2022-10-22 12:17:00 +02:00
Christoph Oelckers
f5e6503b26 - merge NearestPointLine into NearestPointOnWall 2022-10-22 12:16:57 +02:00
Christoph Oelckers
c87b4a581b - got rid of the WallStart/End macros
They never got much use and the places where they were used work just as well without them
2022-10-22 12:16:56 +02:00
Christoph Oelckers
cbfc9a8252 - added spriteGetZOfSlopeF for the backend 2022-10-22 12:16:56 +02:00
Christoph Oelckers
ca8b9e9793 - overhauled getzrangepoint to use backend utilities 2022-10-22 12:09:54 +02:00
Mitchell Richters
4e8331b16b - Fix broken wrap-around in the double version of BobVal().
* My first time actually witnessing this, but was only a problem with GCC...
2022-10-22 13:51:31 +11:00
Christoph Oelckers
3c9a94dba8 - consolidated Duke’s ‚away from wall‘ check in the backend
This was also very useful in SW to avoid spawning ‚floating‘ footprints due to lack of an equivalent check in the original.
2022-10-21 00:00:02 +02:00
Christoph Oelckers
19bca44f37 - added a float version of BobVal.
We will need this later.
2022-10-20 23:59:27 +02:00
Mitchell Richters
9eec69d810 - Blood: Floatify position drawing code and clean up now-unused wrappers.
* Still work to be done on bob/sway/zView variables.
2022-10-18 18:29:09 +02:00
Christoph Oelckers
6de279282e - marked integer dragpoint function deprecated. 2022-10-16 10:19:40 +02:00
Mitchell Richters
6716d0f2e9 - Floatify smoothratio for calcChaseCamPos(). 2022-10-15 13:32:02 +02:00
Mitchell Richters
45d4d3e41a - Eliminate __interpvalue() and clean up Q16.16 smoothratio values where it made sense to do so.
* Also eliminates a now empty header.
2022-10-15 13:32:02 +02:00
Christoph Oelckers
92379863f1 - don't use DAngle for calculating bobbing amplitudes.
It makes more sense here to have a dedicated function since this is not really angular math.
2022-10-15 13:31:59 +02:00
Christoph Oelckers
6b0b8f944c - floatified the height parameter of nextsectorneighborptr 2022-10-15 12:42:30 +02:00
Mitchell Richters
056bb9b0cd - Floatify chase cam code, providing an inline interface for legacy setup. 2022-10-15 12:16:53 +02:00