summaryrefslogtreecommitdiff
path: root/include/JSystem
diff options
context:
space:
mode:
authorTakaRikka <38417346+TakaRikka@users.noreply.github.com>2021-12-05 17:13:56 -0800
committerGitHub <noreply@github.com>2021-12-05 17:13:56 -0800
commitcc29e8e5c961daee206ebe49543517aee901fe71 (patch)
treef2c130b0e671ba8b68c431346e574d0e206784d2 /include/JSystem
parentf6f7e7ce38a9af6ca605261a5d2485a6edc6b733 (diff)
parentd51f7bf0c6ddf533eee7e8d1ea4feedc7572142b (diff)
Merge pull request #164 from lepelog/JUTDbPrint
JUTDbPrint
Diffstat (limited to 'include/JSystem')
-rw-r--r--include/JSystem/JUtility/JUTDbPrint.h17
-rw-r--r--include/JSystem/JUtility/JUTFont.h4
-rw-r--r--include/JSystem/JUtility/JUTResFont.h4
-rw-r--r--include/JSystem/JUtility/JUTVideo.h3
4 files changed, 21 insertions, 7 deletions
diff --git a/include/JSystem/JUtility/JUTDbPrint.h b/include/JSystem/JUtility/JUTDbPrint.h
index 4d0b47e1f8..18f951784a 100644
--- a/include/JSystem/JUtility/JUTDbPrint.h
+++ b/include/JSystem/JUtility/JUTDbPrint.h
@@ -5,11 +5,21 @@
#include "JSystem/JUtility/JUTFont.h"
#include "dolphin/types.h"
+// TODO: fix struct
+struct unk_print {
+ /* 0x00 */ unk_print* mNext;
+ /* 0x04 */ s16 unk_0x04;
+ /* 0x06 */ s16 unk_0x06;
+ /* 0x08 */ s16 unk_0x08;
+ /* 0x0A */ s16 unk_0x0A;
+ /* 0x0C */ char unk_0x0C[0];
+};
+
class JUTDbPrint {
public:
/* 802E0148 */ JUTDbPrint(JUTFont*, JKRHeap*);
- /* 802E0190 */ void start(JUTFont*, JKRHeap*);
- /* 802E0204 */ void changeFont(JUTFont*);
+ /* 802E0190 */ static JUTDbPrint* start(JUTFont*, JKRHeap*);
+ /* 802E0204 */ JUTFont* changeFont(JUTFont*);
/* 802E021C */ void enter(int, int, int, char const*, int);
/* 802E02DC */ void flush(int, int, int, int);
/* 802E02A4 */ void flush();
@@ -21,10 +31,11 @@ public:
static JUTDbPrint* sDebugPrint;
private:
- /* 0x00 */ JUTDbPrint* mNext;
+ /* 0x00 */ unk_print* mFirst;
/* 0x04 */ JUTFont* mFont;
/* 0x08 */ JUtility::TColor mColor;
/* 0x0C */ bool mVisible;
+ /* 0x10 */ JKRHeap* mHeap;
};
#endif /* JUTDBPRINT_H */
diff --git a/include/JSystem/JUtility/JUTFont.h b/include/JSystem/JUtility/JUTFont.h
index 5b37dc7e2f..ab47155562 100644
--- a/include/JSystem/JUtility/JUTFont.h
+++ b/include/JSystem/JUtility/JUTFont.h
@@ -70,8 +70,8 @@ public:
/* 0x18 */ virtual u16 getLeading() const = 0;
/* 0x1C */ virtual u16 getAscent() const = 0;
/* 0x20 */ virtual u16 getDescent() const = 0;
- /* 0x24 */ virtual u16 getHeight() const = 0;
- /* 0x28 */ virtual u16 getWidth() const = 0;
+ /* 0x24 */ virtual s32 getHeight() const = 0;
+ /* 0x28 */ virtual s32 getWidth() const = 0;
/* 0x2C */ virtual void getWidthEntry(int i_no, TWidth* width) const;
/* 0x30 */ virtual u16 getCellWidth() const;
/* 0x34 */ virtual u16 getCellHeight() const;
diff --git a/include/JSystem/JUtility/JUTResFont.h b/include/JSystem/JUtility/JUTResFont.h
index cf0398abd3..d19dad3a0b 100644
--- a/include/JSystem/JUtility/JUTResFont.h
+++ b/include/JSystem/JUtility/JUTResFont.h
@@ -14,8 +14,8 @@ public:
/* 802DDFEC */ virtual u16 getLeading() const;
/* 802DE004 */ virtual u16 getAscent() const;
/* 802DE010 */ virtual u16 getDescent() const;
- /* 802DE01C */ virtual u16 getHeight() const;
- /* 802DDFF8 */ virtual u16 getWidth() const;
+ /* 802DE01C */ virtual s32 getHeight() const;
+ /* 802DDFF8 */ virtual s32 getWidth() const;
/* 802DFC64 */ virtual void getWidthEntry(int, JUTFont::TWidth*) const;
/* 802DFD0C */ virtual u16 getCellWidth() const;
/* 802DFD58 */ virtual u16 getCellHeight() const;
diff --git a/include/JSystem/JUtility/JUTVideo.h b/include/JSystem/JUtility/JUTVideo.h
index 5660decd25..537ee1dcf6 100644
--- a/include/JSystem/JUtility/JUTVideo.h
+++ b/include/JSystem/JUtility/JUTVideo.h
@@ -25,6 +25,9 @@ public:
/* 802E5144 */ static void postRetraceProc(u32);
/* 802E50BC */ static void drawDoneCallback();
+ u32 getFbWidth() const { return mRenderObj->fb_width; }
+ u32 getEfbHeight() const { return mRenderObj->efb_height; }
+
static JUTVideo* getManager() { return sManager; }
GXRenderModeObj* getRenderMode() const { return mRenderObj; }