NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
ef_resource.h
1#ifndef NW4R_EF_RESOURCE_H
2#define NW4R_EF_RESOURCE_H
3#include <nw4r/types_nw4r.h>
4
5#include <nw4r/ef/ef_res_emitter.h>
6#include <nw4r/ef/ef_res_texture.h>
7
8#include <nw4r/ut.h>
9
10namespace nw4r {
11namespace ef {
12
13// Forward declarations
14struct EmitterResource;
15
17 ulong headersize; // at 0x0
18 ut::Link projectlink; // at 0x4
19 u16 projectnameLen; // at 0xC
20 u16 PADDING_0xE; // at 0xE
21 u8 projectname[4]; // at 0x10
22};
23
25 ulong headersize; // at 0x0
26 ut::Link projectlink; // at 0x4
27 u16 projectnameLen; // at 0xC
28 u16 PADDING_0xE; // at 0xE
29 u8 projectname[4]; // at 0x10
30};
31
32class Resource {
33private:
34 static const u16 VERSION = 7;
35
36public:
37 ut::List mBREFFList; // at 0x0
38 ulong mNumEmitter; // at 0xC
39 ut::List mBREFTList; // at 0x10
40 ulong mNumTexture; // at 0x1C
41
42public:
43 static u16 GetVersion() {
44 return VERSION;
45 }
46
47 static Resource* GetInstance();
48
49 EffectProject* Add(u8* pData);
50 TextureProject* AddTexture(u8* pData);
51
52 ResEmitter FindEmitter(const char* pName, EffectProject* pEffProject) const;
53 EmitterResource* _FindEmitter(const char* pName,
54 EffectProject* pEffProject) const;
55
56 ulong NumEmitter(EffectProject* pEffProject) const;
57 EmitterResource* _GetEmitterIndexOf(ulong idx,
58 EffectProject* pEffProject) const;
59
60 ResTexture FindTexture(const char* pName,
61 TextureProject* pTexProject) const;
62 TextureData* _FindTexture(const char* pName,
63 TextureProject* pTexProject) const;
64
65 ulong RelocateCommand();
66
67 bool RemoveEffectProject(EffectProject* pEffProject);
68 bool RemoveTextureProject(TextureProject* pTexProject);
69
70private:
71 Resource();
72
73 void Initialize();
74
75 ulong relocateCurveTexture(u8* pCmdList);
76 ulong relocateCurveChild(u8* pCmdList);
77
78private:
79 static Resource mResource;
80};
81
82} // namespace ef
83} // namespace nw4r
84
85#endif