Commit graph

1672 commits

Author SHA1 Message Date
Christoph Oelckers
607f119bad - floatified aiPatrolAlarmFull 2022-10-25 07:07:06 +02:00
Christoph Oelckers
99da5d78ab - floatified GetZRangeAtXYZ 2022-10-25 07:07:06 +02:00
Christoph Oelckers
9b9116986b - removed redundant function call. 2022-10-25 07:07:06 +02:00
Christoph Oelckers
6e03f87671 - floatified GetZRange 2022-10-25 07:07:06 +02:00
Christoph Oelckers
60e9e4d93a - floatified EnemyBubble 2022-10-25 07:07:06 +02:00
Christoph Oelckers
caf6dacbb5 - floatified PlayerBubble 2022-10-25 07:07:06 +02:00
Christoph Oelckers
a63527c892 - floatified fxDynPuff 2022-10-25 07:07:06 +02:00
Christoph Oelckers
24f4e1894c - floatified fxFlameLick 2022-10-25 07:07:05 +02:00
Christoph Oelckers
d349eabcbc - floatified dudeLeechOperate 2022-10-25 07:07:05 +02:00
Christoph Oelckers
e54719e6f5 - floatified coordinate stuff in ThrowThing 2022-10-25 07:07:05 +02:00
Christoph Oelckers
e8718826ba - renamed Heardist to HearDist.
This had to wait until the variable was refactored out.
2022-10-25 07:07:05 +02:00
Christoph Oelckers
94403684b2 - changed 2 seeDist references to the SeeDist() wrapper.
Although not necessary this makes it easier later to refactor DUDEINFO.
2022-10-25 07:07:05 +02:00
Christoph Oelckers
f0dc95597b - deleted several unused wrappers and overloads. 2022-10-25 07:07:05 +02:00
Christoph Oelckers
9cd5766cd0 - deleted unused GetWallAngle function and comment cleanup 2022-10-25 07:07:05 +02:00
Christoph Oelckers
89cdd17cc2 - floatified PukeSeqCallback 2022-10-25 07:07:05 +02:00
Christoph Oelckers
8dd646a24f - floatified HackSeqCallback 2022-10-25 07:07:04 +02:00
Christoph Oelckers
8edd0530cb - renamed two functions. 2022-10-25 07:07:04 +02:00
Christoph Oelckers
7ae1d6fdc1 - floatified another Tchernobog callback. 2022-10-25 07:07:04 +02:00
Christoph Oelckers
65d696c2bb - floatified sub_71BD4 2022-10-25 07:07:04 +02:00
Christoph Oelckers
dcde92d629 - floatified cerberusThinkGoto 2022-10-25 07:07:04 +02:00
Christoph Oelckers
8c00af40d0 - eliminated the last set_int_bvel call in fxZombieBloodSpurt 2022-10-25 07:07:04 +02:00
Christoph Oelckers
d213f7c92f - floatified useUniMissileGen 2022-10-25 07:07:04 +02:00
Christoph Oelckers
0999ffd5c0 - floatified fxSpawnEjectingBrass/Shell and got rid of the inlines. 2022-10-25 07:07:03 +02:00
Christoph Oelckers
ee255b533d - floatified SpidBirthSeqCallback 2022-10-25 07:07:03 +02:00
Christoph Oelckers
4376bd6581 - floatified SpidBiteSeqCallback and SpidJumpSeqCallback 2022-10-25 07:07:03 +02:00
Christoph Oelckers
3abd6aa996 - floatified ratBiteSeqCallback 2022-10-25 07:07:03 +02:00
Christoph Oelckers
c58e0d84ad - floatified podAttack 2022-10-25 07:07:03 +02:00
Christoph Oelckers
c2fbbfbefe - floatified the remaining parts of aihound.cpp. 2022-10-25 07:07:03 +02:00
Christoph Oelckers
0a2274a41d - the remaining bits in aigilbst.cpp 2022-10-25 07:07:03 +02:00
Mitchell Richters
bb6e12a2b1 - Eliminate remaining calls to TAngle<T>::fromBuildf(). 2022-10-25 07:07:03 +02:00
Christoph Oelckers
b7afaf3ed5 - floatified most of aiPatrolSearchTargets 2022-10-25 07:07:02 +02:00
Christoph Oelckers
769565997f - floatified zombfThinkChase 2022-10-25 07:07:02 +02:00
Christoph Oelckers
5ba2eb4f64 - floatified myThinkTarget 2022-10-25 07:07:02 +02:00
Christoph Oelckers
211c77138b - floatified most of unicultThinkChase 2022-10-25 07:07:02 +02:00
Christoph Oelckers
8382f12af2 - floatified sub_725A4 2022-10-25 07:07:02 +02:00
Christoph Oelckers
2620a8f644 - floatified ratThinkChase 2022-10-25 07:07:02 +02:00
Christoph Oelckers
edf6c69159 - floatified gillThinkChase 2022-10-25 07:07:02 +02:00
Christoph Oelckers
523400772e - floatified zombaThinkChase and zombaThinkPonder 2022-10-25 07:07:01 +02:00
Christoph Oelckers
4388401e6e - floatified unicultThinkGoto 2022-10-25 07:07:01 +02:00
Christoph Oelckers
6b72414038 - floatified tchernobogThinkChase 2022-10-25 07:07:01 +02:00
Christoph Oelckers
0385897be4 - floatified spidThinkChase 2022-10-25 07:07:01 +02:00
Christoph Oelckers
9586a2f16d - floatified aiPodChase 2022-10-25 07:07:01 +02:00
Christoph Oelckers
6b6ab4e81e - floatified innocThinkChase. 2022-10-25 07:07:01 +02:00
Christoph Oelckers
648ff00caf - floatified houndThinkChase. 2022-10-25 07:07:01 +02:00
Christoph Oelckers
71c1840566 - floatified handThinkChase 2022-10-25 07:07:01 +02:00
Christoph Oelckers
21afef19e9 - floatified gillBeastSwimChase. 2022-10-25 07:07:00 +02:00
Christoph Oelckers
5d78c81acb - 11x replacing the same pattern. 2022-10-25 07:07:00 +02:00
Christoph Oelckers
e3cc9879eb - floatified ghostThinkGoto 2022-10-25 07:07:00 +02:00
Christoph Oelckers
d3e8db8861 - floatified ghostThinkTarget 2022-10-25 07:07:00 +02:00
Christoph Oelckers
babb45318f - floatified ghostBlastSeqCallback 2022-10-25 07:07:00 +02:00
Christoph Oelckers
491c5628ff - floatified ghostThrowSeqCallback 2022-10-25 07:07:00 +02:00
Christoph Oelckers
fbf49bc247 - floatified ghostSlashSeqCallback 2022-10-25 07:07:00 +02:00
Christoph Oelckers
81456e4d33 - floatified wave parameters for TranslateSector 2022-10-25 07:06:59 +02:00
Christoph Oelckers
12bfd830c9 - removed the wrappers. 2022-10-25 07:06:59 +02:00
Christoph Oelckers
4eeeb00c1b - floatified VDoorBusy 2022-10-25 07:06:59 +02:00
Christoph Oelckers
55dea1d348 - floatified VSpriteBusy 2022-10-25 07:06:59 +02:00
Christoph Oelckers
d96c7c64c7 - floatified VCrushBusy 2022-10-25 07:06:59 +02:00
Christoph Oelckers
b9f192d6ee - floatified plane stuff in ZTranslateSector 2022-10-25 07:06:59 +02:00
Christoph Oelckers
23f2e5a7b2 - use floats for floor/ceiling conditions. 2022-10-25 07:06:59 +02:00
Christoph Oelckers
3b88f7db3e - floatified the variables. 2022-10-25 07:06:58 +02:00
Christoph Oelckers
4114f21323 - added wrapper function for these variables. 2022-10-25 07:06:58 +02:00
Christoph Oelckers
6dbb5a0b8c - renamed 4 fields in XSECTOR 2022-10-25 07:06:58 +02:00
Christoph Oelckers
9c698c6044 - 3 minor changes. 2022-10-25 07:06:58 +02:00
Christoph Oelckers
89cfb87072 - floatified 2 functions in aigarg.cpp 2022-10-25 07:06:58 +02:00
Christoph Oelckers
9d19b61cf9 - 4 functions in aicult.cpp 2022-10-25 07:06:58 +02:00
Christoph Oelckers
64619478fa - floatified 2 functions in aicaleb.cpp 2022-10-25 07:06:58 +02:00
Christoph Oelckers
1c23a2aa32 - floatified SeqAttackCallback 2022-10-25 07:06:58 +02:00
Christoph Oelckers
37ca106417 - floatified gargThinkTarget 2022-10-25 07:06:58 +02:00
Christoph Oelckers
8d18c005de - floatified ThrowSSeqCallback 2022-10-25 07:06:57 +02:00
Christoph Oelckers
a7b23fe9ea - floatified BlastSSeqCallback 2022-10-25 07:06:57 +02:00
Christoph Oelckers
8b2ddfadf6 - restore code as it was, buggy as it may be. 2022-10-25 07:06:57 +02:00
Christoph Oelckers
0399cf17fe - floatified cerberusBurnSeqCallback2 2022-10-25 07:06:57 +02:00
Christoph Oelckers
6c77d1d5d3 - floatified cerberusBiteSeqCallback 2022-10-25 07:06:57 +02:00
Christoph Oelckers
ca1e9efbea - 2 functions in aicaleb.cpp. 2022-10-25 07:06:57 +02:00
Christoph Oelckers
5e2e53d684 - more CanMove fixes, plus salvaging the rest of the old commit.
CanMove twice uses the texel-based nRange as a Build-unit value, this caused strange problems with the initial floatification.
2022-10-25 07:06:57 +02:00
Christoph Oelckers
138ba53ace - fix the HitScan call in CanMove.
This was picking an unexpected overload because the second parameter was a float but with an integer-range value.
2022-10-25 07:06:57 +02:00
Mitchell Richters
180d020620 - Blood: Floatified CanMove(). 2022-10-25 07:06:56 +02:00
Christoph Oelckers
2af18ec277 - remap all easy HitScan calls with zero range to the new base function. 2022-10-25 07:06:56 +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
Christoph Oelckers
1d8dccca04 - floatified HitScan and use a proper vector calculation for hitscangoal.
This should be on the trace, not use a totally different direction.
2022-10-25 07:06:56 +02:00
Christoph Oelckers
a4ec938526 - renamed HitScan to HitScan_ as a refactoring aid. 2022-10-25 07:06:56 +02:00
Christoph Oelckers
049ced83f6 - floatified cerberusBurnSeqCallback 2022-10-25 07:06:56 +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
41bbbd9df5 - Remove all remaining uses of fixedhoriz::asbuild(). 2022-10-25 07:06:55 +02:00
Mitchell Richters
92798b5a07 - Remove most buildhoriz() calls. 2022-10-25 07:06:55 +02:00
Mitchell Richters
293a71ed55 - Remove horizon from gi->WarpToCoords() since we don't even print the horizon in our stats. 2022-10-25 07:06:54 +02:00
Mitchell Richters
ca8f8d6d36 - Remove all remaining q16horiz() calls, also correcting a long-standing Duke bug. 2022-10-25 07:06:54 +02:00
Mitchell Richters
8697e5f054 - Replace all q16horiz(0) calls. 2022-10-25 07:06:54 +02:00
Mitchell Richters
22a9f89b64 - Remove all uses of fixedhoriz::asq16(). 2022-10-25 07:06:54 +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
Mitchell Richters
4ef9ec93ea - Remove fixedhoriz::asbuildf() and associated buildf friend.
* The new friend `tanhoriz()` is just for the input code for now.
2022-10-25 07:06:53 +02:00
Mitchell Richters
d8a6471680 - Add fixedhoriz::Tan() and replace most asbuildf() calls with it. 2022-10-25 07:06:53 +02:00
Mitchell Richters
d00108b9cf - Blood: Repair life leach turret mode where target's position and not velocity was used. 2022-10-25 07:06:52 +02:00
Mitchell Richters
ef4b72d18e - Blood: Floatify LifeLeechOperate().
* These divscales hurt my soul...
2022-10-25 07:06:52 +02:00
Christoph Oelckers
1255fda4c1 - two more functions in aibeast.cpp.
Note that the eyeHeight adjustment was removed because it was applied incorrectly and essentially non-functional.
eyeHeight is in world coordinates but was used as if it was Q24.8, resulting in a value too small to be significant.
2022-10-25 07:06:52 +02:00
Christoph Oelckers
e9fc0d09a9 - renaming things in StompSeqCallback 2022-10-25 07:06:52 +02:00
Christoph Oelckers
0ed4b8b01a - Blood: floatified SlashSeqCallback 2022-10-25 07:06:52 +02:00
Christoph Oelckers
c1da02de8a - Blood: floatified calebThinkSwimChase 2022-10-25 07:06:52 +02:00
Christoph Oelckers
c85a95ca03 - Blood: floatified cultThinkChase
Welcome to spaghetti-land, this is one 400 line monstrosity. :(
2022-10-25 07:06:52 +02:00
Christoph Oelckers
3055a1e5a7 - Blood: renamed functions and floatified cultThrowSeqCallback3 2022-10-25 07:06:52 +02:00
Christoph Oelckers
fd7c47ce2b - Blood: floatified cultThrowSeqCallback 2022-10-25 07:06:51 +02:00
Christoph Oelckers
c1e0e04016 - Blood: floatified cerberusThinkChase 2022-10-25 07:06:51 +02:00
Christoph Oelckers
79d17dc645 - floatified cerberusThinkTarget 2022-10-25 07:06:51 +02:00
Christoph Oelckers
d3c3363e92 - Blood: floatified calebThinkChase 2022-10-25 07:06:51 +02:00
Christoph Oelckers
9394691601 - Blood: floatified burnThinkGoto 2022-10-25 07:06:51 +02:00
Christoph Oelckers
3c2239533b - Blood: floatified burnThinkChase 2022-10-25 07:06:51 +02:00
Christoph Oelckers
f2f74fc239 - Blood: floatified eelThinkChase 2022-10-25 07:06:51 +02:00
Christoph Oelckers
beefa700b7 - Blood: floatified eelThinkPonder 2022-10-25 07:06:51 +02:00
Christoph Oelckers
0672a1a958 - replaced mapangle(85) with DAngle15. 2022-10-25 07:06:50 +02:00
Christoph Oelckers
2c46d66c1e - Blood: floatified beastThinkChase 2022-10-25 07:06:50 +02:00
Christoph Oelckers
105e20a32d - eliminated lots of approxDist calls.
Only the really simple ones.
2022-10-25 07:06:50 +02:00
Christoph Oelckers
dcfac1c930 - handle a few nAccel values that do not match the generic pattern 2022-10-25 07:06:50 +02:00
Christoph Oelckers
9927d5e25d - always use FrontSpeed() access function for nAccel.
This gets rid of a large amount of FixedToFloat calls.
2022-10-25 07:06:50 +02:00
Christoph Oelckers
8b96a93e80 - turned TurnRange calculation into a subfunction.
This formula was used in 36 places
2022-10-25 07:06:50 +02:00
Christoph Oelckers
e309d05161 - use literal constant for this. 2022-10-25 07:06:50 +02:00
Christoph Oelckers
6a0b552352 - floatified first half of aibat.cpp.
Note: The scale factor for actFireVector calls with XY set per ToVector is 64. The vector being passed to it uses the same scale for Z as for XY.
This means that XY is 1/16384 of the fixed point vector and Z is 1/256, meaning the scale for XY must be 64x higher.
2022-10-25 07:06:50 +02:00
Christoph Oelckers
ca58e3fc6b - the rest of ai.cpp. 2022-10-25 07:06:49 +02:00
Christoph Oelckers
48cadbd392 remaining floatification on aiLookForTarget 2022-10-25 07:06:49 +02:00
Christoph Oelckers
fafb4cfc29 - remaining floatification on aiThinkTarget 2022-10-25 07:06:49 +02:00
Christoph Oelckers
298d029d55 - found one last place where an integer wrapper was called in actor.cpp 2022-10-25 07:06:49 +02:00
Christoph Oelckers
6c98a07a60 - elininated the actSpawnThing wrapper. 2022-10-25 07:06:49 +02:00
Christoph Oelckers
f7fe24b19e - some remaining cleanup on actor.cpp 2022-10-25 07:06:49 +02:00
Christoph Oelckers
b0160bb87c - removed the int vector in actCheckExplosion. 2022-10-25 07:06:49 +02:00
Christoph Oelckers
080d6969ec - Blood: floatified some smaller parts in actor.cpp 2022-10-25 07:06:49 +02:00
Christoph Oelckers
b29000c9e1 - this wasn't really a fixed point value - just some scaling factor, so it shouldn't use FixedToFloat. 2022-10-25 07:06:48 +02:00
Christoph Oelckers
0ef9527209 - eliminated the last uses of int_hitpos. 2022-10-25 07:06:48 +02:00
Christoph Oelckers
a655b3835f - like actFireVector, the direction vector needs to have unit length in 2D for actFireMissile as well.
May later be turned into a 3D unit vector for pitch correct missile movement.
2022-10-25 07:06:48 +02:00
Christoph Oelckers
5e4d45f6b8 - floatified actFireMissile 2022-10-25 07:06:48 +02:00
Christoph Oelckers
a070342f0c - floatified actFireThing 2022-10-25 07:06:48 +02:00
Christoph Oelckers
5fa27c2a72 - replaced the last set_int_ang calls. 2022-10-23 18:47:17 +02:00
Christoph Oelckers
4500fe6325 - Blood: replaced all calls to randomAngle with RandomAngle 2022-10-23 18:47:17 +02:00
Christoph Oelckers
a8cc6c1189 - floatified angles in useSectorWindGen plus two other set_int_ang. 2022-10-23 18:47:17 +02:00
Christoph Oelckers
a618161387 - floatified nnExtSpawnDude. 2022-10-23 18:47:16 +02:00
Christoph Oelckers
8505757d74 - floatified most of ProcessMotion. 2022-10-23 18:47:16 +02:00
Christoph Oelckers
a90eb853d5 - floatified fxBouncingSleeve and fxPodBloodSplat 2022-10-23 18:47:16 +02:00
Christoph Oelckers
c23d23ea60 - Blood: floatified fxBloodBits 2022-10-22 20:41:27 +02:00
Christoph Oelckers
fdb31fc2cc - missing declaration. 2022-10-22 20:41:27 +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
6c6fdaf332 - floatified actSpawnDude and removed its unused last parameter.
All callers left it at 0.
2022-10-22 20:41:26 +02:00
Christoph Oelckers
aa0b6bb077 - changed parameters in a few HitScan calls in condCheckSprite 2022-10-22 20:41:26 +02:00
Christoph Oelckers
fc011e847f - Blood: floatified actCheckTraps 2022-10-22 20:41:26 +02:00
Christoph Oelckers
8d1938b363 - Blood: cleaned up various angle and distance checks in AI code 2022-10-22 20:41:26 +02:00
Christoph Oelckers
e6cfb165f8 - converted all remaining add_int_bvel* calls. 2022-10-22 20:41:26 +02:00
Christoph Oelckers
068feae64e - floatified actFireVector. 2022-10-22 20:41:25 +02:00
Christoph Oelckers
5c6cac49c8 - changed a few vel setter calls. 2022-10-22 20:41:25 +02:00
Christoph Oelckers
e00eda6cb8 - Blood: floatified VectorScan.
The texture checks in here definitely need some more verification, though.
Doing a quick test looked ok, but I do not think this was enough.
2022-10-22 20:41:25 +02:00
Christoph Oelckers
3b76de7b7d - Blood: renamed actFireVector's arguments.
No way this can be refactored with names like a2, a3, a4 etc...
2022-10-22 20:41:25 +02:00
Christoph Oelckers
d1d68f1570 - handled the last remaining set_int_bvel* calls in nnexts.cpp. 2022-10-22 20:41:25 +02:00
Christoph Oelckers
88feac4272 - floatified useVelocityChanger 2022-10-22 20:41:25 +02:00
Christoph Oelckers
044b9e555b - floatified a bit more of nnExtProcessSuperSprites 2022-10-22 20:41:25 +02:00