diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2021-09-27 15:46:25 -0700 |
|---|---|---|
| committer | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2021-09-27 15:46:25 -0700 |
| commit | f041c554cb159727f2466ce7e7a1d176210424d9 (patch) | |
| tree | 1a55b8be8d1cf8eac2d5594c85c74c9d5d0ce113 /include/JSystem | |
| parent | a08acfa69b3ea48ff37a57b649a93164ecee8584 (diff) | |
| parent | 512cc73cd7dc9af497e698e0ddcbfad3de53bf37 (diff) | |
Merge branch 'master' of https://github.com/zeldaret/tp into pr___
Diffstat (limited to 'include/JSystem')
| -rw-r--r-- | include/JSystem/JUtility/JUTDirectPrint.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTException.h | 3 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTVideo.h | 30 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTXfb.h | 30 |
4 files changed, 52 insertions, 13 deletions
diff --git a/include/JSystem/JUtility/JUTDirectPrint.h b/include/JSystem/JUtility/JUTDirectPrint.h index 8f2c2fbb4a..8fac8cf23c 100644 --- a/include/JSystem/JUtility/JUTDirectPrint.h +++ b/include/JSystem/JUtility/JUTDirectPrint.h @@ -22,6 +22,8 @@ public: /* 802E4240 */ static JUTDirectPrint* start(); + static JUTDirectPrint* getManager() { return sDirectPrint; } + private: static u8 sAsciiTable[128]; static u32 sFontData[64]; diff --git a/include/JSystem/JUtility/JUTException.h b/include/JSystem/JUtility/JUTException.h index 129d645745..eed808f7ba 100644 --- a/include/JSystem/JUtility/JUTException.h +++ b/include/JSystem/JUtility/JUTException.h @@ -3,6 +3,7 @@ #include "JSystem/JKernel/JKRThread.h" #include "JSystem/JUtility/JUTGamePad.h" +#include "Runtime.PPCEABI.H/__va_arg.h" #include "dolphin/gx/GX.h" #include "dolphin/os/OS.h" #include "dolphin/types.h" @@ -26,7 +27,7 @@ public: /* 802E1D5C */ JUTException(JUTDirectPrint*); /* 802E1E40 */ void create(JUTDirectPrint*); /* 802E1FCC */ void errorHandler(u16, OSContext*, u32, u32); - /* 802E20C0 */ void panic_f_va(char const*, int, char const*, __va_list_struct*); + /* 802E20C0 */ void panic_f_va(char const*, int, char const*, va_list); /* 802E21FC */ static void panic_f(char const*, int, char const*, ...); /* 802E227C */ void setFPException(u32); /* 802E22C4 */ void showFloatSub(int, f32); diff --git a/include/JSystem/JUtility/JUTVideo.h b/include/JSystem/JUtility/JUTVideo.h index 2657239126..5660decd25 100644 --- a/include/JSystem/JUtility/JUTVideo.h +++ b/include/JSystem/JUtility/JUTVideo.h @@ -8,28 +8,30 @@ class JUTVideo { public: - typedef void (*CallbackFn)(void); + typedef void (*Callback)(u32); - JUTVideo(_GXRenderModeObj const*); + JUTVideo(GXRenderModeObj const*); virtual ~JUTVideo(); // TODO: return types not confirmed - /* 802E4C54 */ static JUTVideo* createManager(_GXRenderModeObj const*); + /* 802E4C54 */ static JUTVideo* createManager(GXRenderModeObj const*); /* 802E4CAC */ static void destroyManager(); - /* 802E4E50 */ void preRetraceProc(u32); /* 802E5088 */ void drawDoneStart(); /* 802E50B0 */ void dummyNoDrawWait(); - /* 802E50BC */ void drawDoneCallback(); - /* 802E5144 */ void postRetraceProc(u32); - /* 802E5198 */ void setRenderMode(_GXRenderModeObj const*); + /* 802E5198 */ void setRenderMode(GXRenderModeObj const*); /* 802E5210 */ void waitRetraceIfNeed(); + /* 802E4E50 */ static void preRetraceProc(u32); + /* 802E5144 */ static void postRetraceProc(u32); + /* 802E50BC */ static void drawDoneCallback(); + static JUTVideo* getManager() { return sManager; } - _GXRenderModeObj* getRenderMode() const { return mRenderObj; } + GXRenderModeObj* getRenderMode() const { return mRenderObj; } +private: static JUTVideo* sManager; - static u32 sVideoLastTick; - static u32 sVideoInterval; + static OSTick sVideoLastTick; + static OSTick sVideoInterval; private: /* 0x04 */ _GXRenderModeObj* mRenderObj; @@ -40,12 +42,16 @@ private: /* 0x18 */ u32 field_0x18; /* 0x1C */ VIRetraceCallback mPreRetraceCallback; /* 0x20 */ VIRetraceCallback mPostRetraceCallback; - /* 0x24 */ CallbackFn unknown_callback_1; - /* 0x28 */ CallbackFn unknown_callback_2; + /* 0x24 */ Callback mPreCallback; + /* 0x28 */ Callback mPostCallback; /* 0x2C */ bool mSetBlack; /* 0x30 */ s32 mSetBlackFrameCount; /* 0x34 */ OSMessage mMessage; /* 0x38 */ OSMessageQueue mMessageQueue; }; +inline JUTVideo* JUTGetVideoManager() { + return JUTVideo::getManager(); +} + #endif /* JUTVIDEO_H */ diff --git a/include/JSystem/JUtility/JUTXfb.h b/include/JSystem/JUtility/JUTXfb.h index a523452d25..240fb27a08 100644 --- a/include/JSystem/JUtility/JUTXfb.h +++ b/include/JSystem/JUtility/JUTXfb.h @@ -23,6 +23,36 @@ public: /* 802E5424 */ static void destroyManager(); /* 802E5454 */ void initiate(u16, u16, JKRHeap*, JUTXfb::EXfbNumber); + s32 getBufferNum() const { return mBufferNum; } + s16 getDrawnXfbIndex() const { return mDrawnXfbIndex; } + s16 getDrawningXfbIndex() const { return mDrawingXfbIndex; } + s16 getDisplayingXfbIndex() const { return mDisplayingXfbIndex; } + s32 getSDrawingFlag() const { return mSDrawingFlag; } + + void* getDrawnXfb() const { + if (mDrawnXfbIndex >= 0) + return mBuffer[mDrawnXfbIndex]; + return NULL; + } + + void* getDrawningXfb() const { + if (mDrawingXfbIndex >= 0) + return mBuffer[mDrawingXfbIndex]; + return NULL; + } + + void* getDisplayingXfb() const { + if (mDisplayingXfbIndex >= 0) + return mBuffer[mDisplayingXfbIndex]; + return NULL; + } + + void setDisplayingXfbIndex(s16 index) { mDisplayingXfbIndex = index; } + void setSDrawingFlag(s32 flag) { mSDrawingFlag = flag; } + + static JUTXfb* getManager() { return sManager; } + +private: static JUTXfb* sManager; private: |
