NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
g3d_resanmscn.h
1#ifndef NW4R_G3D_RES_RES_ANM_SCN_H
2#define NW4R_G3D_RES_RES_ANM_SCN_H
3#include <nw4r/types_nw4r.h>
4
5#include <nw4r/g3d/res/g3d_resanm.h>
6#include <nw4r/g3d/res/g3d_resanmamblight.h>
7#include <nw4r/g3d/res/g3d_resanmcamera.h>
8#include <nw4r/g3d/res/g3d_resanmfog.h>
9#include <nw4r/g3d/res/g3d_resanmlight.h>
10#include <nw4r/g3d/res/g3d_rescommon.h>
11#include <nw4r/g3d/res/g3d_reslightset.h>
12
13namespace nw4r {
14namespace g3d {
15
17 u16 numFrame; // at 0x0
18 u16 numSpecularLight; // at 0x2
19 AnmPolicy policy; // at 0x4
20 u16 numResLightSetData; // at 0x8
21 u16 numResAnmAmbLightData; // at 0xA
22 u16 numResAnmLightData; // at 0xC
23 u16 numResAnmFogData; // at 0xE
24 u16 numResAnmCameraData; // at 0x10
25 u8 PADDING_0x12[0x14 - 0x12]; // at 0x12
26};
27
29 ResBlockHeaderData header; // at 0x0
30 ulong revision; // at 0x8
31 s32 toResFileData; // at 0xC
32 s32 toScnTopLevelDic; // at 0x10
33 s32 toResLightSetDataArray; // at 0x14
34 s32 toResAnmAmbLightDataArray; // at 0x18
35 s32 toResAnmLightDataArray; // at 0x1C
36 s32 toResAnmFogDataArray; // at 0x20
37 s32 toResAnmCameraDataArray; // at 0x24
38 s32 name; // at 0x28
39 s32 original_path; // at 0x2C
40 ResAnmScnInfoData info; // at 0x30
41};
42
43class ResAnmScn : public ResCommon<ResAnmScnData> {
44public:
45 static const ulong SIGNATURE = 'SCN0';
46 static const int REVISION = 4;
47
48public:
49 NW4R_G3D_RESOURCE_FUNC_DEF(ResAnmScn);
50
51 bool Bind(const ResAnmScn scene);
52
53 bool Bind() {
54 return Bind(*this);
55 }
56
57 ulong GetRevision() const {
58 return ref().revision;
59 }
60
61 bool CheckRevision() const {
62 return GetRevision() == REVISION;
63 }
64
65 bool HasResAnmAmbLight() const;
66 bool HasResAnmLight() const;
67
68 ResLightSet GetResLightSet(int idx) const;
69 ResLightSet GetResLightSet(ulong idx) const;
70 ulong GetResLightSetNumEntries() const;
71
72 ResAnmAmbLight GetResAnmAmbLight(const ResName name) const;
73 ResAnmAmbLight GetResAnmAmbLight(int idx) const;
74 ResAnmAmbLight GetResAnmAmbLight(ulong idx) const;
75
76 ResAnmLight GetResAnmLight(const ResName name) const;
77 ResAnmLight GetResAnmLight(int idx) const;
78 ResAnmLight GetResAnmLight(ulong idx) const;
79
80 ResLightSet GetResLightSetByRefNumber(ulong refNumber) const;
81 ResAnmAmbLight GetResAnmAmbLightByRefNumber(ulong refNumber) const;
82 ResAnmLight GetResAnmLightByRefNumber(ulong refNumber) const;
83 ResAnmFog GetResAnmFogByRefNumber(ulong refNumber) const;
84 ResAnmCamera GetResAnmCameraByRefNumber(ulong refNumber) const;
85
86 u16 GetResAnmFogMaxRefNumber() const {
87 return ref().info.numResAnmFogData;
88 }
89};
90
91} // namespace g3d
92} // namespace nw4r
93
94#endif
3D graphics drawing library.
Definition g3d_3dsmax.h:10