diff options
| author | Jcw87 <Jcw87@users.noreply.github.com> | 2026-01-18 17:59:57 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-18 17:59:57 -0800 |
| commit | 87a3705039533b309a04baaaa0f99010b5d71c00 (patch) | |
| tree | 2dc2beb45a2b7b6a1738126a0c11c966c66a535c /include/JSystem | |
| parent | 52a1e1363a4b91bc49f7994a553d16b90d969619 (diff) | |
m_Do debug (#3052)
* m_Do debug
* m_Do wii data
Diffstat (limited to 'include/JSystem')
| -rw-r--r-- | include/JSystem/J2DGraph/J2DOrthoGraph.h | 3 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DAnimation.h | 49 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DJoint.h | 48 | ||||
| -rw-r--r-- | include/JSystem/J3DGraphAnimator/J3DJointTree.h | 1 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRMemArchive.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTConsole.h | 27 |
6 files changed, 66 insertions, 64 deletions
diff --git a/include/JSystem/J2DGraph/J2DOrthoGraph.h b/include/JSystem/J2DGraph/J2DOrthoGraph.h index e6a01f34e0..385fc9a357 100644 --- a/include/JSystem/J2DGraph/J2DOrthoGraph.h +++ b/include/JSystem/J2DGraph/J2DOrthoGraph.h @@ -24,8 +24,7 @@ public: const JGeometry::TBox2<f32>* getOrtho() const { return &mOrtho; } void setOrtho(f32 x, f32 y, f32 width, f32 height, f32 far, f32 near) { - JGeometry::TBox2<f32> ortho(x, y, x + width, y + height); - setOrtho(ortho, far, near); + setOrtho(JGeometry::TBox2<f32>(x, y, x + width, y + height), far, near); } private: diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h index d5c0bc94c3..041ce31875 100644 --- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h +++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h @@ -1,7 +1,6 @@ #ifndef J3DANIMATION_H #define J3DANIMATION_H -#include "JSystem/J3DGraphAnimator/J3DJoint.h" #include "JSystem/J3DGraphAnimator/J3DModelData.h" #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JUtility/JUTNameTab.h" @@ -978,52 +977,4 @@ public: /* 0x10 */ f32 mFrame; }; // Size: 0x14 -struct J3DMtxCalcAnmBase: public J3DMtxCalc { - J3DMtxCalcAnmBase(J3DAnmTransform* pAnmTransform) { mAnmTransform = pAnmTransform; } - ~J3DMtxCalcAnmBase() {} - J3DAnmTransform* getAnmTransform() { return mAnmTransform; } - void setAnmTransform(J3DAnmTransform* pAnmTransform) { mAnmTransform = pAnmTransform; } - - J3DAnmTransform* mAnmTransform; -}; - -struct J3DMtxCalcAnimationAdaptorBase { - J3DMtxCalcAnimationAdaptorBase() {} - void change(J3DAnmTransform*) {} -}; - -template <typename A0> -struct J3DMtxCalcAnimationAdaptorDefault : public J3DMtxCalcAnimationAdaptorBase { - J3DMtxCalcAnimationAdaptorDefault(J3DAnmTransform* pAnmTransform) {} - - void calc(J3DMtxCalcAnmBase* pMtxCalc) { - J3DTransformInfo transform; - J3DTransformInfo* transform_p; - if (pMtxCalc->getAnmTransform() != NULL) { - pMtxCalc->getAnmTransform()->getTransform(J3DMtxCalc::getJoint()->getJntNo(), &transform); - transform_p = &transform; - } else { - transform_p = &J3DMtxCalc::getJoint()->getTransformInfo(); - } - - A0::calcTransform(*transform_p); - } -}; - -template <typename A0, typename B0> -struct J3DMtxCalcAnimation : public J3DMtxCalcAnmBase { - J3DMtxCalcAnimation(J3DAnmTransform* pAnmTransform) : J3DMtxCalcAnmBase(pAnmTransform), field_0x8(pAnmTransform) {} - ~J3DMtxCalcAnimation() {} - - void setAnmTransform(J3DAnmTransform* pAnmTransform) { - mAnmTransform = pAnmTransform; - field_0x8.change(pAnmTransform); - } - - void init(const Vec& param_0, const Mtx& param_1) { B0::init(param_0, param_1); } - void calc() { field_0x8.calc(this); } - - A0 field_0x8; -}; - #endif /* J3DANIMATION_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h index a1104d170f..eeecdabbd4 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJoint.h +++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h @@ -145,6 +145,54 @@ public: } }; +struct J3DMtxCalcAnmBase: public J3DMtxCalc { + J3DMtxCalcAnmBase(J3DAnmTransform* pAnmTransform) { mAnmTransform = pAnmTransform; } + ~J3DMtxCalcAnmBase() {} + J3DAnmTransform* getAnmTransform() { return mAnmTransform; } + void setAnmTransform(J3DAnmTransform* pAnmTransform) { mAnmTransform = pAnmTransform; } + + J3DAnmTransform* mAnmTransform; +}; + +struct J3DMtxCalcAnimationAdaptorBase { + J3DMtxCalcAnimationAdaptorBase() {} + void change(J3DAnmTransform*) {} +}; + +template <typename A0> +struct J3DMtxCalcAnimationAdaptorDefault : public J3DMtxCalcAnimationAdaptorBase { + J3DMtxCalcAnimationAdaptorDefault(J3DAnmTransform* pAnmTransform) {} + + void calc(J3DMtxCalcAnmBase* pMtxCalc) { + J3DTransformInfo transform; + J3DTransformInfo* transform_p; + if (pMtxCalc->getAnmTransform() != NULL) { + pMtxCalc->getAnmTransform()->getTransform(J3DMtxCalc::getJoint()->getJntNo(), &transform); + transform_p = &transform; + } else { + transform_p = &J3DMtxCalc::getJoint()->getTransformInfo(); + } + + A0::calcTransform(*transform_p); + } +}; + +template <typename A0, typename B0> +struct J3DMtxCalcAnimation : public J3DMtxCalcAnmBase { + J3DMtxCalcAnimation(J3DAnmTransform* pAnmTransform) : J3DMtxCalcAnmBase(pAnmTransform), field_0x8(pAnmTransform) {} + ~J3DMtxCalcAnimation() {} + + void setAnmTransform(J3DAnmTransform* pAnmTransform) { + mAnmTransform = pAnmTransform; + field_0x8.change(pAnmTransform); + } + + void init(const Vec& param_0, const Mtx& param_1) { B0::init(param_0, param_1); } + void calc() { field_0x8.calc(this); } + + A0 field_0x8; +}; + /** * @ingroup jsystem-j3d * diff --git a/include/JSystem/J3DGraphAnimator/J3DJointTree.h b/include/JSystem/J3DGraphAnimator/J3DJointTree.h index b4b3d5a1db..285efa88d5 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJointTree.h +++ b/include/JSystem/J3DGraphAnimator/J3DJointTree.h @@ -1,6 +1,7 @@ #ifndef J3DJOINTTREE_H #define J3DJOINTTREE_H +#include "JSystem/J3DAssert.h" #include "JSystem/J3DGraphBase/J3DTransform.h" class J3DJoint; diff --git a/include/JSystem/JKernel/JKRMemArchive.h b/include/JSystem/JKernel/JKRMemArchive.h index 9878f73499..3fb5a63c58 100644 --- a/include/JSystem/JKernel/JKRMemArchive.h +++ b/include/JSystem/JKernel/JKRMemArchive.h @@ -32,7 +32,7 @@ public: static u32 fetchResource_subroutine(u8*, u32, u8*, u32, JKRCompression); SArcHeader* getArcHeader() { return mArcHeader; } -private: +public: /* 0x00 */ // vtable /* 0x04 */ // JKRArchive /* 0x64 */ SArcHeader* mArcHeader; diff --git a/include/JSystem/JUtility/JUTConsole.h b/include/JSystem/JUtility/JUTConsole.h index f8d26f8f3c..d565005f6f 100644 --- a/include/JSystem/JUtility/JUTConsole.h +++ b/include/JSystem/JUtility/JUTConsole.h @@ -6,6 +6,20 @@ #include "JSystem/JUtility/JUTFont.h" #include <cstdarg> +class JUTConsole; + +extern "C" void JUTConsole_print_f_va_(JUTConsole*, const char*, va_list); +extern "C" void JUTSetReportConsole(JUTConsole*); +extern "C" JUTConsole* JUTGetReportConsole(); +extern "C" void JUTSetWarningConsole(JUTConsole*); +extern "C" JUTConsole* JUTGetWarningConsole(); +extern "C" void JUTWarningConsole_f_va(const char*, va_list); +extern "C" void JUTReportConsole_f_va(const char*, va_list); +extern "C" void JUTReportConsole_f(const char*, ...); +extern "C" void JUTWarningConsole(const char* message); +extern "C" void JUTWarningConsole_f(const char* message, ...); +extern "C" void JUTReportConsole(const char* message); + /** * @ingroup jsystem-jutility * @@ -95,6 +109,7 @@ public: void scrollToLastLine() { scroll(mMaxLines); } void scrollToFirstLine() { scroll(-mMaxLines); } + void print_f_va(const char* fmt, va_list args) { JUTConsole_print_f_va_(this, fmt, args); } /* 0x18 */ JGadget::TLinkListNode mListNode; /* 0x20 */ unsigned int field_0x20; @@ -154,16 +169,4 @@ private: /* 0x10 */ JUTConsole* mDirectConsole; }; // Size: 0x14 -extern "C" void JUTConsole_print_f_va_(JUTConsole*, const char*, va_list); -extern "C" void JUTSetReportConsole(JUTConsole*); -extern "C" JUTConsole* JUTGetReportConsole(); -extern "C" void JUTSetWarningConsole(JUTConsole*); -extern "C" JUTConsole* JUTGetWarningConsole(); -extern "C" void JUTWarningConsole_f_va(const char*, va_list); -extern "C" void JUTReportConsole_f_va(const char*, va_list); -extern "C" void JUTReportConsole_f(const char*, ...); -extern "C" void JUTWarningConsole(const char* message); -extern "C" void JUTWarningConsole_f(const char* message, ...); -extern "C" void JUTReportConsole(const char* message); - #endif /* JUTCONSOLE_H */ |
