2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-14 01:26:09 +00:00

CGuiFrame & Model fixes; CModel::Draw impl; Document CModelFlags bits

This commit is contained in:
2022-03-05 19:26:52 -05:00
parent b3daf4a527
commit 6c3e74b93e
25 changed files with 135 additions and 192 deletions

View File

@@ -249,12 +249,28 @@ void CModel::Touch(u32 matIdx) {
}
}
void CModel::Draw(CModelFlags flags) const {}
void CModel::Draw(CModelFlags flags) {
if (flags.x2_flags & CModelFlagBits::DrawNormal) {
x28_modelInst->DrawNormal(nullptr, nullptr, ESurfaceSelection::All);
}
CCubeMaterial::ResetCachedMaterials();
MoveToThisFrameList();
VerifyCurrentShader(flags.x1_matSetIdx);
x28_modelInst->Draw(flags);
}
void CModel::Draw(TVectorRef positions, TVectorRef normals, CModelFlags flags) {}
void CModel::Draw(TVectorRef positions, TVectorRef normals, const CModelFlags& flags) {
if (flags.x2_flags & CModelFlagBits::DrawNormal) {
x28_modelInst->DrawNormal(positions, normals, ESurfaceSelection::All);
}
CCubeMaterial::ResetCachedMaterials();
MoveToThisFrameList();
VerifyCurrentShader(flags.x1_matSetIdx);
x28_modelInst->Draw(positions, normals, flags);
}
void CModel::DrawSortedParts(CModelFlags flags) {
if ((flags.x2_flags & 0x20) != 0) {
if (flags.x2_flags & CModelFlagBits::DrawNormal) {
x28_modelInst->DrawNormal(nullptr, nullptr, ESurfaceSelection::Sorted);
}
CCubeMaterial::ResetCachedMaterials();
@@ -264,7 +280,7 @@ void CModel::DrawSortedParts(CModelFlags flags) {
}
void CModel::DrawUnsortedParts(CModelFlags flags) {
if ((flags.x2_flags & 0x20) != 0) {
if (flags.x2_flags & CModelFlagBits::DrawNormal) {
x28_modelInst->DrawNormal(nullptr, nullptr, ESurfaceSelection::Unsorted);
}
CCubeMaterial::ResetCachedMaterials();