mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 01:07:43 +00:00
Various widget constructor stubs and factories
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#include "CGuiModel.hpp"
|
||||
#include "CGuiFrame.hpp"
|
||||
#include "CGuiSys.hpp"
|
||||
#include "CSimplePool.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
CGuiModel::CGuiModel(const CGuiWidgetParms& parms, TResId modelId, u32 lightMode, bool flag)
|
||||
: CGuiWidget(parms), x108_modelId(modelId), x10c_lightMode(lightMode)
|
||||
{
|
||||
if (!flag || (modelId & 0xffff) == 0xffff ||
|
||||
parms.x0_frame->GetGuiSys().GetUsageMode() == CGuiSys::EUsageMode::Two)
|
||||
return;
|
||||
|
||||
xf8_model = parms.x0_frame->GetGuiSys().GetResStore().GetObj({SBIG('CMDL'), modelId});
|
||||
}
|
||||
|
||||
CGuiModel* CGuiModel::Create(CGuiFrame* frame, CInputStream& in, bool flag)
|
||||
{
|
||||
CGuiWidgetParms parms = ReadWidgetHeader(frame, in, flag);
|
||||
|
||||
TResId model = in.readUint32Big();
|
||||
in.readUint32Big();
|
||||
u32 lightMode = in.readUint32Big();
|
||||
|
||||
CGuiModel* ret = new CGuiModel(parms, model, lightMode, flag);
|
||||
ret->ParseBaseInfo(frame, in, parms);
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user