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
13class ModelFFL : public RenderObj, sead::IDisposer // vtbl Address: 0x100BCCF8
14{
15 // getRuntimeTypeInfoStatic()::typeInfo initialization guard variable Address: 0x101E9E80
16 // getRuntimeTypeInfoStatic()::typeInfo Address: 0x101EAE5C
17 SEAD_RTTI_OVERRIDE(ModelFFL, RenderObj)
18
19public:
21 {
24 cEnvType_P // i.e., P-squirrel
25 };
26 static_assert(sizeof(EnvType) == 4);
27
33 static_assert(sizeof(LightMapType) == 4);
34
41 static_assert(sizeof(InitializeStep) == 4);
42
48 static_assert(sizeof(DrawType) == 4);
49
50 template <typename T>
51 struct InitArg
52 {
54 const T* data;
56 };
57
60
61 static_assert(sizeof(InitArgStoreData) == 0x1C);
62 static_assert(sizeof(InitArgMiddleDB) == 0x1C);
63
64public:
65 // Address: 0x024EF694
66 ModelFFL(s32 opa_buffer_idx, s32 xlu_buffer_idx);
67
68 // Address: 0x024F04CC
69 virtual ~ModelFFL()
70 {
72 }
73
74 // Address: 0x024EF900
75 bool initialize(const FFLCharModelDesc* desc, const sead::Vector3f& scale, sead::Heap* heap, sead::Heap* heap_tmp);
76 // Address: 0x024EFAC0
77 bool initialize(Mii::SlotID slot_id, const FFLCharModelDesc* desc, const sead::Vector3f& scale, sead::Heap* heap, sead::Heap* heap_tmp);
78
79 template <typename T>
80 bool initialize(const InitArg<T>& arg, const sead::Vector3f& scale, sead::Heap* heap, sead::Heap* heap_tmp);
81
82 // Address: 0x024EF62C
83 void destroy();
84
85 // Address: 0x024EF680
87 // Address: 0x024EF63C
88 void setExRegColor(const sead::Color4f& light, const sead::Color4f& dark);
89
90 // Address: 0x024EFB88
92
93 // Address: 0x024EFBE8
95
96 // Address: 0x024F0708
97 void calc() override;
98 // Address: 0x024EFBF4
99 void updateView(s32 view_index, const sead::Matrix34f& view_mtx, const sead::Matrix44f& proj_mtx, RenderObjRenderMgr* render_mgr) override;
100 // Address: 0x024EFBF8
101 void calcGPU(s32 view_index, const sead::Matrix34f& view_mtx, const sead::Matrix44f& proj_mtx, RenderObjRenderMgr* render_mgr) override;
102 // Address: 0x024EFE58
103 void drawOpa(s32 view_index, const sead::Matrix34f& view_mtx, const sead::Matrix44f& proj_mtx, RenderObjRenderMgr* render_mgr) override;
104 // Address: 0x024F009C
105 void drawXlu(s32 view_index, const sead::Matrix34f& view_mtx, const sead::Matrix44f& proj_mtx, RenderObjRenderMgr* render_mgr) override;
106
107 // Address: 0x024F0134
108 bool getAdditionalInfo(FFLAdditionalInfo* additional_info, BOOL checkFontRegion) const;
109 // Address: 0x024F01E0
111
112 // Address: 0x024EF9F4
113 bool initializeCpu(const FFLCharModelSource* source, const FFLCharModelDesc* desc);
114 // Address: 0x024F03C8
116
117 void setMtxRT(const sead::Matrix34f& mtx)
118 {
119 mMtxRT = mtx;
121 }
122
123 void setScale(const sead::Vector3f& scale)
124 {
125 mScale.set(scale);
127 }
128
130 {
131 return mEnvTexture_Star;
132 }
133
135 {
136 return mEnvTexture_P;
137 }
138
140 {
141 return mEnvType;
142 }
143
145 {
146 return mLightMapType;
147 }
148
149private:
150 // Address: 0x024EF840
152
153 // Address: 0x024EFBFC
154 void setEnvUniform_(RenderObjRenderMgr* render_mgr);
155 // Address: 0x024EFC70
156 void setEnvViewUniform_(const sead::Matrix34f& model_mtx, const sead::Matrix34f& view_mtx, const sead::Matrix44f& proj_mtx, RenderObjRenderMgr* render_mgr);
157 // Address: 0x024EFCD4
158 void setEnvViewUniformWithLightmapEnable_(const sead::Matrix34f& model_mtx, const sead::Matrix34f& view_mtx, const sead::Matrix44f& proj_mtx, RenderObjRenderMgr* render_mgr);
159
160 // Address: 0x024EFD74
162 // Address: 0x024EFD08
164
165 // Address: 0x024EFFB8
167 // Address: 0x024EFEC4
169
170 // Address: 0x024EF9C4
171 bool initializeCpu_(const FFLCharModelSource* source, const FFLCharModelDesc* desc);
172 // Address: 0x024F0358
174
175 // Address: 0x024EFA44
176 bool setCharModelSource_(const FFLStoreData* store_data, u16);
177 // Address: 0x024F041C
178 bool setCharModelSource_(const FFLMiddleDB* middle_db, u16 index);
179
180 // Address: 0x024EFAAC
182
183private:
207};
208static_assert(sizeof(ModelFFL) == 0x8F0);
209
210template <typename T>
211bool ModelFFL::initialize(const InitArg<T>& arg, const sead::Vector3f& scale, sead::Heap* heap, sead::Heap* heap_tmp)
212{
213 if (!initialize(&arg.desc, scale, heap, heap_tmp))
214 return false;
215
216 if (!setCharModelSource_(arg.data, arg.index))
217 return false;
218
220 return true;
221}
Definition ModelFFL.h:14
FFLCharModel mCharModel
Definition ModelFFL.h:186
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:200
void calc() override
void drawOpa(s32 view_index, const sead::Matrix34f &view_mtx, const sead::Matrix44f &proj_mtx, RenderObjRenderMgr *render_mgr) override
u32 _814
Definition ModelFFL.h:188
bool allocBuffer_()
LightMapType getLightMapType() const
Definition ModelFFL.h:144
bool initialize(Mii::SlotID slot_id, const FFLCharModelDesc *desc, const sead::Vector3f &scale, sead::Heap *heap, sead::Heap *heap_tmp)
FFLCharModelBuffer mCharModelBuffer
Definition ModelFFL.h:187
FFLCharModelSource mCharModelSource
Definition ModelFFL.h:190
LightMapType mLightMapType
Definition ModelFFL.h:199
Mii::WmModeDB::Model * mWmModeDBModel
Definition ModelFFL.h:203
void drawOpaSpecial_()
sead::Color4f getFavoriteColor() const
bool setCharModelSource_(const FFLStoreData *store_data, u16)
agl::TextureData * mEnvTexture_P
Definition ModelFFL.h:197
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:134
agl::TextureData * getEnvTexture_Star() const
Definition ModelFFL.h:129
agl::TextureData * mEnvTexture_Star
Definition ModelFFL.h:196
FFLCharModelDesc mCharModelDesc
Definition ModelFFL.h:189
InitArg< FFLStoreData > InitArgStoreData
Definition ModelFFL.h:58
bool initialize(const FFLCharModelDesc *desc, const sead::Vector3f &scale, sead::Heap *heap, sead::Heap *heap_tmp)
sead::Color4f mExLightRegColor
Definition ModelFFL.h:194
bool initialize(const InitArg< T > &arg, const sead::Vector3f &scale, sead::Heap *heap, sead::Heap *heap_tmp)
Definition ModelFFL.h:211
void initExRegColor()
void updateMtxSRT()
Mii::SlotID mSlotID
Definition ModelFFL.h:204
sead::Matrix34f mMtxRT
Definition ModelFFL.h:191
sead::Heap * mHeap
Definition ModelFFL.h:184
bool getAdditionalInfo(FFLAdditionalInfo *additional_info, BOOL checkFontRegion) const
LightMapType
Definition ModelFFL.h:29
@ cLightmapType_Enemy
Definition ModelFFL.h:31
@ cLightmapType_Player
Definition ModelFFL.h:30
void destroy()
void setSpecialDrawType()
sead::Vector3f mScale
Definition ModelFFL.h:192
sead::Color4f mExDarkRegColor
Definition ModelFFL.h:195
void pushBackModelGpuInitializer_()
InitializeStep mInitializeStep
Definition ModelFFL.h:201
void drawOpaNormal_()
void drawXluSpecial_()
EnvType getEnvType() const
Definition ModelFFL.h:139
sead::Matrix34f mMtxSRT
Definition ModelFFL.h:193
virtual ~ModelFFL()
Definition ModelFFL.h:69
EnvType mEnvType
Definition ModelFFL.h:198
bool initializeCpu_(const FFLCharModelSource *source, const FFLCharModelDesc *desc)
DrawType mDrawType
Definition ModelFFL.h:202
InitializeStep
Definition ModelFFL.h:36
@ cInitializeStep_Done
Definition ModelFFL.h:39
@ cInitializeStep_NeedInitializeCpu
Definition ModelFFL.h:37
@ cInitializeStep_NeedInitializeGpu
Definition ModelFFL.h:38
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:185
void calcGPU(s32 view_index, const sead::Matrix34f &view_mtx, const sead::Matrix44f &proj_mtx, RenderObjRenderMgr *render_mgr) override
s32 mXluBufferIdx
Definition ModelFFL.h:206
DrawType
Definition ModelFFL.h:44
@ cDrawType_Special
Definition ModelFFL.h:46
@ cDrawType_Normal
Definition ModelFFL.h:45
void drawXluNormal_()
void setEnvUniform_(RenderObjRenderMgr *render_mgr)
s32 mOpaBufferIdx
Definition ModelFFL.h:205
InitArg< FFLMiddleDB > InitArgMiddleDB
Definition ModelFFL.h:59
void setMtxRT(const sead::Matrix34f &mtx)
Definition ModelFFL.h:117
void drawXlu(s32 view_index, const sead::Matrix34f &view_mtx, const sead::Matrix44f &proj_mtx, RenderObjRenderMgr *render_mgr) override
void initializeGpu()
ModelFFL(s32 opa_buffer_idx, s32 xlu_buffer_idx)
void setScale(const sead::Vector3f &scale)
Definition ModelFFL.h:123
Definition ModelFFL.h:52
const T * data
Definition ModelFFL.h:54
FFLCharModelDesc desc
Definition ModelFFL.h:53
u16 index
Definition ModelFFL.h:55