diff options
| author | Jcw87 <Jcw87@users.noreply.github.com> | 2026-01-05 02:19:14 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-05 02:19:14 -0800 |
| commit | b897ed3ec9b63001ce74411569a087cacc4f23d9 (patch) | |
| tree | 5fe811f8a813474bc6edd6abf78a643f6f706b7a /include | |
| parent | deb7bead205cb35ff5f57ee3d466179defde44cb (diff) | |
m_Do debug (#3017)
* m_Do debug
* d_particle fix
Diffstat (limited to 'include')
| -rw-r--r-- | include/CaptureScreen.h | 31 | ||||
| -rw-r--r-- | include/JSystem/JHostIO/JORReflexible.h | 3 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRExpHeap.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRHeap.h | 6 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRSolidHeap.h | 2 | ||||
| -rw-r--r-- | include/d/d_com_inf_game.h | 7 | ||||
| -rw-r--r-- | include/d/d_drawlist.h | 4 | ||||
| -rw-r--r-- | include/d/d_jcam_editor.h | 38 | ||||
| -rw-r--r-- | include/d/d_jpreviewer.h | 40 | ||||
| -rw-r--r-- | include/d/d_particle.h | 1 | ||||
| -rw-r--r-- | include/f_ap/f_ap_game.h | 11 | ||||
| -rw-r--r-- | include/m_Do/m_Do_controller_pad.h | 1 | ||||
| -rw-r--r-- | include/m_Do/m_Do_ext.h | 12 | ||||
| -rw-r--r-- | include/m_Do/m_Do_machine.h | 2 | ||||
| -rw-r--r-- | include/m_Do/m_Do_main.h | 1 |
15 files changed, 143 insertions, 18 deletions
diff --git a/include/CaptureScreen.h b/include/CaptureScreen.h index 1f843da9aa..8ae80ab064 100644 --- a/include/CaptureScreen.h +++ b/include/CaptureScreen.h @@ -3,6 +3,37 @@ #include "JSystem/JFramework/JFWDisplay.h" +class CProjectionDivider { +public: + /* 0x00 */ f32 field_0x0; + /* 0x04 */ f32 field_0x4; + /* 0x08 */ f32 field_0x8; + /* 0x0C */ f32 field_0xc; + /* 0x10 */ f32 field_0x10; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ s32 field_0x18; + /* 0x1C */ s32 field_0x1c; + + CProjectionDivider(s32, s32); + virtual ~CProjectionDivider() {} + f32 calcDivRatioH(s32) const; + f32 calcDivRatioV(s32) const; +}; + +class CPerspDivider : public CProjectionDivider { +public: + CPerspDivider(const Mtx44&, s32, s32); + virtual ~CPerspDivider() {} + void divide(Mtx44&, s32, s32) const; +}; + +class COrthoDivider : public CProjectionDivider { +public: + COrthoDivider(const Mtx44&, s32, s32); + virtual ~COrthoDivider() {} + void divide(Mtx44&, s32, s32) const; +}; + class CaptureScreen { public: CaptureScreen(const JFWDisplay*); diff --git a/include/JSystem/JHostIO/JORReflexible.h b/include/JSystem/JHostIO/JORReflexible.h index 4789cfd202..a0e0aeaaa3 100644 --- a/include/JSystem/JHostIO/JORReflexible.h +++ b/include/JSystem/JHostIO/JORReflexible.h @@ -39,6 +39,7 @@ struct JORServer; class JOREventListener { public: #if DEBUG + JOREventListener() {} virtual void listenPropertyEvent(const JORPropertyEvent*) = 0; #endif }; @@ -46,7 +47,7 @@ public: class JORReflexible : public JOREventListener { public: #if DEBUG - JORReflexible(); + JORReflexible() {} static JORServer* getJORServer(); virtual void listenPropertyEvent(const JORPropertyEvent*); diff --git a/include/JSystem/JKernel/JKRExpHeap.h b/include/JSystem/JKernel/JKRExpHeap.h index 309b81f29a..1535ba757b 100644 --- a/include/JSystem/JKernel/JKRExpHeap.h +++ b/include/JSystem/JKernel/JKRExpHeap.h @@ -119,7 +119,7 @@ inline JKRExpHeap* JKRCreateExpHeap(u32 size, JKRHeap* parent, bool errorFlag) { return JKRExpHeap::create(size, parent, errorFlag); } -inline void JKRDestroyExpHeap(JKRHeap* heap) { +inline void JKRDestroyExpHeap(JKRExpHeap* heap) { heap->destroy(); } diff --git a/include/JSystem/JKernel/JKRHeap.h b/include/JSystem/JKernel/JKRHeap.h index 650ee57663..ec9ca10497 100644 --- a/include/JSystem/JKernel/JKRHeap.h +++ b/include/JSystem/JKernel/JKRHeap.h @@ -108,10 +108,7 @@ public: } } - JKRHeap* getParent() { - JSUTree<JKRHeap>* parent = mChildTree.getParent(); - return parent->getObject(); - } + JKRHeap* getParent() { return mChildTree.getParent()->getObject(); } JSUTree<JKRHeap>& getHeapTree() { return mChildTree; } void appendDisposer(JKRDisposer* disposer) { mDisposerList.append(&disposer->mLink); } @@ -119,7 +116,6 @@ public: void lock() const { OSLockMutex(const_cast<OSMutex*>(&mMutex)); } void unlock() const { OSUnlockMutex(const_cast<OSMutex*>(&mMutex)); } u32 getHeapSize() { return mSize; } - u8 getCurrentGroupId() { return 0; } protected: /* 0x00 */ // vtable diff --git a/include/JSystem/JKernel/JKRSolidHeap.h b/include/JSystem/JKernel/JKRSolidHeap.h index 1897fd5aec..a14fd915fe 100644 --- a/include/JSystem/JKernel/JKRSolidHeap.h +++ b/include/JSystem/JKernel/JKRSolidHeap.h @@ -67,7 +67,7 @@ inline JKRSolidHeap* JKRCreateSolidHeap(u32 param_0, JKRHeap* heap, bool param_2 return JKRSolidHeap::create(param_0, heap, param_2); } -inline void JKRDestroySolidHeap(JKRHeap* heap) { +inline void JKRDestroySolidHeap(JKRSolidHeap* heap) { heap->destroy(); } diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index f30e2bbee5..bf1523042c 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -4198,6 +4198,13 @@ inline void dComIfGd_drawListItem3d() { g_dComIfG_gameInfo.drawlist.drawXluListItem3d(); } +# if VERSION > VERSION_GCN_JPN +inline void dComIfGd_drawListCursor() { + g_dComIfG_gameInfo.drawlist.drawOpaListCursor(); + g_dComIfG_gameInfo.drawlist.drawXluListCursor(); +} +#endif + inline void dComIfGd_reset() { g_dComIfG_gameInfo.drawlist.reset(); } diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h index 38b4861bcb..8b77ee4dd4 100644 --- a/include/d/d_drawlist.h +++ b/include/d/d_drawlist.h @@ -483,6 +483,10 @@ public: void drawOpaList3Dlast() { drawOpaDrawList(mDrawBuffers[DB_LIST_3D_LAST]); } void drawOpaListFilter() { drawOpaDrawList(mDrawBuffers[DB_LIST_FILTER]); } void drawOpaListP0() { drawOpaDrawList(mDrawBuffers[DB_LIST_P0]); } +#if VERSION > VERSION_GCN_JPN + void drawOpaListCursor() { drawOpaDrawList(mDrawBuffers[DB_LIST_CURSOR]); } + void drawXluListCursor() { drawXluDrawList(mDrawBuffers[DB_LIST_CURSOR]); } +#endif void draw2DOpa() { draw(mp2DOpaDrawLists, mp2DOpaStart); } void draw2DOpaTop() { draw(mp2DOpaTopDrawLists, mp2DOpaTopStart); } void draw2DXlu() { draw(mp2DXluDrawLists, mp2DXluStart); } diff --git a/include/d/d_jcam_editor.h b/include/d/d_jcam_editor.h new file mode 100644 index 0000000000..db926274cc --- /dev/null +++ b/include/d/d_jcam_editor.h @@ -0,0 +1,38 @@ +#ifndef D_JCAM_EDITOR_H +#define D_JCAM_EDITOR_H + +#include "dolphin/mtx.h" + +namespace JStage { + class TSystem; +} +namespace JStudioCameraEditor { + class TControl; +} + +class JKRExpHeap; +class JUTGamePad; +class JUTResFont; + +class dJcame_c { +public: + dJcame_c(const JStage::TSystem*, f32, JUTGamePad&); + + void show3D(Mtx); + void show2D(); + + static void create(const JStage::TSystem*, f32, JUTGamePad&); + + static dJcame_c* m_myObj; + + static dJcame_c* get() { return m_myObj; } + + /* 0x00 */ JStage::TSystem* field_0x0; + /* 0x04 */ JUTResFont* field_0x4; + /* 0x08 */ JKRExpHeap* mHeap; + /* 0x0C */ JStudioCameraEditor::TControl* mControl; + /* 0x10 */ int field_0x10; + /* 0x14 */ u8 field_0x14; +}; + +#endif /* D_JCAM_EDITOR_H */ diff --git a/include/d/d_jpreviewer.h b/include/d/d_jpreviewer.h new file mode 100644 index 0000000000..c9cd4cbc35 --- /dev/null +++ b/include/d/d_jpreviewer.h @@ -0,0 +1,40 @@ +#ifndef D_JPREVIEWER_H +#define D_JPREVIEWER_H + +#include "dolphin/mtx.h" + +namespace JStudio { + class TControl; +} + +class J2DOrthoGraph; +class JKRExpHeap; +class JUTGamePad; +class JUTResFont; +class tParse_; + +class dJprevCtrl_c /* : public JStudioPreviewer::TControl */ { +public: + +}; + +class dJprev_c { +public: + dJprev_c(JStudio::TControl*, const JUTGamePad&); + + void show3D(Mtx); + void show2D(); + + static dJprev_c* get() { return m_myObj; } + + static dJprev_c* m_myObj; + + /* 0x00 */ J2DOrthoGraph* mOrthoGraph; + /* 0x04 */ JUTResFont* mFont; + /* 0x08 */ JKRExpHeap* mHeap; + /* 0x0C */ tParse_* m_parse; + /* 0x10 */ dJprevCtrl_c* mControl; + /* 0x14 */ u8 field_0x14; +}; + +#endif /* D_JPREVIEWER_H */ diff --git a/include/d/d_particle.h b/include/d/d_particle.h index a57a6918b7..74e304a531 100644 --- a/include/d/d_particle.h +++ b/include/d/d_particle.h @@ -211,7 +211,6 @@ public: UNUSED(i_emitter); dPa_cleanupGX(); } - virtual void execute(JPABaseEmitter*); virtual void setup(JPABaseEmitter*, cXyz const*, csXyz const*, s8); }; diff --git a/include/f_ap/f_ap_game.h b/include/f_ap/f_ap_game.h index 618caed84f..836554ba50 100644 --- a/include/f_ap/f_ap_game.h +++ b/include/f_ap/f_ap_game.h @@ -33,7 +33,7 @@ public: JUT_ASSERT(46, mCaptureScreen != NULL); } - static u8 isCaptureScreen() { + static bool isCaptureScreen() { return mCaptureScreenFlag; } @@ -44,6 +44,12 @@ public: static void offCpuTimer() { m_CpuTimerOff = FALSE; } + + static u8 getCaptureScreenNumH() { return mCaptureScreenNumH; } + static u8 getCaptureScreenNumV() { return mCaptureScreenNumV; } + + static u8 getCaptureScreenDivH() { return mCaptureScreenDivH; } + static u8 getCaptureScreenDivV() { return mCaptureScreenDivV; } #endif #if DEBUG @@ -63,6 +69,9 @@ public: static u8 mCaptureScreenNumV; static u8 mParticle254Fix; + + static u8 mCaptureScreenDivH; + static u8 mCaptureScreenDivV; #endif /* 0x04 */ s8 field_0x04; diff --git a/include/m_Do/m_Do_controller_pad.h b/include/m_Do/m_Do_controller_pad.h index 8f8f2a2ea9..c4291c1af9 100644 --- a/include/m_Do/m_Do_controller_pad.h +++ b/include/m_Do/m_Do_controller_pad.h @@ -70,6 +70,7 @@ public: static JUTGamePad* m_gamePad[4]; static interface_of_controller_pad m_cpadInfo[4]; + static interface_of_controller_pad m_debugCpadInfo[4]; }; inline void mDoCPd_ANALOG_CONV(u8 analog, f32& param_1) { diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index 14c3f36e37..e03eb6e1ca 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -148,7 +148,7 @@ STATIC_ASSERT(sizeof(mDoExt_bpkAnm) == 0x18); class mDoExt_bckAnm : public mDoExt_baseAnm { public: - mDoExt_bckAnm() { mpMtxCalc = NULL; } + mDoExt_bckAnm() { mAnm = NULL; } int init(J3DAnmTransform* i_bck, int i_play, int i_attr, f32 i_rate, s16 i_startF, s16 i_endF, bool i_modify); void changeBckOnly(J3DAnmTransform* i_bck); @@ -164,15 +164,15 @@ public: i_modelData->getJointNodePointer(0)->setMtxCalc(NULL); } - J3DAnmTransform* getBckAnm() { return mAnm; } + J3DAnmTransform* getBckAnm() { return mAnmTransform; } void removeJoint(J3DModelData* i_modelData, u16 i_idx) { i_modelData->getJointNodePointer(i_idx)->setMtxCalc(0); } private: - /* 0x14 */ J3DAnmTransform* mAnm; - /* 0x18 */ J3DMtxCalcAnimation<J3DMtxCalcAnimationAdaptorDefault<J3DMtxCalcCalcTransformMaya>, J3DMtxCalcJ3DSysInitMaya>* mpMtxCalc; + /* 0x14 */ J3DAnmTransform* mAnmTransform; + /* 0x18 */ J3DMtxCalcAnimation<J3DMtxCalcAnimationAdaptorDefault<J3DMtxCalcCalcTransformMaya>, J3DMtxCalcJ3DSysInitMaya>* mAnm; }; // Size: 0x1C STATIC_ASSERT(sizeof(mDoExt_bckAnm) == 0x1C); @@ -811,10 +811,8 @@ J3DModel* mDoExt_J3DModel__create(J3DModelData* i_modelData, u32 i_modelFlag, u32 i_differedDlistFlag); extern u32 aram_cache_size; +u32 mDoExt_getAraCacheSize(); void mDoExt_setAraCacheSize(u32 size); -inline u32 mDoExt_getAraCacheSize() { - return aram_cache_size; -} int mDoExt_resIDToIndex(JKRArchive* p_archive, u16 id); void mDoExt_modelEntryDL(J3DModel* i_model); diff --git a/include/m_Do/m_Do_machine.h b/include/m_Do/m_Do_machine.h index a9bfa34485..47879f3adb 100644 --- a/include/m_Do/m_Do_machine.h +++ b/include/m_Do/m_Do_machine.h @@ -8,7 +8,7 @@ class JKRHeap; void myHeapCheckRecursive(JKRHeap*); BOOL mDoMch_IsProgressiveMode(); -bool exceptionReadPad(u32*, u32*); +void exceptionReadPad(u32*, u32*); void exceptionRestart(); void myExceptionCallback(u16, OSContext*, u32, u32); void my_SysPrintHeap(char const*, void*, u32); diff --git a/include/m_Do/m_Do_main.h b/include/m_Do/m_Do_main.h index 99dc3876b8..4685b4aef7 100644 --- a/include/m_Do/m_Do_main.h +++ b/include/m_Do/m_Do_main.h @@ -11,6 +11,7 @@ extern OSThread mainThread; void version_check(); s32 LOAD_COPYDATE(void*); +extern OSThread mainThread; const int HeapCheckTableNum = 8; class HeapCheck { |
