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
5f0bb55e06
- almost all is floats.
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
ef9efe30b6
- floatified the part of clipmove that is most prone to overflows.
...
Replaced with a NearestPointOnLine call
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
a80589fb43
- deleted build.h and clip.h, now that both are empty.
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
7a673c2801
- removed the old wall checker code and all dependencies.
...
Most importantly this eliminates all calls to deprecated utilities from clip.cpp and removes the actual functions from gamefuncs.h.
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
Christoph Oelckers
8f5923c324
- handle a visual glitch in Duke's E2L1 via compatibility.
...
There is already code to deal with this automatically, but this does not manage to fully eliminate the problem.
2022-11-07 11:51:40 +01:00
Christoph Oelckers
2290f05dcb
Revert "- Use std::fma()
in the interpolation code."
...
This reverts commit ff7e0afa6f
.
On Visual Studio with precise math, which is our main target this generates a very expensive function call instead of optimized assembly which renders the function's purpose ad absurdum.
2022-11-07 10:36:34 +01:00
Christoph Oelckers
3444991e4e
- fixed VSpriteBusy coordinate adjustment.
2022-11-07 10:31:10 +01:00
Mitchell Richters
d892fa10d2
- SW: Fix ladder speed with unnecessary amplification applied.
...
* Fixes #745 .
2022-11-07 20:23:14 +11:00
Mitchell Richters
817a0cb94a
- Clamp applied mouse input to be within safe ranges to interpolate with.
...
* Input greater than 180 degrees in a single tic can cause the input to be applied backwards.
2022-11-07 19:38:22 +11:00
Mitchell Richters
ff7e0afa6f
- Use std::fma()
in the interpolation code.
...
* From everything I've read, this more accurate, can be ~5% faster and is heavily optimised on CPUs of the last 10-12 years.
* This homegrown solution can be removed for `std::lerp()` once we go C++20.
2022-11-07 19:28:34 +11:00
Mitchell Richters
88e92a15a6
- Clean up some interpolatedvalue()
calls.
2022-11-07 17:52:53 +11:00
Mitchell Richters
274899c9db
- Get rid of useless lerp()
function I added last night for lack of C++20.
...
* We already have a generic linear interpolator that _I_ added, so let's use it.
2022-11-07 17:31:17 +11:00
Mitchell Richters
043ebadbee
- Remove 2x Normalized180()
method calls on pitch where it's not needed.
...
* Pitch should always be +/- 90 degrees and never need normalization. If it's not, then this shouldn't mask an error caused elsewhere.
2022-11-07 16:53:55 +11:00
Mitchell Richters
9fbe564327
- Fix bad if statement guarding cl_clampedpitch
in menu and make non-global.
2022-11-07 15:43:26 +11:00
Mitchell Richters
c8114e7ed0
- Revert change to TAngle<T>
's /
operator that snuck in.
2022-11-07 15:43:00 +11:00
Christoph Oelckers
912b6a47c1
- migrate cl_savedir to save_dir
2022-11-06 17:48:32 +01:00
Mitchell Richters
eb3f4c6e00
- Update language.csv
.
2022-11-06 22:03:43 +11:00
Mitchell Richters
2357cc5c36
- Add option to (experimentally) unclamp the view pitch for the Duke family of games.
2022-11-06 22:03:42 +11:00
Mitchell Richters
33d74c9009
- Default display of map name in SW to be off by default.
2022-11-06 21:59:07 +11:00
Mitchell Richters
143f691c06
- SW: Try to fix up the camera drawing a bit.
...
* Slight pitch adjustment, plus factoring in that values of 0 constituted 100 under original game.
* View screens in game are not actually 1:1 AR but 1.12:1
2022-11-06 21:59:07 +11:00
Mitchell Richters
11f279fddd
- Slight input code tidy-up.
2022-11-06 21:59:07 +11:00
Mitchell Richters
033e0ea7bc
- Make rotscrnang return to zero at same speed as look_ang.
2022-11-06 21:59:07 +11:00
Mitchell Richters
0c4ad84c2e
- RR: Pitch-adjusted velocity for operateweapon()
when free-aiming.
2022-11-06 21:59:06 +11:00
Mitchell Richters
9a25b1d3f5
- RR: Pitch-adjusted velocity for shootweapon()
when free-aiming.
2022-11-06 21:59:06 +11:00
Mitchell Richters
b14525b47b
- RR: Pitch-adjusted velocity for shootmelee()
when free-aiming.
2022-11-06 21:59:06 +11:00
Mitchell Richters
24dcd26e64
- RR: Pitch-adjusted velocity for shootwhip()
when free-aiming.
2022-11-06 21:59:06 +11:00
Mitchell Richters
211b2cc349
- RR: Pitch-adjusted velocity for shootrpg()
when free-aiming.
2022-11-06 21:59:06 +11:00
Mitchell Richters
b9bd02299a
- RR: Pitch-adjusted velocity for shootstuff()
when free-aiming.
2022-11-06 21:59:06 +11:00
Mitchell Richters
7941f3cde3
- Duke: Pitch-adjusted velocity for aim()
.
2022-11-06 21:59:06 +11:00