NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
ef_res_texture.h
1#ifndef NW4R_EF_RES_TEXTURE_H
2#define NW4R_EF_RES_TEXTURE_H
3#include <nw4r/types_nw4r.h>
4
5#include <nw4r/ef/ef_types.h>
6
7namespace nw4r {
8namespace ef {
9
10// TODO: Unsure which field is missing
12 char* name; // at 0x0
13 u16 width; // at 0x4
14 u16 height; // at 0x6
15 ulong dataSize; // at 0x8
16 u8 format; // at 0xC
17 u8 tlutFormat; // at 0xD
18 u16 tlutEntries; // at 0xE
19 ulong tlutSize; // at 0x10
20 u8 mipmap; // at 0x14
21 u8 min_filt; // at 0x15
22 u8 mag_filt; // at 0x16
23 u8 reserved[1]; // at 0x17
24 // f32 lod_bias; // at 0x18
25 u8* texture; // at 0x18
26 u8* tlut; // at 0x1C
27};
28
29class ResTexture {
30private:
31 TextureData* mData; // at 0x0
32
33public:
34 explicit ResTexture(TextureData* pData = NULL) : mData(pData) {}
35 explicit ResTexture(const ResTexture& rOther) : mData(rOther.mData) {}
36
37 bool IsValid() const {
38 return mData != NULL;
39 }
40
41 TextureData* ptr() {
42 return mData;
43 }
44};
45
46} // namespace ef
47} // namespace nw4r
48
49#endif