2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-20 12:59:12 +00:00

Implement FlatDraw/DrawFlat calls, add CRandom16 seed value display

This commit is contained in:
2022-07-02 16:16:33 -07:00
parent 52e9afbe98
commit ec9e0bfc0f
6 changed files with 29 additions and 7 deletions

View File

@@ -360,6 +360,21 @@ void CModelData::Render(EWhichModel which, const zeus::CTransform& xf, const CAc
x14_24_renderSorted = false;
}
void CModelData::FlatDraw(EWhichModel which, const zeus::CTransform& xf, bool unsortedOnly, const CModelFlags& flags) {
g_Renderer->SetModelMatrix(xf * zeus::CTransform::Scale(x0_scale));
CGraphics::DisableAllLights();
if (!x10_animData) {
g_Renderer->DrawModelFlat(*PickStaticModel(which), flags, unsortedOnly, nullptr, nullptr);
} else {
auto model = PickAnimatedModel(which);
x10_animData->SetupRender(model, nullptr, nullptr);
model.DoDrawCallback([=](TConstVectorRef positions, TConstVectorRef normals) {
auto m = model.GetModel();
g_Renderer->DrawModelFlat(*m, flags, unsortedOnly, positions, normals);
});
}
}
void CModelData::MultiLightingDraw(EWhichModel which, const zeus::CTransform& xf, const CActorLights* lights,
const zeus::CColor& alphaColor, const zeus::CColor& additiveColor) {
CModel* model = nullptr;