summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2026-05-22 18:43:02 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2026-05-22 18:43:02 -0400
commit47e01ede220d41cf73edf76158f30ab8b2d8a5ba (patch)
treeb52b2dceb49c7c5b94c3eb91523d4c3798c0f882 /include
parent95fac0fd639e16cbe3cc99191a25bc411fcbef99 (diff)
Fix d_a_npc_md inline usage
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/JGeometry.h5
-rw-r--r--include/JSystem/TPosition3.h4
-rw-r--r--include/SSystem/SComponent/c_cc_d.h4
-rw-r--r--include/d/actor/d_a_npc_md.h30
-rw-r--r--include/d/d_npc.h4
-rw-r--r--include/m_Do/m_Do_mtx.h2
6 files changed, 27 insertions, 22 deletions
diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h
index 0fba56ea..ecbdcbc4 100644
--- a/include/JSystem/JGeometry.h
+++ b/include/JSystem/JGeometry.h
@@ -57,8 +57,12 @@ template <>
struct TVec3<s16> : public SVec {
TVec3() {}
TVec3(const SVec& b) { set(b); }
+
+ template<typename s16>
TVec3(s16 x, s16 y, s16 z) { set(x, y, z); }
+ TVec3(int x, int y, int z) { set(x, y, z); }
+
void set(const SVec& vec) {
x = vec.x;
y = vec.y;
@@ -82,6 +86,7 @@ template <>
struct TVec3<f32> : public Vec {
TVec3() {}
+ template<typename f32>
TVec3(f32 x, f32 y, f32 z) { set(x, y, z); }
TVec3(const Vec& b) { set(b); }
diff --git a/include/JSystem/TPosition3.h b/include/JSystem/TPosition3.h
index 3ff7bb5b..2e77b4eb 100644
--- a/include/JSystem/TPosition3.h
+++ b/include/JSystem/TPosition3.h
@@ -20,7 +20,7 @@ struct SMatrix34C<f32> {
typedef f32 ArrType[4];
void set(const ArrType* src) { JMath::gekko_ps_copy12((f32*)data, (f32*)src); }
- operator ArrType*() { return data; }
+ operator ArrType*() const { return (ArrType*)data; }
operator const ArrType*() const { return data; }
};
@@ -37,4 +37,4 @@ typedef TPosition3<TRotation3<TMatrix34<SMatrix34C<f32> > > > TPosition3f32;
} // namespace JGeometry
-#endif \ No newline at end of file
+#endif
diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h
index 1fe678c3..0ed9dc13 100644
--- a/include/SSystem/SComponent/c_cc_d.h
+++ b/include/SSystem/SComponent/c_cc_d.h
@@ -182,7 +182,7 @@ class cCcD_SphAttr : public cCcD_ShapeAttr, public cM3dGSph {
public:
cCcD_SphAttr() {}
- inline void Set(const cCcD_SrcSphAttr& src) {
+ void Set(const cCcD_SrcSphAttr& src) {
cM3dGSph::Set(src.mSph);
}
@@ -216,7 +216,7 @@ STATIC_ASSERT(0x34 == sizeof(cCcD_SphAttr));
class cCcD_CylAttr : public cCcD_ShapeAttr, public cM3dGCyl {
public:
cCcD_CylAttr() {}
- inline void Set(const cCcD_SrcCylAttr& src) {
+ void Set(const cCcD_SrcCylAttr& src) {
cM3dGCyl::Set(src.mCyl);
}
diff --git a/include/d/actor/d_a_npc_md.h b/include/d/actor/d_a_npc_md.h
index 23d4543b..4c87e8bf 100644
--- a/include/d/actor/d_a_npc_md.h
+++ b/include/d/actor/d_a_npc_md.h
@@ -66,6 +66,8 @@ public:
void setBitStatus(u32 status) { cLib_onBit<u32>(m30F0, status); }
void clearStatus(u32 status) { cLib_offBit<u32>(m30F0, status); }
bool checkStatus(u32 status) { return cLib_checkBit<u32>(m30F0, status); }
+ void setStatus(u32 status) { m30F0 = status; }
+ void clearStatus() { m30F0 = 0; }
bool checkStatusFly() { return cLib_checkBit<u32>(m30F0, daMdStts_FLY); }
void onBitCamTagIn() { cLib_onBit<u32>(m30F0, daMdStts_CAM_TAG_IN); }
void offBitCamTagIn() { cLib_offBit<u32>(m30F0, daMdStts_CAM_TAG_IN); }
@@ -85,12 +87,12 @@ public:
void onLightBodyHit() { cLib_onBit<u32>(m30F0, daMdStts_LIGHT_BODY_HIT); }
void offLightBodyHit() { cLib_offBit<u32>(m30F0, daMdStts_LIGHT_BODY_HIT); }
bool isLightBodyHit() { return cLib_checkBit<u32>(m30F0, daMdStts_LIGHT_BODY_HIT); }
- bool isOldLightBodyHit() { return cLib_checkBit<u32>(m30F0, daMdStts_LIGHT_BODY_HIT); }
void onDefaultTalkXY() { cLib_onBit<u32>(m30F0, daMdStts_DEFAULT_TALK_XY); }
void offDefaultTalkXY() { cLib_offBit<u32>(m30F0, daMdStts_DEFAULT_TALK_XY); }
bool isDefaultTalkXY() { return cLib_checkBit<u32>(m30F0, daMdStts_DEFAULT_TALK_XY); }
- void setOldLightBodyHit() { m3140 = isLightBodyHit(); }
+ bool isOldLightBodyHit() { return mOldLightBodyHit; }
+ void setOldLightBodyHit() { mOldLightBodyHit = isLightBodyHit(); }
void setTypeEdaichi() { mType = 4; }
void setTypeM_Dai() { mType = 5; }
@@ -105,12 +107,18 @@ public:
BOOL isTypeM_DaiB() { return mType == 6; }
BOOL isTypeShipRide() { return mType == 7; }
- s16 getHead_x() { return mJntCtrl.getHead_x(); }
- s16 getHead_y() { return mJntCtrl.getHead_y(); }
- s16 getBackbone_x() { return mJntCtrl.getBackbone_x(); }
- s16 getBackbone_y() { return mJntCtrl.getBackbone_y(); }
+ s16 getHead_x() { return mJntCtrl.mAngles[0][0]; }
+ s16 getHead_y() { return mJntCtrl.mAngles[0][1]; }
+ s16 getBackbone_x() { return mJntCtrl.mAngles[1][0]; }
+ s16 getBackbone_y() { return mJntCtrl.mAngles[1][1]; }
s16 getWaistRotX() { return m3114; }
s16 getWaistRotY() { return m3116; }
+ void clearJntAng() {
+ mJntCtrl.mAngles[0][1] = 0; // Head_y
+ mJntCtrl.mAngles[0][0] = 0; // Head_x
+ mJntCtrl.mAngles[1][1] = 0; // BackBone_y
+ mJntCtrl.mAngles[1][0] = 0; // BackBone_x
+ }
s8 getArmRJntNum() { return m_armR_jnt_num; }
s8 getArmRlocJntNum() { return m_armRloc_jnt_num; }
@@ -149,18 +157,10 @@ public:
mpArmMorf->setAnmRate(mRunRate);
}
- void setStatus(u32 status) { m30F0 = status; }
s16 getFlyingTimer() { return m_flyingTimer; }
void setFlyingTimer(s16 value) { m_flyingTimer = value; }
void calcFlyingTimer() { cLib_calcTimer(&m_flyingTimer); }
u8 checkBitEffectStatus(u8 bit) { return m3135 & bit; }
- void clearJntAng() {
- mJntCtrl.setHead_y(0);
- mJntCtrl.setHead_x(0);
- mJntCtrl.setBackBone_y(0);
- mJntCtrl.setBackBone_x(0);
- }
- void clearStatus() { setStatus(0); }
u8 getTalkType() { return mType; }
void setTalkType(u8 type) { mType = type; }
void setBitEffectStatus(u8 bit) { cLib_onBit<u8>(m3135, bit); }
@@ -424,7 +424,7 @@ public:
/* 0x313D */ u8 m313D;
/* 0x313E */ u8 m313E;
/* 0x313F */ s8 m313F;
- /* 0x3140 */ bool m3140;
+ /* 0x3140 */ bool mOldLightBodyHit;
/* 0x3141 */ u8 m3141[0x3144 - 0x3141];
/* 0x3144 */ s16 m3144;
/* 0x3146 */ s16 m3146;
diff --git a/include/d/d_npc.h b/include/d/d_npc.h
index b7afff59..a1107805 100644
--- a/include/d/d_npc.h
+++ b/include/d/d_npc.h
@@ -65,8 +65,8 @@ public:
public:
dNpc_JntCtrl_c() {
- mbBackBoneLock = false;
- mbHeadLock = false;
+ offBackBoneLock();
+ offHeadLock();
}
s8 getHeadJntNum() { return mHeadJntNum; }
diff --git a/include/m_Do/m_Do_mtx.h b/include/m_Do/m_Do_mtx.h
index f0ec160d..4880cf4b 100644
--- a/include/m_Do/m_Do_mtx.h
+++ b/include/m_Do/m_Do_mtx.h
@@ -43,7 +43,7 @@ inline void mDoMtx_multVec(const Mtx m, const Vec* src, Vec* dst) {
MTXMultVec(m, src, dst);
}
-inline void mDoMtx_multVecArray(Mtx m, const Vec* src, Vec* dst, u32 count) {
+inline void mDoMtx_multVecArray(const Mtx m, const Vec* src, Vec* dst, u32 count) {
MTXMultVecArray(m, src, dst, count);
}