mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 23:07:42 +00:00
CActor: Make Render() a non-const function
A few implementations of Render() contain const-casts nested within its their call hierarchy to get around the fact that this function is marked const. We can just make the member function non-const to allow removal of these casts in follow up changes.
This commit is contained in:
@@ -257,7 +257,7 @@ bool CActor::IsModelOpaque(const CStateManager& mgr) const {
|
||||
return x64_modelData->IsDefinitelyOpaque(CModelData::GetRenderingModel(mgr));
|
||||
}
|
||||
|
||||
void CActor::Render(const CStateManager& mgr) const {
|
||||
void CActor::Render(CStateManager& mgr) {
|
||||
if (x64_modelData && !x64_modelData->IsNull()) {
|
||||
bool renderPrePostParticles = xe6_29_renderParticleDBInside && x64_modelData && x64_modelData->HasAnimData();
|
||||
if (renderPrePostParticles)
|
||||
@@ -512,12 +512,12 @@ float CActor::GetPitch() const { return zeus::CQuaternion(x34_transform.buildMat
|
||||
|
||||
float CActor::GetYaw() const { return zeus::CQuaternion(x34_transform.buildMatrix3f()).yaw(); }
|
||||
|
||||
void CActor::EnsureRendered(const CStateManager& mgr) const {
|
||||
zeus::CAABox aabb = GetSortingBounds(mgr);
|
||||
void CActor::EnsureRendered(const CStateManager& mgr) {
|
||||
const zeus::CAABox aabb = GetSortingBounds(mgr);
|
||||
EnsureRendered(mgr, aabb.closestPointAlongVector(CGraphics::g_ViewMatrix.basis[1]), aabb);
|
||||
}
|
||||
|
||||
void CActor::EnsureRendered(const CStateManager& stateMgr, const zeus::CVector3f& pos, const zeus::CAABox& aabb) const {
|
||||
void CActor::EnsureRendered(const CStateManager& stateMgr, const zeus::CVector3f& pos, const zeus::CAABox& aabb) {
|
||||
if (x64_modelData) {
|
||||
x64_modelData->RenderUnsortedParts(x64_modelData->GetRenderingModel(stateMgr), x34_transform, x90_actorLights.get(),
|
||||
xb4_drawFlags);
|
||||
|
||||
Reference in New Issue
Block a user