Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JUTTexture.h
Go to the documentation of this file.
1#ifndef JUTTEXTURE_H
2#define JUTTEXTURE_H
3
5
6class JUTPalette;
7
17struct ResTIMG {
18 /* 0x00 */ u8 format;
19 /* 0x01 */ u8 alphaEnabled;
20 /* 0x02 */ u16 width;
21 /* 0x04 */ u16 height;
22 /* 0x06 */ u8 wrapS;
23 /* 0x07 */ u8 wrapT;
24 /* 0x08 */ u8 indexTexture;
25 /* 0x09 */ u8 colorFormat;
26 /* 0x0A */ u16 numColors;
27 /* 0x0C */ u32 paletteOffset;
28 /* 0x10 */ u8 mipmapEnabled;
29 /* 0x11 */ u8 doEdgeLOD;
30 /* 0x12 */ u8 biasClamp;
31 /* 0x13 */ u8 maxAnisotropy;
32 /* 0x14 */ u8 minFilter;
33 /* 0x15 */ u8 magFilter;
34 /* 0x16 */ s8 minLOD;
35 /* 0x17 */ s8 maxLOD;
36 /* 0x18 */ u8 mipmapCount;
37 /* 0x19 */ u8 unknown;
38 /* 0x1A */ s16 LODBias;
39 /* 0x1C */ u32 imageOffset;
40}; // Size: 0x20
41
47public:
49 setCaptureFlag(false);
51 mTexInfo = NULL;
52 }
53
59
61 void storeTIMG(ResTIMG const*, JUTPalette*, _GXTlut);
62 void storeTIMG(ResTIMG const*, u8);
63 void storeTIMG(ResTIMG const*, JUTPalette*);
65 void init();
66 void initTexObj(_GXTlut);
67 void initTexObj();
68 void load(_GXTexMapID);
69
70 const ResTIMG* getTexInfo() const { return mTexInfo; }
71 u8 getFormat() const { return mTexInfo->format; }
73 s32 getWidth() const { return mTexInfo->width; }
74 s32 getHeight() const { return mTexInfo->height; }
75 void setCaptureFlag(bool flag) { mFlags &= 2 | flag; }
76 u8 getCaptureFlag() const { return mFlags & 1; }
77 u8 getEmbPaletteDelFlag() const { return mFlags & 2; }
78 void setEmbPaletteDelFlag(bool flag) { mFlags = (mFlags & 1) | (flag << 1);}
79 u8 getTlutName() const { return mTlutName; }
81 return mTexInfo == other.mTexInfo
82 && field_0x2c == other.field_0x2c
83 && mWrapS == other.mWrapS
84 && mWrapT == other.mWrapT
85 && mMinFilter == other.mMinFilter
86 && mMagFilter == other.mMagFilter
87 && mMinLOD == other.mMinLOD
88 && mMinLOD == other.mMinLOD
89 && mLODBias == other.mLODBias;
90 }
92 return !operator==(other);
93 }
94
95private:
96 /* 0x00 */ GXTexObj mTexObj;
97 /* 0x20 */ const ResTIMG* mTexInfo;
98 /* 0x24 */ void* mTexData;
101 /* 0x30 */ u8 mWrapS;
102 /* 0x31 */ u8 mWrapT;
103 /* 0x32 */ u8 mMinFilter;
104 /* 0x33 */ u8 mMagFilter;
105 /* 0x34 */ u16 mMinLOD;
106 /* 0x36 */ u16 mMaxLOD;
107 /* 0x38 */ s16 mLODBias;
108 /* 0x3A */ u8 mTlutName;
109 /* 0x3B */ u8 mFlags;
110 /* 0x3C */ void* field_0x3c;
111};
112
113#endif /* JUTTEXTURE_H */
_GXTlut
Definition GXEnum.h:403
_GXTexMapID
Definition GXEnum.h:30
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JUTPalette.h:22
Definition JUTTexture.h:46
u8 mMinFilter
Definition JUTTexture.h:103
s32 getTransparency()
Definition JUTTexture.h:72
void init()
Definition JUTTexture.cpp:130
JUTTexture()
Definition JUTTexture.h:48
void storeTIMG(ResTIMG const *, JUTPalette *, _GXTlut)
Definition JUTTexture.cpp:76
u8 getFormat() const
Definition JUTTexture.h:71
const ResTIMG * getTexInfo() const
Definition JUTTexture.h:70
void * field_0x3c
Definition JUTTexture.h:110
u16 mMaxLOD
Definition JUTTexture.h:106
JUTPalette * mEmbPalette
Definition JUTTexture.h:99
u8 mWrapT
Definition JUTTexture.h:102
JUTTexture(const ResTIMG *p_timg, u8 param_1)
Definition JUTTexture.h:54
s32 getWidth() const
Definition JUTTexture.h:73
s32 getHeight() const
Definition JUTTexture.h:74
s16 mLODBias
Definition JUTTexture.h:107
u8 mMagFilter
Definition JUTTexture.h:104
void load(_GXTexMapID)
Definition JUTTexture.cpp:183
u8 getCaptureFlag() const
Definition JUTTexture.h:76
void attachPalette(JUTPalette *)
Definition JUTTexture.cpp:117
void setEmbPaletteDelFlag(bool flag)
Definition JUTTexture.h:78
void * mTexData
Definition JUTTexture.h:98
void initTexObj()
Definition JUTTexture.cpp:144
u16 mMinLOD
Definition JUTTexture.h:105
u8 getTlutName() const
Definition JUTTexture.h:79
u8 mFlags
Definition JUTTexture.h:109
JUTPalette * field_0x2c
Definition JUTTexture.h:100
void setCaptureFlag(bool flag)
Definition JUTTexture.h:75
u8 mWrapS
Definition JUTTexture.h:101
GXTexObj mTexObj
Definition JUTTexture.h:96
const ResTIMG * mTexInfo
Definition JUTTexture.h:97
bool operator!=(const JUTTexture &other)
Definition JUTTexture.h:91
u8 mTlutName
Definition JUTTexture.h:108
u8 getEmbPaletteDelFlag() const
Definition JUTTexture.h:77
~JUTTexture()
Definition JUTTexture.cpp:6
bool operator==(const JUTTexture &other)
Definition JUTTexture.h:80
static volatile BOOL flag
Definition dspproc.cpp:20
Image data header.
Definition d_menu_dmap_map.cpp:109
u8 doEdgeLOD
Definition JUTTexture.h:29
u32 imageOffset
Definition JUTTexture.h:39
u16 width
Definition JUTTexture.h:20
u8 alphaEnabled
Definition JUTTexture.h:19
u8 colorFormat
Definition JUTTexture.h:25
u8 minFilter
Definition JUTTexture.h:32
u8 maxAnisotropy
Definition JUTTexture.h:31
u8 unknown
Definition JUTTexture.h:37
u8 biasClamp
Definition JUTTexture.h:30
u8 mipmapCount
Definition JUTTexture.h:36
s8 maxLOD
Definition JUTTexture.h:35
u8 magFilter
Definition JUTTexture.h:33
u8 mipmapEnabled
Definition JUTTexture.h:28
s16 LODBias
Definition JUTTexture.h:38
u32 paletteOffset
Definition JUTTexture.h:27
u8 wrapS
Definition JUTTexture.h:22
u8 wrapT
Definition JUTTexture.h:23
u8 indexTexture
Definition JUTTexture.h:24
u16 height
Definition JUTTexture.h:21
u8 format
Definition JUTTexture.h:18
u16 numColors
Definition JUTTexture.h:26
s8 minLOD
Definition JUTTexture.h:34
Definition d_a_ep.cpp:147
signed char s8
Definition types.h:4
unsigned long u32
Definition types.h:10
signed short s16
Definition types.h:5
unsigned short u16
Definition types.h:9
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8