diff options
| author | TakaRikka <takarikka@outlook.com> | 2023-02-26 22:18:40 -0800 |
|---|---|---|
| committer | TakaRikka <takarikka@outlook.com> | 2023-02-26 22:18:40 -0800 |
| commit | eae9455a7df805d653aae76de2eec5af8e81fbf4 (patch) | |
| tree | 2be6809331693f37caeb9f832c0a53082ce94003 /include/JSystem | |
| parent | 090dcee01206bf7ba6b2231747f0b083521019f1 (diff) | |
JUtility / JSupport / misc cleanup
Diffstat (limited to 'include/JSystem')
| -rw-r--r-- | include/JSystem/JKernel/JKRAram.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JMath/JMATrigonometric.h | 14 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTAssert.h | 15 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTCacheFont.h | 6 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTConsole.h | 1 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTFont.h | 1 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTResFont.h | 12 |
7 files changed, 31 insertions, 20 deletions
diff --git a/include/JSystem/JKernel/JKRAram.h b/include/JSystem/JKernel/JKRAram.h index 5468519ba1..80975eba93 100644 --- a/include/JSystem/JKernel/JKRAram.h +++ b/include/JSystem/JKernel/JKRAram.h @@ -22,7 +22,7 @@ public: u32 getGraphMemory() const { return mGraphMemoryPtr; } u32 getGraphMemSize() const { return mGraphMemorySize; } -private: +//private: /* 0x00 */ // vtable /* 0x04 */ // JKRThread /* 0x7C */ u32 mAudioMemoryPtr; diff --git a/include/JSystem/JMath/JMATrigonometric.h b/include/JSystem/JMath/JMATrigonometric.h index a01b717ca8..027eafb092 100644 --- a/include/JSystem/JMath/JMATrigonometric.h +++ b/include/JSystem/JMath/JMATrigonometric.h @@ -38,12 +38,18 @@ extern TAtanTable atanTable_; extern TAsinAcosTable asinAcosTable_; }; // namespace JMath -inline f32 JMASSin(s16 s) { - return JMath::sincosTable_.sinShort(s); +inline f32 JMASCosShort(s16 v) { + return JMath::sincosTable_.cosShort(v); +} +inline f32 JMASinShort(s16 v) { + return JMath::sincosTable_.sinShort(v); } -inline f32 JMASCos(s16 s) { - return JMath::sincosTable_.cosShort(s); +inline f32 JMASCos(s16 v) { + return JMASCosShort(v); +} +inline f32 JMASSin(s16 v) { + return JMASinShort(v); } #endif /* JMATRIGONOMETRIC_H */ diff --git a/include/JSystem/JUtility/JUTAssert.h b/include/JSystem/JUtility/JUTAssert.h index c9d9f3c86f..61edbfbee3 100644 --- a/include/JSystem/JUtility/JUTAssert.h +++ b/include/JSystem/JUtility/JUTAssert.h @@ -23,14 +23,13 @@ #define JUT_PANIC(...) #endif -// TODO: make it a namespace -struct JUTAssertion { - /* 802E495C */ static void create(); - /* 802E4960 */ static u32 flush_subroutine(); - /* 802E499C */ static void flushMessage(); - /* 802E4A54 */ static void flushMessage_dbPrint(); - /* 802E4C34 */ static void setVisible(bool); - /* 802E4C3C */ static void setMessageCount(int); +namespace JUTAssertion { + /* 802E495C */ void create(); + /* 802E4960 */ u32 flush_subroutine(); + /* 802E499C */ void flushMessage(); + /* 802E4A54 */ void flushMessage_dbPrint(); + /* 802E4C34 */ void setVisible(bool); + /* 802E4C3C */ void setMessageCount(int); }; extern bool sAssertVisible; diff --git a/include/JSystem/JUtility/JUTCacheFont.h b/include/JSystem/JUtility/JUTCacheFont.h index 53a6dcf30b..c244852aeb 100644 --- a/include/JSystem/JUtility/JUTCacheFont.h +++ b/include/JSystem/JUtility/JUTCacheFont.h @@ -8,8 +8,8 @@ class JUTCacheFont : public JUTResFont { public: struct TGlyphCacheInfo { - /* 0x0 */ TGlyphCacheInfo* field_0x0; - /* 0x4 */ TGlyphCacheInfo** field_0x4; + /* 0x0 */ TGlyphCacheInfo* mPrev; + /* 0x4 */ TGlyphCacheInfo* mNext; }; struct TCachePage { @@ -64,7 +64,7 @@ private: /* 0x84 */ void* field_0x84; /* 0x88 */ u32 mMaxSheetSize; /* 0x8C */ EPagingType mPagingType; - /* 0x90 */ void** mCacheBuffer; + /* 0x90 */ void* mCacheBuffer; /* 0x94 */ int field_0x94; /* 0x98 */ u32 mCachePage; /* 0x9C */ TGlyphCacheInfo* field_0x9c; diff --git a/include/JSystem/JUtility/JUTConsole.h b/include/JSystem/JUtility/JUTConsole.h index 6714e1922d..1fe9467b99 100644 --- a/include/JSystem/JUtility/JUTConsole.h +++ b/include/JSystem/JUtility/JUTConsole.h @@ -148,5 +148,6 @@ extern "C" JUTConsole* JUTGetWarningConsole(); 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 JUTReportConsole(const char* message); #endif /* JUTCONSOLE_H */ diff --git a/include/JSystem/JUtility/JUTFont.h b/include/JSystem/JUtility/JUTFont.h index 6346dea95e..d1d88b1417 100644 --- a/include/JSystem/JUtility/JUTFont.h +++ b/include/JSystem/JUtility/JUTFont.h @@ -55,6 +55,7 @@ struct ResFONT { /* 0x08 */ u32 filesize; /* 0x0C */ u32 numBlocks; /* 0x10 */ u8 padding[0x10]; + /* 0x20 */ u8 data[]; }; class JUTFont { diff --git a/include/JSystem/JUtility/JUTResFont.h b/include/JSystem/JUtility/JUTResFont.h index b79483d146..3a7a067b46 100644 --- a/include/JSystem/JUtility/JUTResFont.h +++ b/include/JSystem/JUtility/JUTResFont.h @@ -3,9 +3,13 @@ #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JUtility/JUTFont.h" -#include "dolphin/types.h" -typedef bool (*IsLeadByte)(int); +typedef bool (*IsLeadByte_func)(int); + +struct BlockHeader { + u32 magic; + u32 size; +}; class JUTResFont : public JUTFont { public: @@ -43,7 +47,7 @@ public: initialize_state(); } - static void* const saoAboutEncoding_[3]; + static IsLeadByte_func const saoAboutEncoding_[3]; // some types uncertain, may need to be fixed /* 0x1C */ int mWidth; @@ -61,7 +65,7 @@ public: /* 0x64 */ u16 mMap1BlockNum; /* 0x66 */ u16 field_0x66; /* 0x68 */ u16 mMaxCode; - /* 0x6C */ IsLeadByte* mIsLeadByte; + /* 0x6C */ IsLeadByte_func* mIsLeadByte; }; #endif /* JUTRESFONT_H */ |
