Files
tp/include/JSystem/JUtility/JUTPalette.h
T

52 lines
1.2 KiB
C++
Raw Normal View History

2021-03-28 22:49:05 +02:00
#ifndef JUTPALETTE_H
#define JUTPALETTE_H
#include <dolphin/gx.h>
2021-03-28 22:49:05 +02:00
2021-08-28 07:25:03 -07:00
enum JUTTransparency { UNK0, UNK1 };
2024-04-12 00:10:30 -06:00
/**
* @ingroup jsystem-jutility
*
*/
2021-08-28 07:25:03 -07:00
struct ResTLUT {
u8 format;
u8 transparency;
u16 numColors;
};
2024-04-12 00:10:30 -06:00
/**
* @ingroup jsystem-jutility
*
*/
2021-08-28 07:25:03 -07:00
class JUTPalette {
public:
2022-01-04 18:18:23 +01:00
JUTPalette(_GXTlut p1, _GXTlutFmt p2, JUTTransparency p3, u16 p4, void* p5) {
this->storeTLUT(p1, p2, p3, p4, p5);
}
JUTPalette(GXTlut tlutNo, ResTLUT* p_tlutRes) {
storeTLUT(tlutNo, p_tlutRes);
}
2021-08-28 07:25:03 -07:00
/* 802DE890 */ void storeTLUT(_GXTlut, ResTLUT*);
/* 802DE91C */ void storeTLUT(_GXTlut, _GXTlutFmt, JUTTransparency, u16, void*);
/* 802DE95C */ bool load();
u8 getTlutName() const { return mTlutName; }
2023-08-06 06:12:26 +03:00
u8 getFormat() const { return mFormat; }
u8 getTransparency() const { return mTransparency; }
u16 getNumColors() const { return mNumColors; }
ResTLUT* getColorTable() const { return mColorTable; }
2021-08-28 07:25:03 -07:00
private:
/* 0x00 */ _GXTlutObj mTlutObj;
/* 0x0C */ u8 mTlutName;
/* 0x0D */ u8 mFormat;
/* 0x10 */ ResTLUT* mColorTable;
/* 0x14 */ u16 mNumColors;
/* 0x16 */ u8 mTransparency;
};
2021-03-28 22:49:05 +02:00
#endif /* JUTPALETTE_H */