summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-11-28 00:34:18 -0500
committerGitHub <noreply@github.com>2025-11-27 21:34:18 -0800
commit4fb3af91b8aff0b9042affa4d430aa3375199973 (patch)
tree2b93dea8856e149b5145a2dcc9965df38081e5f7 /include
parenta089a1d21c641cab569facace79ec646132a6d34 (diff)
Various small matches (#2879)
* Misc debug matches * Fix JASBasicWaveBank weak func order * Remove more dol2asm stuff, fix missing includes * Some data fixes * Update comments * d_file_sel_warning is already OK * Fix Z2 splits * Fix movebox namespace * Fix inlining issue in m_Do_ext * Fix Z2 splits for P and J
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DAnimation.h4
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DJoint.h32
-rw-r--r--include/JSystem/J3DGraphBase/J3DMatBlock.h2
-rw-r--r--include/JSystem/J3DGraphBase/J3DShape.h2
-rw-r--r--include/JSystem/JAudio2/JASBasicWaveBank.h23
-rw-r--r--include/JSystem/JAudio2/JASWaveInfo.h25
-rw-r--r--include/JSystem/JKernel/JKRHeap.h1
-rw-r--r--include/d/actor/d_a_npc2.h3
-rw-r--r--include/d/actor/d_a_npc4.h1
-rw-r--r--include/m_Do/m_Do_mtx.h10
10 files changed, 63 insertions, 40 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
index 37851892d5..b614e06b11 100644
--- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h
+++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
@@ -929,6 +929,7 @@ public:
J3DFrameCtrl() { this->init(0); }
void init(s16);
+ void init(int endFrame) { init((s16)endFrame); }
BOOL checkPass(f32);
void update();
virtual ~J3DFrameCtrl() {}
@@ -987,8 +988,7 @@ struct J3DMtxCalcAnimationAdaptorDefault : public J3DMtxCalcAnimationAdaptorBase
J3DTransformInfo transform;
J3DTransformInfo* transform_p;
if (pMtxCalc->getAnmTransform() != NULL) {
- u16 jnt_no = J3DMtxCalc::getJoint()->getJntNo();
- pMtxCalc->getAnmTransform()->getTransform(jnt_no, &transform);
+ pMtxCalc->getAnmTransform()->getTransform(J3DMtxCalc::getJoint()->getJntNo(), &transform);
transform_p = &transform;
} else {
transform_p = &J3DMtxCalc::getJoint()->getTransformInfo();
diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h
index 9510ceb415..2ddff2945b 100644
--- a/include/JSystem/J3DGraphAnimator/J3DJoint.h
+++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h
@@ -19,12 +19,27 @@ public:
/* 80325D1C */ static void setMtxBuffer(J3DMtxBuffer*);
/* 8000D948 */ virtual ~J3DMtxCalc() {}
- /* 80014E90 */ virtual void setAnmTransform(J3DAnmTransform*) {}
- /* 80014E9C */ virtual J3DAnmTransform* getAnmTransform() { return NULL; }
- /* 80014E8C */ virtual void setAnmTransform(u8, J3DAnmTransform*) {}
- /* 80014E94 */ virtual J3DAnmTransform* getAnmTransform(u8) { return NULL; }
- /* 80014EA4 */ virtual void setWeight(u8, f32) {}
- /* 80014EA8 */ virtual f32 getWeight(u8) const { return 0.0f; }
+ /* 80014E90 */ virtual void setAnmTransform(J3DAnmTransform*) {
+ JUT_ASSERT_MSG(127, FALSE, "You cannot use this method");
+ }
+ /* 80014E9C */ virtual J3DAnmTransform* getAnmTransform() {
+ JUT_ASSERT_MSG(131, FALSE, "You cannot use this method");
+ return NULL;
+ }
+ /* 80014E8C */ virtual void setAnmTransform(u8, J3DAnmTransform*) {
+ JUT_ASSERT_MSG(137, FALSE, "You cannot use this method");
+ }
+ /* 80014E94 */ virtual J3DAnmTransform* getAnmTransform(u8) {
+ JUT_ASSERT_MSG(141, FALSE, "You cannot use this method");
+ return NULL;
+ }
+ /* 80014EA4 */ virtual void setWeight(u8, f32) {
+ JUT_ASSERT_MSG(147, FALSE, "You cannot use this method");
+ }
+ /* 80014EA8 */ virtual f32 getWeight(u8) const {
+ JUT_ASSERT_MSG(152, FALSE, "You cannot use this method");
+ return 0.0f;
+ }
virtual void init(const Vec& param_0, const Mtx&) = 0;
virtual void calc() = 0;
@@ -125,7 +140,10 @@ public:
J3DMtxCalcNoAnm() {}
virtual ~J3DMtxCalcNoAnm() {}
virtual void init(const Vec& param_0, const Mtx& param_1) { B::init(param_0, param_1); }
- virtual void calc() { A::calcTransform(mJoint->getTransformInfo()); }
+ virtual void calc() {
+ J3DTransformInfo& transInfo = getJoint()->getTransformInfo();
+ A::calcTransform(transInfo);
+ }
};
/**
diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h
index 6d019321c5..423ece548a 100644
--- a/include/JSystem/J3DGraphBase/J3DMatBlock.h
+++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h
@@ -1641,7 +1641,7 @@ struct J3DIndTexMtx : public J3DIndTexMtxInfo {
J3DIndTexMtx(J3DIndTexMtxInfo const& info) { *(J3DIndTexMtxInfo*)this = info; }
/* 8000E064 */ ~J3DIndTexMtx() {}
void load(u32 param_1) const {
- J3DGDSetIndTexMtx((GXIndTexMtxID)(param_1 + 1), (Mtx3P)field_0x0, field_0x18);
+ J3DGDSetIndTexMtx((GXIndTexMtxID)(param_1 + GX_ITM_0), (Mtx3P)field_0x0, field_0x18);
}
}; // Size: 0x1C
diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h
index 8524af4cf9..9331f74cb5 100644
--- a/include/JSystem/J3DGraphBase/J3DShape.h
+++ b/include/JSystem/J3DGraphBase/J3DShape.h
@@ -144,7 +144,7 @@ public:
void onFlag(u32 flag) { mFlags |= flag; }
void offFlag(u32 flag) { mFlags &= ~flag; }
- bool checkFlag(u32 flag) const { return (mFlags & flag) != 0; }
+ bool checkFlag(u32 flag) const { return (mFlags & flag) ? true : false; }
void setMaterial(J3DMaterial* pMaterial) {
J3D_ASSERT_NULLPTR(509, pMaterial != NULL);
diff --git a/include/JSystem/JAudio2/JASBasicWaveBank.h b/include/JSystem/JAudio2/JASBasicWaveBank.h
index 1c4f69d761..cc6db20d3f 100644
--- a/include/JSystem/JAudio2/JASBasicWaveBank.h
+++ b/include/JSystem/JAudio2/JASBasicWaveBank.h
@@ -8,29 +8,6 @@
* @ingroup jsystem-jaudio
*
*/
-class JASWaveHandle {
-public:
- virtual ~JASWaveHandle() {};
- virtual const JASWaveInfo* getWaveInfo() const = 0;
- virtual int getWavePtr() const = 0;
-};
-
-/**
- * @ingroup jsystem-jaudio
- *
- */
-class JASWaveBank {
-public:
- /* 80298B88 */ virtual ~JASWaveBank() {};
- virtual JASWaveHandle* getWaveHandle(u32) const = 0;
- virtual JASWaveArc* getWaveArc(u32) = 0;
- virtual u32 getArcCount() const = 0;
-};
-
-/**
- * @ingroup jsystem-jaudio
- *
- */
struct JASBasicWaveBank : public JASWaveBank {
struct TWaveHandle : public JASWaveHandle {
/* 80298B64 */ int getWavePtr() const;
diff --git a/include/JSystem/JAudio2/JASWaveInfo.h b/include/JSystem/JAudio2/JASWaveInfo.h
index 84f3814fb0..7db3836400 100644
--- a/include/JSystem/JAudio2/JASWaveInfo.h
+++ b/include/JSystem/JAudio2/JASWaveInfo.h
@@ -3,6 +3,8 @@
#include "dolphin/types.h"
+class JASWaveArc;
+
/**
* @ingroup jsystem-jaudio
*
@@ -29,4 +31,27 @@ struct JASWaveInfo {
static u32 one;
};
+/**
+ * @ingroup jsystem-jaudio
+ *
+ */
+class JASWaveHandle {
+public:
+ virtual ~JASWaveHandle() {}
+ virtual const JASWaveInfo* getWaveInfo() const = 0;
+ virtual int getWavePtr() const = 0;
+};
+
+/**
+ * @ingroup jsystem-jaudio
+ *
+ */
+class JASWaveBank {
+public:
+ /* 80298B88 */ virtual ~JASWaveBank() {}
+ virtual JASWaveHandle* getWaveHandle(u32) const = 0;
+ virtual JASWaveArc* getWaveArc(u32) = 0;
+ virtual u32 getArcCount() const = 0;
+};
+
#endif /* JASWAVEINFO_H */
diff --git a/include/JSystem/JKernel/JKRHeap.h b/include/JSystem/JKernel/JKRHeap.h
index d64a598233..afea773716 100644
--- a/include/JSystem/JKernel/JKRHeap.h
+++ b/include/JSystem/JKernel/JKRHeap.h
@@ -127,7 +127,6 @@ protected:
/* 0x5C */ JSUList<JKRDisposer> mDisposerList;
/* 0x68 */ bool mErrorFlag;
/* 0x69 */ bool mInitFlag;
- /* 0x6A */ u8 padding_0x6a[2];
public:
static bool initArena(char** memory, u32* size, int maxHeaps);
diff --git a/include/d/actor/d_a_npc2.h b/include/d/actor/d_a_npc2.h
index e58a8c1b7b..69aee91aa5 100644
--- a/include/d/actor/d_a_npc2.h
+++ b/include/d/actor/d_a_npc2.h
@@ -1,7 +1,10 @@
#ifndef D_A_NPC2
#define D_A_NPC2
+#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h"
+#include "d/d_bg_s_acch.h"
#include "d/d_bg_s_movebg_actor.h"
+#include "d/d_cc_d.h"
#include "d/d_msg_flow.h"
#include "d/d_path.h"
diff --git a/include/d/actor/d_a_npc4.h b/include/d/actor/d_a_npc4.h
index 69f38f4a7c..2ff7c6386a 100644
--- a/include/d/actor/d_a_npc4.h
+++ b/include/d/actor/d_a_npc4.h
@@ -9,6 +9,7 @@
#include "f_op/f_op_actor.h"
#include "f_pc/f_pc_base.h"
#include "m_Do/m_Do_ext.h"
+#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h"
class daNpcF_ActorMngr_c {
private:
diff --git a/include/m_Do/m_Do_mtx.h b/include/m_Do/m_Do_mtx.h
index d6b2fef63e..4726c89168 100644
--- a/include/m_Do/m_Do_mtx.h
+++ b/include/m_Do/m_Do_mtx.h
@@ -28,8 +28,12 @@ inline void mDoMtx_multVecSR(const Mtx m, const Vec* src, Vec* dst) {
MTXMultVecSR(m, src, dst);
}
+inline void mDoMtx_concat(const Mtx a, const Mtx b, Mtx c) {
+ PSMTXConcat(a, b, c);
+}
+
inline void cMtx_concat(const Mtx a, const Mtx b, Mtx ab) {
- MTXConcat(a, b, ab);
+ mDoMtx_concat(a, b, ab);
}
inline void cMtx_scale(Mtx m, f32 x, f32 y, f32 z) {
@@ -126,10 +130,6 @@ inline void mDoMtx_identity(Mtx m) {
PSMTXIdentity(m);
}
-inline void mDoMtx_concat(const Mtx a, const Mtx b, Mtx c) {
- PSMTXConcat(a, b, c);
-}
-
inline void mDoMtx_inverse(const Mtx a, Mtx b) {
MTXInverse(a, b);
}