summaryrefslogtreecommitdiff
path: root/src/d/d_npc_lib.cpp
diff options
context:
space:
mode:
authorroeming <brother64youyou@gmail.com>2026-02-20 05:48:29 -0500
committerGitHub <noreply@github.com>2026-02-20 02:48:29 -0800
commit0558bde1e61374f5a1b54453f07fe6cc15525bc1 (patch)
treec1ba397dbde72c71a58a0f15e895aad540b25768 /src/d/d_npc_lib.cpp
parent95c3626771d589bb8323eb81cf740ecd23e379b5 (diff)
Big cast cleanup (#3076)
* Big cast cleanup * fix for name conflict * rename header * rename cast macros * fix rename mistake --------- Co-authored-by: roeming <roeming@users.noreply.github.com>
Diffstat (limited to 'src/d/d_npc_lib.cpp')
-rw-r--r--src/d/d_npc_lib.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/d/d_npc_lib.cpp b/src/d/d_npc_lib.cpp
index f29d8720ad..1b735bf253 100644
--- a/src/d/d_npc_lib.cpp
+++ b/src/d/d_npc_lib.cpp
@@ -82,8 +82,8 @@ void dNpcLib_lookat_c::action(cXyz param_0, cXyz param_1, fopAc_ac_c* param_2, M
sp16 = -cM_atan2s(sp78.y, sp78.absXZ());
sp14 = cM_atan2s(sp78.x, sp78.z);
- field_0x4c[i].x += (s16)(var_f31 * (f32)(sp1A - sp16));
- field_0x4c[i].y += (s16)(var_f31 * (f32)(sp18 - sp14));
+ ANGLE_ADD(field_0x4c[i].x, var_f31 * (f32)(sp1A - sp16));
+ ANGLE_ADD(field_0x4c[i].y, var_f31 * (f32)(sp18 - sp14));
limitter(&field_0x4c[i].x, field_0x34[i].x, field_0x94[i].x, field_0x7c[i].x);
limitter(&field_0x4c[i].y, field_0x34[i].y, field_0x94[i].y, field_0x7c[i].y);
@@ -157,7 +157,7 @@ int dNpcLib_lookat_c::limitter(s16* o_value, s16 param_1, s16 param_2, s16 param
if (param_2 <= param_1) {
*o_value = 0;
} else {
- *o_value -= (s16)(limit - param_2);
+ S16_SUB(*o_value, limit - param_2);
rt = TRUE;
}
}
@@ -166,7 +166,7 @@ int dNpcLib_lookat_c::limitter(s16* o_value, s16 param_1, s16 param_2, s16 param
if (param_1 <= param_3) {
*o_value = 0;
} else {
- *o_value -= (s16)(limit - param_3);
+ S16_SUB(*o_value, limit - param_3);
rt = TRUE;
}
}