summaryrefslogtreecommitdiff
path: root/include/JSystem/JUtility
diff options
context:
space:
mode:
authorhatal175 <hatal175@users.noreply.github.com>2023-08-06 06:12:26 +0300
committerGitHub <noreply@github.com>2023-08-05 21:12:26 -0600
commitdc985026fa6545bede38d841b7100eceb34e97e4 (patch)
tree2cc4ea27185775862f14ca64a5e99d401046f40f /include/JSystem/JUtility
parent8b34c0210f686db96979c9a36aea45e6dda7169a (diff)
Jsystem work (#399)
* Almost match JASBasicInst * JASDrumSet OK * Some JAudio2 struct adjustment * Match JKRHeap::callAllDisposer * JAISe OK * Fix setAutoDelete * JAISound OK * Match a few functions in linklist * Few matches in d_a_e_ym * JUTTexture OK * Work on JUTGamePad * Import JUTResource * Work on JUTResFont::getFontCode
Diffstat (limited to 'include/JSystem/JUtility')
-rw-r--r--include/JSystem/JUtility/JUTFont.h2
-rw-r--r--include/JSystem/JUtility/JUTPalette.h4
-rw-r--r--include/JSystem/JUtility/JUTResFont.h2
-rw-r--r--include/JSystem/JUtility/JUTResource.h13
-rw-r--r--include/JSystem/JUtility/JUTTexture.h5
5 files changed, 20 insertions, 6 deletions
diff --git a/include/JSystem/JUtility/JUTFont.h b/include/JSystem/JUtility/JUTFont.h
index f5617007dd..8aef329401 100644
--- a/include/JSystem/JUtility/JUTFont.h
+++ b/include/JSystem/JUtility/JUTFont.h
@@ -80,7 +80,7 @@ public:
/* 0x2C */ virtual void getWidthEntry(int i_no, TWidth* width) const = 0;
/* 0x30 */ virtual int getCellWidth() const;
/* 0x34 */ virtual s32 getCellHeight() const;
- /* 0x38 */ virtual u16 getFontType() const = 0;
+ /* 0x38 */ virtual int getFontType() const = 0;
/* 0x3C */ virtual ResFONT* getResFont() const = 0;
/* 0x40 */ virtual bool isLeadByte(int a1) const = 0;
diff --git a/include/JSystem/JUtility/JUTPalette.h b/include/JSystem/JUtility/JUTPalette.h
index 9705458d01..19ad39c29f 100644
--- a/include/JSystem/JUtility/JUTPalette.h
+++ b/include/JSystem/JUtility/JUTPalette.h
@@ -28,6 +28,10 @@ public:
/* 802DE95C */ bool load();
u8 getTlutName() const { return mTlutName; }
+ u8 getFormat() const { return mFormat; }
+ u8 getTransparency() const { return mTransparency; }
+ u16 getNumColors() const { return mNumColors; }
+ ResTLUT* getColorTable() const { return mColorTable; }
private:
/* 0x00 */ _GXTlutObj mTlutObj;
diff --git a/include/JSystem/JUtility/JUTResFont.h b/include/JSystem/JUtility/JUTResFont.h
index 401eee9fd4..426429b6f4 100644
--- a/include/JSystem/JUtility/JUTResFont.h
+++ b/include/JSystem/JUtility/JUTResFont.h
@@ -29,7 +29,7 @@ public:
/* 802DFC64 */ virtual void getWidthEntry(int, JUTFont::TWidth*) const;
/* 802DFD0C */ virtual int getCellWidth() const;
/* 802DFD58 */ virtual s32 getCellHeight() const;
- /* 802DDFE0 */ virtual u16 getFontType() const;
+ /* 802DDFE0 */ virtual int getFontType() const;
/* 802DDFD8 */ virtual ResFONT* getResFont() const;
/* 802DFDA4 */ virtual bool isLeadByte(int) const;
/* 802DFF60 */ virtual void loadImage(int, _GXTexMapID);
diff --git a/include/JSystem/JUtility/JUTResource.h b/include/JSystem/JUtility/JUTResource.h
index 3f4846caba..8a6b3120c0 100644
--- a/include/JSystem/JUtility/JUTResource.h
+++ b/include/JSystem/JUtility/JUTResource.h
@@ -8,10 +8,19 @@ class JSUInputStream;
class JUTResReference {
private:
- u8 unk_0x0[0x101];
+ /* 0x001 */ u8 mType;
+ /* 0x002 */ u8 mNameLength;
+ /* 0x003 */ char mName[0x100];
public:
- JUTResReference() { unk_0x0[0] = 0; }
+ enum ResType {
+ RESTYPE_Null = 0,
+ RESTYPE_Unk1 = 1,
+ RESTYPE_Unk2 = 2,
+ RESTYPE_Unk3 = 3,
+ RESTYPE_Unk4 = 4,
+ };
+ JUTResReference() { mType = 0; }
/* 802DE078 */ void* getResource(JSUInputStream*, u32, JKRArchive*);
/* 802DE120 */ void* getResource(void const*, u32, JKRArchive*);
/* 802DE1BC */ void* getResource(u32, JKRArchive*);
diff --git a/include/JSystem/JUtility/JUTTexture.h b/include/JSystem/JUtility/JUTTexture.h
index c9c179af1e..d3e19a1f95 100644
--- a/include/JSystem/JUtility/JUTTexture.h
+++ b/include/JSystem/JUtility/JUTTexture.h
@@ -65,6 +65,7 @@ public:
void setCaptureFlag(bool flag) { mFlags &= 2 | flag; }
u8 getCaptureFlag() const { return mFlags & 1; }
u8 getEmbPaletteDelFlag() const { return mFlags & 2; }
+ void setEmbPaletteDelFlag(bool flag) { mFlags = (mFlags & 1) | (flag << 1);}
u8 getTlutName() const { return mTlutName; }
private:
@@ -77,8 +78,8 @@ private:
/* 0x31 */ u8 mWrapT;
/* 0x32 */ u8 mMinFilter;
/* 0x33 */ u8 mMagFilter;
- /* 0x34 */ s16 mMinLOD;
- /* 0x36 */ s16 mMaxLOD;
+ /* 0x34 */ u16 mMinLOD;
+ /* 0x36 */ u16 mMaxLOD;
/* 0x38 */ s16 mLODBias;
/* 0x3A */ u8 mTlutName;
/* 0x3B */ u8 mFlags;