NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
TPL.h
1#ifndef RVL_SDK_TPL_H
2#define RVL_SDK_TPL_H
3#include <types.h>
4
5#include <revolution/GX.h>
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef struct TPLHeader {
11 u16 height; // at 0x0
12 u16 width; // at 0x2
13 u32 format; // at 0x4
14 char* data; // at 0x8
15 GXTexWrapMode wrapS; // at 0xC
16 GXTexWrapMode wrapT; // at 0x10
17 GXTexFilter minFilter; // at 0x14
18 GXTexFilter magFilter; // at 0x18
19 f32 LODBias; // at 0x1C
20 u8 edgeLODEnable; // at 0x20
21 u8 minLOD; // at 0x21
22 u8 maxLOD; // at 0x22
23 u8 unpacked; // at 0x23
24} TPLHeader;
25
26typedef struct TPLClutHeader {
27 u16 numEntries; // at 0x0
28 u8 unpacked; // at 0x1
29 u8 pad8; // at 0x2
30 GXTlutFmt format; // at 0x4
31 char* data; // at 0x8
33
34typedef struct TPLDescriptor {
35 TPLHeader* textureHeader; // at 0x0
36 TPLClutHeader* CLUTHeader; // at 0x4
38
39typedef struct TPLPalette {
40 u32 versionNumber; // at 0x0
41 u32 numDescriptors; // at 0x4
42 TPLDescriptor* descriptorArray; // at 0x8
44
45void TPLBind(TPLPalette* pal);
46TPLDescriptor* TPLGet(TPLPalette* pal, u32 id);
47
48#ifdef __cplusplus
49}
50#endif
51#endif