diff options
| author | hatal175 <hatal175@users.noreply.github.com> | 2026-01-26 07:20:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-25 21:20:02 -0800 |
| commit | be3efedee34194f88845a5f4413096812ac22dfd (patch) | |
| tree | 1854cbfd96ede36fe12c1e26862cb2c7882f8414 /include | |
| parent | 7883248acc883990c869d0b8b855283207340519 (diff) | |
Work on d_jdpreviwer (#3067)
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/JHostIO/JORServer.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JStudio/JStudio_JPreviewer/control.h | 51 | ||||
| -rw-r--r-- | include/d/d_jpreviewer.h | 9 |
3 files changed, 62 insertions, 2 deletions
diff --git a/include/JSystem/JHostIO/JORServer.h b/include/JSystem/JHostIO/JORServer.h index a695fd5faa..d92e588117 100644 --- a/include/JSystem/JHostIO/JORServer.h +++ b/include/JSystem/JHostIO/JORServer.h @@ -187,4 +187,8 @@ inline void JORReleaseMContext(JORMContext* mctx) { JORServer::getInstance()->releaseMCTX(mctx); } +inline void JOR_ENABLEEVENTCALLBACKLIST(bool enable) { + JORServer::getInstance()->enableEventCallbackList(enable); +} + #endif /* JORSERVER_H */ diff --git a/include/JSystem/JStudio/JStudio_JPreviewer/control.h b/include/JSystem/JStudio/JStudio_JPreviewer/control.h new file mode 100644 index 0000000000..5d19028ca9 --- /dev/null +++ b/include/JSystem/JStudio/JStudio_JPreviewer/control.h @@ -0,0 +1,51 @@ +#ifndef JSYSTEM_JSTUDIO_JSTUDIO_JPREVIEWER_CONTROL_H +#define JSYSTEM_JSTUDIO_JSTUDIO_JPREVIEWER_CONTROL_H + +#include "JSystem/JHostIO/JORReflexible.h" +#include "JSystem/JHostIO/JORServer.h" +#include "JSystem/JStudio/JStudioToolLibrary/interface.h" +#include "JSystem/JStudio/JStudioToolLibrary/visual.h" + +class J2DOrthoGraph; +class JUTFont; +class JUTGamePad; + +namespace JStudio { + class TControl; + class TParse; +}; + +namespace JStudioPreviewer { + class TControl : public JORReflexible, public JOREventCallbackListNode { + public: + TControl(); + virtual ~TControl() {} + void genMessage(JORMContext*); + + void interface_setPad(const JUTGamePad* pPad) { + mPad.setPad(pPad); + } + + void show_setRender(J2DOrthoGraph* pGraph, JUTFont* pFont) { + field_0x128.setRender(pGraph); + field_0x12c.setFont(pFont); + } + + void jstudio_setControl(JStudio::TControl*); + void jstudio_setParse(JStudio::TParse*); + + virtual void update(); + virtual void show2D(); + virtual void show3D(Mtx mtx); + virtual int JORAct(u32, const char*); + + private: + /* 0x018 */ u8 field_0x18[0xf8 - 0x18]; + /* 0x0F8 */ JStudioToolLibrary::TPad mPad; + /* 0x018 */ u8 field_0xfc[0x128 - 0xfc]; + /* 0x128 */ JStudioToolLibrary::TDrawPrimitive2D field_0x128; + /* 0x12C */ JStudioToolLibrary::TPrint field_0x12c; + }; +}; + +#endif diff --git a/include/d/d_jpreviewer.h b/include/d/d_jpreviewer.h index 98079c6eb4..b34880c1c0 100644 --- a/include/d/d_jpreviewer.h +++ b/include/d/d_jpreviewer.h @@ -2,6 +2,7 @@ #define D_JPREVIEWER_H #include <dolphin/mtx.h> +#include "JSystem/JStudio/JStudio_JPreviewer/control.h" namespace JStudio { class TControl; @@ -13,7 +14,7 @@ class JUTGamePad; class JUTResFont; class tParse_; -class dJprevCtrl_c /* : public JStudioPreviewer::TControl */ { +class dJprevCtrl_c : public JStudioPreviewer::TControl { public: }; @@ -21,9 +22,13 @@ public: class dJprev_c { public: dJprev_c(JStudio::TControl*, const JUTGamePad&); + ~dJprev_c(); void show3D(Mtx); void show2D(); + void create(JStudio::TControl* pControl, const JUTGamePad& pad); + void remove(); + void update(); static dJprev_c* get() { return m_myObj; } @@ -34,7 +39,7 @@ public: /* 0x08 */ JKRExpHeap* mHeap; /* 0x0C */ tParse_* m_parse; /* 0x10 */ dJprevCtrl_c* mControl; - /* 0x14 */ u8 field_0x14; + /* 0x14 */ s8 mHIOId; }; #endif /* D_JPREVIEWER_H */ |
