New Super Mario Bros. U Headers
Loading...
Searching...
No Matches
ModelFFL.h
Go to the documentation of this file.
1#pragma once
2
3#include <graphics/Mii_SlotID.h>
4#include <graphics/Mii_WmModeDB.h>
5#include <graphics/RenderObj.h>
6
7#include <common/aglTextureData.h>
8#include <gfx/seadColor.h>
9#include <heap/seadDisposer.h>
10
11#include <nn/ffl.h>
12
13// vtbl Address: 0x100BCCF8
15{
16 // getRuntimeTypeInfoStatic()::typeInfo initialization guard variable Address: 0x101E9E80
17 // getRuntimeTypeInfoStatic()::typeInfo Address: 0x101EAE5C
18 SEAD_RTTI_OVERRIDE(ModelFFL, RenderObj)
19
20public:
22 {
25 cEnvType_P // i.e., P-squirrel
26 };
27 static_assert(sizeof(EnvType) == 4);
28
34 static_assert(sizeof(LightMapType) == 4);
35
42 static_assert(sizeof(InitializeStep) == 4);
43
49 static_assert(sizeof(DrawType) == 4);
50
51 template <typename T>
52 struct InitArg
53 {
55 const T* data;
57 };
58
61
62 static_assert(sizeof(InitArgStoreData) == 0x1C);
63 static_assert(sizeof(InitArgMiddleDB) == 0x1C);
64
65public:
66 // Address: 0x024EF694
67 ModelFFL(s32 opa_render_pass, s32 xlu_render_pass);
68
69 // Address: 0x024F04CC
70 virtual ~ModelFFL()
71 {
73 }
74
75 // Address: 0x024EF900
76 bool initialize(const FFLCharModelDesc* desc, const sead::Vector3f& scale, sead::Heap* heap, sead::Heap* heap_tmp);
77 // Address: 0x024EFAC0
78 bool initialize(Mii::SlotID slot_id, const FFLCharModelDesc* desc, const sead::Vector3f& scale, sead::Heap* heap, sead::Heap* heap_tmp);
79
80 template <typename T>
81 bool initialize(const InitArg<T>& arg, const sead::Vector3f& scale, sead::Heap* heap, sead::Heap* heap_tmp);
82
83 // Address: 0x024EF62C
84 void destroy();
85
86 // Address: 0x024EF680
88 // Address: 0x024EF63C
89 void setExRegColor(const sead::Color4f& light, const sead::Color4f& dark);
90
91 // Address: 0x024EFB88
93
94 // Address: 0x024EFBE8
96
97 // Address: 0x024F0708
98 void calc() override;
99 // Address: 0x024EFBF4
100 void updateView(s32 view_index, const sead::Matrix34f& view_mtx, const sead::Matrix44f& proj_mtx, RenderObjRenderMgr* render_mgr) override;
101 // Address: 0x024EFBF8
102 void calcGPU(s32 view_index, const sead::Matrix34f& view_mtx, const sead::Matrix44f& proj_mtx, RenderObjRenderMgr* render_mgr) override;
103 // Address: 0x024EFE58
104 void drawOpa(s32 view_index, const sead::Matrix34f& view_mtx, const sead::Matrix44f& proj_mtx, RenderObjRenderMgr* render_mgr) override;
105 // Address: 0x024F009C
106 void drawXlu(s32 view_index, const sead::Matrix34f& view_mtx, const sead::Matrix44f& proj_mtx, RenderObjRenderMgr* render_mgr) override;
107
108 // Address: 0x024F0134
109 bool getAdditionalInfo(FFLAdditionalInfo* additional_info, BOOL checkFontRegion) const;
110 // Address: 0x024F01E0
112
113 // Address: 0x024EF9F4
114 bool initializeCpu(const FFLCharModelSource* source, const FFLCharModelDesc* desc);
115 // Address: 0x024F03C8
117
118 void setBaseModelMtx(const sead::Matrix34f& mtx)
119 {
120 mBaseModelMtx = mtx;
122 }
123
124 void setLocalScale(const sead::Vector3f& scale)
125 {
126 mLocalScale.set(scale);
128 }
129
131 {
132 return mEnvTexture_Star;
133 }
134
136 {
137 return mEnvTexture_P;
138 }
139
141 {
142 return mEnvType;
143 }
144
146 {
147 return mLightMapType;
148 }
149
150private:
151 // Address: 0x024EF840
153
154 // Address: 0x024EFBFC
155 void setEnvUniform_(RenderObjRenderMgr* render_mgr);
156 // Address: 0x024EFC70
157 void setEnvViewUniform_(const sead::Matrix34f& model_mtx, const sead::Matrix34f& view_mtx, const sead::Matrix44f& proj_mtx, RenderObjRenderMgr* render_mgr);
158 // Address: 0x024EFCD4
159 void setEnvViewUniformWithLightmapEnable_(const sead::Matrix34f& model_mtx, const sead::Matrix34f& view_mtx, const sead::Matrix44f& proj_mtx, RenderObjRenderMgr* render_mgr);
160
161 // Address: 0x024EFD74
163 // Address: 0x024EFD08
165
166 // Address: 0x024EFFB8
168 // Address: 0x024EFEC4
170
171 // Address: 0x024EF9C4
172 bool initializeCpu_(const FFLCharModelSource* source, const FFLCharModelDesc* desc);
173 // Address: 0x024F0358
175
176 // Address: 0x024EFA44
177 bool setCharModelSource_(const FFLStoreData* store_data, u16);
178 // Address: 0x024F041C
179 bool setCharModelSource_(const FFLMiddleDB* middle_db, u16 index);
180
181 // Address: 0x024EFAAC
183
184private:
208};
209static_assert(sizeof(ModelFFL) == 0x8F0);
210
211template <typename T>
212bool ModelFFL::initialize(const InitArg<T>& arg, const sead::Vector3f& scale, sead::Heap* heap, sead::Heap* heap_tmp)
213{
214 if (!initialize(&arg.desc, scale, heap, heap_tmp))
215 return false;
216
217 if (!setCharModelSource_(arg.data, arg.index))
218 return false;
219
221 return true;
222}
Definition ModelFFL.h:15
FFLCharModel mCharModel
Definition ModelFFL.h:187
void setEnvViewUniformWithLightmapEnable_(const sead::Matrix34f &model_mtx, const sead::Matrix34f &view_mtx, const sead::Matrix44f &proj_mtx, RenderObjRenderMgr *render_mgr)
bool mDrawOpaWithXlu
Definition ModelFFL.h:201
void calc() override
void drawOpa(s32 view_index, const sead::Matrix34f &view_mtx, const sead::Matrix44f &proj_mtx, RenderObjRenderMgr *render_mgr) override
ModelFFL(s32 opa_render_pass, s32 xlu_render_pass)
u32 _814
Definition ModelFFL.h:189
bool allocBuffer_()
LightMapType getLightMapType() const
Definition ModelFFL.h:145
bool initialize(Mii::SlotID slot_id, const FFLCharModelDesc *desc, const sead::Vector3f &scale, sead::Heap *heap, sead::Heap *heap_tmp)
void setLocalScale(const sead::Vector3f &scale)
Definition ModelFFL.h:124
FFLCharModelBuffer mCharModelBuffer
Definition ModelFFL.h:188
sead::Vector3f mLocalScale
Definition ModelFFL.h:193
FFLCharModelSource mCharModelSource
Definition ModelFFL.h:191
LightMapType mLightMapType
Definition ModelFFL.h:200
Mii::WmModeDB::Model * mWmModeDBModel
Definition ModelFFL.h:204
void drawOpaSpecial_()
sead::Color4f getFavoriteColor() const
bool setCharModelSource_(const FFLStoreData *store_data, u16)
agl::TextureData * mEnvTexture_P
Definition ModelFFL.h:198
void updateView(s32 view_index, const sead::Matrix34f &view_mtx, const sead::Matrix44f &proj_mtx, RenderObjRenderMgr *render_mgr) override
agl::TextureData * getEnvTexture_P() const
Definition ModelFFL.h:135
agl::TextureData * getEnvTexture_Star() const
Definition ModelFFL.h:130
agl::TextureData * mEnvTexture_Star
Definition ModelFFL.h:197
FFLCharModelDesc mCharModelDesc
Definition ModelFFL.h:190
InitArg< FFLStoreData > InitArgStoreData
Definition ModelFFL.h:59
bool initialize(const FFLCharModelDesc *desc, const sead::Vector3f &scale, sead::Heap *heap, sead::Heap *heap_tmp)
sead::Color4f mExLightRegColor
Definition ModelFFL.h:195
bool initialize(const InitArg< T > &arg, const sead::Vector3f &scale, sead::Heap *heap, sead::Heap *heap_tmp)
Definition ModelFFL.h:212
sead::Matrix34f mBaseModelMtx
Definition ModelFFL.h:192
void initExRegColor()
sead::Matrix34f mModelMtx
Definition ModelFFL.h:194
Mii::SlotID mSlotID
Definition ModelFFL.h:205
sead::Heap * mHeap
Definition ModelFFL.h:185
bool getAdditionalInfo(FFLAdditionalInfo *additional_info, BOOL checkFontRegion) const
LightMapType
Definition ModelFFL.h:30
@ cLightmapType_Enemy
Definition ModelFFL.h:32
@ cLightmapType_Player
Definition ModelFFL.h:31
void destroy()
void setSpecialDrawType()
void setBaseModelMtx(const sead::Matrix34f &mtx)
Definition ModelFFL.h:118
sead::Color4f mExDarkRegColor
Definition ModelFFL.h:196
void pushBackModelGpuInitializer_()
InitializeStep mInitializeStep
Definition ModelFFL.h:202
s32 mXluRenderPass
Definition ModelFFL.h:207
void drawOpaNormal_()
void drawXluSpecial_()
EnvType getEnvType() const
Definition ModelFFL.h:140
virtual ~ModelFFL()
Definition ModelFFL.h:70
EnvType mEnvType
Definition ModelFFL.h:199
bool initializeCpu_(const FFLCharModelSource *source, const FFLCharModelDesc *desc)
DrawType mDrawType
Definition ModelFFL.h:203
void calcModelMtx()
InitializeStep
Definition ModelFFL.h:37
@ cInitializeStep_Done
Definition ModelFFL.h:40
@ cInitializeStep_NeedInitializeCpu
Definition ModelFFL.h:38
@ cInitializeStep_NeedInitializeGpu
Definition ModelFFL.h:39
void setEnvViewUniform_(const sead::Matrix34f &model_mtx, const sead::Matrix34f &view_mtx, const sead::Matrix44f &proj_mtx, RenderObjRenderMgr *render_mgr)
void initializeGpu_()
bool initializeCpu(const FFLCharModelSource *source, const FFLCharModelDesc *desc)
void setExRegColor(const sead::Color4f &light, const sead::Color4f &dark)
sead::Heap * mHeapTmp
Definition ModelFFL.h:186
void calcGPU(s32 view_index, const sead::Matrix34f &view_mtx, const sead::Matrix44f &proj_mtx, RenderObjRenderMgr *render_mgr) override
DrawType
Definition ModelFFL.h:45
@ cDrawType_Special
Definition ModelFFL.h:47
@ cDrawType_Normal
Definition ModelFFL.h:46
void drawXluNormal_()
void setEnvUniform_(RenderObjRenderMgr *render_mgr)
InitArg< FFLMiddleDB > InitArgMiddleDB
Definition ModelFFL.h:60
void drawXlu(s32 view_index, const sead::Matrix34f &view_mtx, const sead::Matrix44f &proj_mtx, RenderObjRenderMgr *render_mgr) override
void initializeGpu()
s32 mOpaRenderPass
Definition ModelFFL.h:206
Definition ModelFFL.h:53
const T * data
Definition ModelFFL.h:55
FFLCharModelDesc desc
Definition ModelFFL.h:54
u16 index
Definition ModelFFL.h:56