mirror of
https://github.com/zeldaret/tp
synced 2026-06-02 18:18:59 -04:00
JUtility / JSupport / misc cleanup
This commit is contained in:
@@ -22,7 +22,7 @@ public:
|
||||
u32 getGraphMemory() const { return mGraphMemoryPtr; }
|
||||
u32 getGraphMemSize() const { return mGraphMemorySize; }
|
||||
|
||||
private:
|
||||
//private:
|
||||
/* 0x00 */ // vtable
|
||||
/* 0x04 */ // JKRThread
|
||||
/* 0x7C */ u32 mAudioMemoryPtr;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -55,6 +55,7 @@ struct ResFONT {
|
||||
/* 0x08 */ u32 filesize;
|
||||
/* 0x0C */ u32 numBlocks;
|
||||
/* 0x10 */ u8 padding[0x10];
|
||||
/* 0x20 */ u8 data[];
|
||||
};
|
||||
|
||||
class JUTFont {
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user