summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-12-01 16:33:12 -0500
committerGitHub <noreply@github.com>2025-12-01 13:33:12 -0800
commit1e2d9151a0ba815d9ebe11dcc0a66d037fb41449 (patch)
tree70a3d7e5b758f302c0ac9126fc57533516e7a2bb /include
parent03efb3f79a551172b1e724eff26d8c8116f96ca5 (diff)
d_a_tag_kmsg OK (#2901)
Diffstat (limited to 'include')
-rw-r--r--include/d/actor/d_a_tag_kmsg.h42
1 files changed, 19 insertions, 23 deletions
diff --git a/include/d/actor/d_a_tag_kmsg.h b/include/d/actor/d_a_tag_kmsg.h
index 7b75e3d43c..7fe9c21a92 100644
--- a/include/d/actor/d_a_tag_kmsg.h
+++ b/include/d/actor/d_a_tag_kmsg.h
@@ -59,50 +59,46 @@ public:
u32 getFlowNodeNo() {
u16 rv = home.angle.z;
- if (rv == 0xffff) {
- return -1;
- }
- return rv;
+ return rv == 0xFFFF ? -1 : rv;
}
u8 getBitSW() {
- return home.angle.x;
+ u16 r31 = home.angle.x;
+ return (u16)(r31 & 0xFF);
}
u32 getTalkAngle() {
- u32 talkAngle = (fopAcM_GetParam(this) >> 5) & 0x7;
- if (talkAngle == 7) {
- return 0;
- } else {
- return talkAngle > 6 ? 6 : talkAngle;
- }
+ u32 talkAngle = (fopAcM_GetParam(this) & 0xE0) >> 5;
+ return talkAngle == 7 ? 0 :
+ talkAngle > 6 ? 6 :
+ talkAngle;
}
u32 getTalkDis() {
- u32 talkDis = fopAcM_GetParam(this) & 0x1f;
- if (talkDis == 0x1f) {
- return 0;
- } else {
- return talkDis > 0x13 ? 0x13 : talkDis;
- }
+ u32 talkDis = fopAcM_GetParam(this) & 0x1F;
+ return talkDis == 0x1F ? 0 :
+ talkDis > 0x13 ? 0x13 :
+ talkDis;
}
f32 getAttnPosOffset() {
u32 attnPosOffset = (fopAcM_GetParam(this) & 0xff0000) >> 0x10;
- if (attnPosOffset == 0xff) {
+ if (attnPosOffset == 0xFF) {
return G_CM3D_F_INF;
- } else {
- return attnPosOffset;
}
+ f32 f31 = attnPosOffset;
+ return f31;
}
- u32 getChkType() {
- return home.angle.x & 0x8000;
+ u8 getChkType() {
+ u16 r31 = home.angle.x;
+ return (bool)(r31 & 0x8000);
}
f32 getEyePosOffset() {
u32 eyeOffset = (fopAcM_GetParam(this) & 0xff00) >> 8;
- return (eyeOffset == 0xff) ? 0 : eyeOffset;
+ f32 f31 = eyeOffset == 0xFF ? 0 : eyeOffset;
+ return f31;
}
};