Commit graph

5947 commits

Author SHA1 Message Date
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
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
c8114e7ed0 - Revert change to TAngle<T>'s / operator that snuck in. 2022-11-07 15:43:00 +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
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
Mitchell Richters
f2674e95d3 - Duke: Pitch-adjusted velocity for operateweapon_ww() when free-aiming. 2022-11-06 21:59:06 +11:00
Mitchell Richters
3a1f1c7580 - Duke: Pitch-adjusted velocity for operateTripbomb() when free-aiming. 2022-11-06 21:59:05 +11:00
Mitchell Richters
3908ec0c42 - Duke: Pitch-adjusted velocity for operateweapon() when free-aiming. 2022-11-06 21:59:05 +11:00
Mitchell Richters
fe7c49fcac - Duke: Pitch-adjusted velocity for shootlaser() when free-aiming. 2022-11-06 21:59:05 +11:00
Mitchell Richters
9e60284ff6 - Duke: Pitch-adjusted velocity for shootlaser() when free-aiming. 2022-11-06 21:59:05 +11:00
Mitchell Richters
1b499520a5 - Duke: Pitch-adjusted velocity for shootweapon() when free-aiming. 2022-11-06 21:59:05 +11:00
Mitchell Richters
63917fd158 - Duke: Pitch-adjusted velocity for shootknee() when free-aiming. 2022-11-06 21:59:05 +11:00
Mitchell Richters
a200db6f3a - Duke: Pitch-adjusted velocity for shootstuff() when free-aiming. 2022-11-06 21:59:05 +11:00
Mitchell Richters
73477a722c - Duke: Pitch-adjusted velocity for shootshrinker() when free-aiming. 2022-11-06 21:59:04 +11:00
Mitchell Richters
9f32eae1a7 - Duke: Pitch-adjusted velocity for shootflamethrowerflame() when free-aiming. 2022-11-06 21:59:04 +11:00
Mitchell Richters
64f55726c9 - Duke: Pitch-adjusted velocity for shootfireball() when free-aiming. 2022-11-06 21:59:04 +11:00
Mitchell Richters
33e2de70a2 - Duke: Pitch-adjusted velocity for shootrpg() when free-aiming. 2022-11-06 21:59:04 +11:00
Mitchell Richters
8ec475aec8 - Replace clamped off tangent values with a linear interpolation of the player's pitch.
* Gives a tangent-like ramping where it's noticeable without having to use the tangent at all.
* Had to do homegrown lerper since we're not C++20 yet.
2022-11-06 21:59:04 +11:00
Christoph Oelckers
b4a49ea228 - fixed movement speed for SE25 (Piston) 2022-11-05 16:00:39 +01:00
Christoph Oelckers
99753fd03a - fixed bad scaling factor in girlninj.cpp. 2022-11-04 18:18:23 +01:00
Christoph Oelckers
77ae3b3b71 - RR: fixed bad angle math in shootmortar 2022-11-03 11:08:40 +01:00
Christoph Oelckers
f5ce60fa6e - fixed issues with negative values being passed to sqrt für calculating RRRA's motorcyle and boat. 2022-11-02 13:32:07 +01:00
Christoph Oelckers
0e113dab79 - added true level compatibility map processing and deleted all related map hack code. 2022-10-31 10:45:47 +01:00
Christoph Oelckers
06c9296932 - added a quick hack to move a misplaced vertex in RR E1L1's barn. 2022-10-30 16:51:41 +01:00
Christoph Oelckers
0f57685f48 - updatesector interface cleanup. 2022-10-30 16:51:41 +01:00
Christoph Oelckers
c5523a99ee - fixed issues with Duke's poolballs. 2022-10-30 16:51:41 +01:00
Christoph Oelckers
09df4da241 - fixed scaling issue with Duke's green slimer. 2022-10-30 16:51:40 +01:00
Christoph Oelckers
0c87bcb91b - renamed getzsofslopeptr to calcSlope and removed one redundant inline. 2022-10-30 16:51:40 +01:00
Christoph Oelckers
32b2e84fdc - added episode and total episode time display to alt HUD 2022-10-30 16:51:40 +01:00
Christoph Oelckers
ffd284d233 - Duke: use player palette only on the foot weapon.
This is the only one showing Duke's clothes - the translation may cause discoloration on the others.
2022-10-30 16:51:39 +01:00
Mitchell Richters
79a1110d5f - Duke: Create new flag SFLAG2_INTERPOLATEANGLE and use for the bearing plate on gears.
* Fixes #719.
2022-10-30 16:51:39 +01:00
Mitchell Richters
65acafc2bd - Duke: Move new blood spat code into function for use in RR code as well. 2022-10-30 16:51:39 +01:00
Mitchell Richters
f149410750 - Duke: New setup for blood splatters against walls, taking full account of the float precision. 2022-10-30 16:51:38 +01:00
Christoph Oelckers
2fbee8faf5 - Exhumed alt hud. 2022-10-30 16:51:38 +01:00
Christoph Oelckers
35f6ece473 - renamed RR’s weapon sprites to match their weapons 2022-10-30 16:51:38 +01:00
Christoph Oelckers
88d421300a - made DukeActor::timetosleep unsigned.
Although mostly theoretical it is possible for this to overflow and render the actor non-functional.
If the value is unsigned the overflow will wrap around to 0 which is not critical.
2022-10-30 16:51:37 +01:00
Christoph Oelckers
15fc9e47fd - use symbolic STAT_ constants in spawninit where available. 2022-10-30 16:51:37 +01:00
Christoph Oelckers
ff71ab14ce - added a GZDoom-style alternative HUD.
So far only implemented for Blood.
2022-10-30 16:51:37 +01:00
Christoph Oelckers
f4c8ac0140 - made AnimSet's vel parameter an actual double.
This does not affect any outcome, it just avoids pointless type conversions.
2022-10-30 16:51:36 +01:00
Christoph Oelckers
4ac3820511 - deleted two unused local variables. 2022-10-30 16:51:36 +01:00
Christoph Oelckers
98e2fecd37 - another bunch of type conversion warnings fixed.
the ones in the findplayer functions are not critical in singleplayer.
2022-10-30 16:51:35 +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
9c097e1763 - revert to warning level 3.
Some stock warnings are far too noisy when level 4 is on.
2022-10-30 16:51:35 +01:00
Christoph Oelckers
5a045a6232 - deleted deprecated zrand variant 2022-10-30 16:51:35 +01:00
Christoph Oelckers
0c8a76dc9c - use ActorVect… functions in a few more places 2022-10-30 16:51:35 +01:00
Mitchell Richters
3f2d970b4f - Blood: Fix minor issue where player death horizon was being applied at double speed. 2022-10-30 16:51:34 +01:00
Mitchell Richters
2fc115a23d - Duke: Remove only place rotatepoint() is called where no pivot is used. 2022-10-30 16:51:34 +01:00
Christoph Oelckers
4df875e860 - use setfloorz/setceilingz in a few places where it wasn't done.
This isn't critical in any way so no need to merge, but let's be consistent, in case future changes rely on it.
2022-10-30 16:51:34 +01:00
Mitchell Richters
e07785e85b - Duke: Use pitch difference between player and shrunken actor to adjust horizon.
* Works a lot better, and is uncapped pitch compatible unlike the old setup.
2022-10-30 16:51:34 +01:00
Christoph Oelckers
e5efb5c15f - fixed seeker missile aiming
merge to "floatified VectorMissileSeek"
2022-10-30 16:51:34 +01:00
Christoph Oelckers
c159953ac6 - use normalangle(). 2022-10-30 16:51:33 +01:00
Mitchell Richters
e099a19f03 - Duke: Fix bad x/yrepeat scaling.
* Merge with or above `- use Scale wrappers in global code and parts of Duke.`.
2022-10-30 16:51:33 +01:00
Christoph Oelckers
3c6b64d621 - renamed everything back 2022-10-30 16:51:33 +01:00
Christoph Oelckers
81341ce4a6 - unwrapped SetScale as well.
Again no edits here - it's one big replace action.
2022-10-30 16:51:33 +01:00
Christoph Oelckers
da523eb8e3 - unwrapped vector SetScale. 2022-10-30 16:51:32 +01:00
Christoph Oelckers
15db7a7143 - unwrapped SetScaleX/Y. 2022-10-30 16:51:32 +01:00
Christoph Oelckers
8265239d2d - removed AddScale wrappers. 2022-10-30 16:51:32 +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
4aa765675e - use a float vector to store the scale. 2022-10-30 16:51:31 +01:00
Christoph Oelckers
2df12e7961 - these are the final repeats 2022-10-30 16:51:31 +01:00
Christoph Oelckers
854c42e4ca - handle all remaining repeat constants. 2022-10-30 16:51:31 +01:00
Christoph Oelckers
42b36d97b9 - half of the remainint repeats in weapon.cpp. 2022-10-30 16:51:30 +01:00
Christoph Oelckers
391b8ffc34 - batch of repeats in weapons.cpp 2022-10-30 16:51:30 +01:00
Christoph Oelckers
0e8594628e - did the messier parts of weapon.cpp's repeats. 2022-10-30 16:51:30 +01:00
Christoph Oelckers
ce0a40320c - handle all 'notreallypos' places. 2022-10-30 16:51:30 +01:00
Christoph Oelckers
8a455aa09b - all remaining repeats outside weapon.cpp plus a few more. 2022-10-30 16:51:30 +01:00
Christoph Oelckers
60782efd01 - some odd repeats. 2022-10-30 16:51:29 +01:00
Christoph Oelckers
33aed76977 - random scale stuff in jweapon.cpp 2022-10-30 16:51:29 +01:00
Christoph Oelckers
8cb40291f2 - lots of repeat literals in SW 2022-10-30 16:51:29 +01:00
Christoph Oelckers
8ede08ce69 - mostly coolie related scaling factors. 2022-10-30 16:51:29 +01:00
Christoph Oelckers
abf5c9feee - all repeats in SW’s draw code 2022-10-30 16:51:29 +01:00
Christoph Oelckers
509d56d042 - handle bunny scaling in SW 2022-10-30 16:51:29 +01:00
Christoph Oelckers
2ceb41fcf4 - BuildAnim in Exhumed 2022-10-30 16:51:28 +01:00
Christoph Oelckers
f30a76dfc9 - BuildAnim wrapper 2022-10-30 16:51:28 +01:00
Christoph Oelckers
43b8f92f91 - all of Exhumed except BuildAnim 2022-10-30 16:51:28 +01:00
Christoph Oelckers
62427f8260 - handle xrepeat abuse in Exhumed’s energy blocks 2022-10-30 16:51:28 +01:00
Christoph Oelckers
42679d58bb - lots of repeats in Exhumed 2022-10-30 16:51:28 +01:00
Christoph Oelckers
558eaf38e1 - the last repeats in Duke
Mostly constants in the spawn code
2022-10-30 16:51:27 +01:00
Christoph Oelckers
bda616eb01 - fixed warning 2022-10-30 16:51:27 +01:00
Christoph Oelckers
2a4483e860 - all remaining repeats in Duke except spawn_d and spawn_r 2022-10-30 16:51:27 +01:00
Christoph Oelckers
38f7935ee9 - repeats in actors_d.cpp and actors_r.cpp 2022-10-30 16:51:27 +01:00
Christoph Oelckers
bc26f16ed5 - refactoring CreateActor - part 2 2022-10-30 16:51:26 +01:00
Christoph Oelckers
1a22127123 - refactoring CreateActor - part 1 2022-10-30 16:51:26 +01:00
Christoph Oelckers
44f0a6ae67 - handle the bolts
These used temp_data which was remapped to temp_pos for being floats.
2022-10-30 16:51:26 +01:00
Christoph Oelckers
dd3346cbc5 - mostly comparisons and code surrounding them 2022-10-30 16:51:26 +01:00
Christoph Oelckers
fb164450a7 - use MultScale 2022-10-30 16:51:25 +01:00
Christoph Oelckers
e749a0e9a4 - a bunch of repeats in actor_d.cpp 2022-10-30 16:51:25 +01:00
Christoph Oelckers
4c151ef15a - the remaining repeats in Duke’s actor.cpp 2022-10-30 16:51:25 +01:00
Christoph Oelckers
5700d25120 - minor cleanup on scaling code 2022-10-30 16:51:25 +01:00