JUTCacheFont OK (#1947)

This commit is contained in:
hatal175
2023-09-28 22:32:57 +03:00
committed by GitHub
parent 84e4135053
commit 4a424534a5
19 changed files with 212 additions and 843 deletions
+19 -16
View File
@@ -9,23 +9,25 @@ class JKRAramBlock;
class JUTCacheFont : public JUTResFont {
public:
struct TGlyphCacheInfo {
/* 0x0 */ TGlyphCacheInfo* mPrev;
/* 0x4 */ TGlyphCacheInfo* mNext;
};
struct TCachePage {
/* 0x00 */ u8 field_0x0[8];
/* 0x08 */ s16 field_0x8;
/* 0x00 */ TGlyphCacheInfo* mPrev;
/* 0x04 */ TGlyphCacheInfo* mNext;
/* 0x08 */ u16 field_0x8;
/* 0x0A */ u16 field_0xa;
/* 0x0C */ u8 field_0xc[4];
/* 0x10 */ u8* field_0x10;
/* 0x14 */ u16 field_0x14;
/* 0x0C */ u16 field_0xc;
/* 0x0E */ u16 field_0xe;
/* 0x10 */ u32 field_0x10;
/* 0x14 */ u16 mTexFormat;
/* 0x16 */ u16 field_0x16;
/* 0x18 */ u16 field_0x18;
/* 0x1A */ u16 field_0x1a;
/* 0x1C */ u16 field_0x1c;
/* 0x1A */ u16 mWidth;
/* 0x1C */ u16 mHeight;
/* 0x1E */ u16 field_0x1e;
}; // Size: 0x20
};
struct TCachePage : TGlyphCacheInfo {
/* 0x20 */ GXTexObj mTexObj;
/* 0x40 */ u8 mImage[];
}; // Size: 0x40
enum EPagingType {
PAGE_TYPE_0,
@@ -40,10 +42,10 @@ public:
/* 802DD54C */ bool internal_initiate(ResFONT const*, void*, u32, JKRHeap*);
/* 802DD650 */ bool allocArea(void*, u32, JKRHeap*);
/* 802DD804 */ bool allocArray(JKRHeap*);
/* 802DDB0C */ void determineBlankPage();
/* 802DDB0C */ TGlyphCacheInfo* determineBlankPage();
/* 802DDBBC */ void getGlyphFromAram(JUTCacheFont::TGlyphCacheInfo*, JUTCacheFont::TCachePage*,
int*, int*);
/* 802DDD98 */ void loadCache_char_subroutine(int*, bool);
/* 802DDD98 */ TCachePage* loadCache_char_subroutine(int*, bool);
/* 802DDEE0 */ void invalidiateAllCache();
/* 802DDF68 */ void unlink(JUTCacheFont::TGlyphCacheInfo*);
/* 802DDFAC */ void prepend(JUTCacheFont::TGlyphCacheInfo*);
@@ -55,6 +57,7 @@ public:
void setPagingType(EPagingType type) { mPagingType = type; }
static u32 calcCacheSize(u32 param_0, int param_1) { return (ALIGN_NEXT(param_0, 0x20) + 0x40) * param_1; }
GXTexObj* getTexObj(void* buffer) { return &((TCachePage*)buffer)->mTexObj; }
private:
/* 0x70 */ u32 mTotalWidSize;
@@ -70,7 +73,7 @@ private:
/* 0x98 */ u32 mCachePage;
/* 0x9C */ TGlyphCacheInfo* field_0x9c;
/* 0xA0 */ TGlyphCacheInfo* field_0xa0;
/* 0xA4 */ void* field_0xa4;
/* 0xA4 */ TGlyphCacheInfo* field_0xa4;
/* 0xA8 */ u32 field_0xa8;
/* 0xAC */ JKRAramBlock* field_0xac;
/* 0xB0 */ u8 field_0xb0;