mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 17:47:43 +00:00
General: Pass std::nullopt to CAnimData::Render instead of {}
Prevents some implementations (libstdc++ and libc++) from completely zeroing out the underlying buffer and instead sets a single byte flag. Eliminates unnecessary memsets.
This commit is contained in:
@@ -1063,7 +1063,7 @@ void CWallCrawlerSwarm::RenderBoid(const CBoid* boid, u32& drawMask, bool therma
|
||||
CGraphics::SetModelMatrix(boid->GetTransform());
|
||||
if (boid->x48_timeToDie > 0.f && !thermalHot) {
|
||||
const CModelFlags useFlags(0, 0, 3, zeus::skWhite);
|
||||
mData.GetAnimationData()->Render(model, useFlags, {}, nullptr);
|
||||
mData.GetAnimationData()->Render(model, useFlags, std::nullopt, nullptr);
|
||||
if (auto iceModel = mData.GetAnimationData()->GetIceModel()) {
|
||||
if (!iceModel->GetModelInst()->TryLockTextures()) {
|
||||
return;
|
||||
@@ -1072,13 +1072,13 @@ void CWallCrawlerSwarm::RenderBoid(const CBoid* boid, u32& drawMask, bool therma
|
||||
const float alpha = 1.f - boid->x48_timeToDie;
|
||||
const zeus::CColor color(1.f, alpha > 0.f ? boid->x48_timeToDie : 1.f);
|
||||
const CModelFlags iceFlags(5, 0, 3, color);
|
||||
mData.GetAnimationData()->Render(*iceModel, iceFlags, {}, nullptr);
|
||||
mData.GetAnimationData()->Render(*iceModel, iceFlags, std::nullopt, nullptr);
|
||||
}
|
||||
} else if (thermalHot) {
|
||||
const CModelFlags thermFlags(5, 0, 3, zeus::skWhite);
|
||||
mData.RenderThermal(zeus::skWhite, zeus::CColor(0.f, 0.25f), thermFlags);
|
||||
} else {
|
||||
mData.GetAnimationData()->Render(model, flags, {}, nullptr);
|
||||
mData.GetAnimationData()->Render(model, flags, std::nullopt, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user