diff --git a/Runtime/Character/CActorLights.cpp b/Runtime/Character/CActorLights.cpp index f2e2812cc..be2ece434 100644 --- a/Runtime/Character/CActorLights.cpp +++ b/Runtime/Character/CActorLights.cpp @@ -66,7 +66,7 @@ void CActorLights::ActivateLights(CBooModel& model) const if (!x298_26_ || !x299_26_) { model.ActivateLights(lights); - return; + //return; } } diff --git a/Runtime/Character/CModelData.cpp b/Runtime/Character/CModelData.cpp index 7da849ed0..5e04bd0a3 100644 --- a/Runtime/Character/CModelData.cpp +++ b/Runtime/Character/CModelData.cpp @@ -24,7 +24,7 @@ CModelData::CModelData() {} CModelData CModelData::CModelDataNull() {return CModelData();} CModelData::CModelData(const CStaticRes& res) -: x0_particleScale(res.GetScale()) +: x0_scale(res.GetScale()) { x1c_normalModel = g_SimplePool->GetObj({SBIG('CMDL'), res.GetId()}); if (!x1c_normalModel) @@ -33,7 +33,7 @@ CModelData::CModelData(const CStaticRes& res) } CModelData::CModelData(const CAnimRes& res) -: x0_particleScale(res.GetScale()) +: x0_scale(res.GetScale()) { TToken factory = g_CharFactoryBuilder->GetFactory(res); x10_animData = factory->CreateCharacter(res.GetCharacterNodeId(), res.CanLoop(), factory, res.GetDefaultAnim()); @@ -185,25 +185,25 @@ void CModelData::AdvanceParticles(const zeus::CTransform& xf, float dt, { if (!x10_animData) return; - x10_animData->AdvanceParticles(xf, dt, x0_particleScale, stateMgr); + x10_animData->AdvanceParticles(xf, dt, x0_scale, stateMgr); } zeus::CAABox CModelData::GetBounds() const { if (x10_animData) { - return x10_animData->GetBoundingBox(zeus::CTransform::Scale(x0_particleScale)); + return x10_animData->GetBoundingBox(zeus::CTransform::Scale(x0_scale)); } else { const zeus::CAABox& aabb = x1c_normalModel->GetAABB(); - return zeus::CAABox(aabb.min * x0_particleScale, aabb.max * x0_particleScale); + return zeus::CAABox(aabb.min * x0_scale, aabb.max * x0_scale); } } zeus::CAABox CModelData::GetBounds(const zeus::CTransform& xf) const { - zeus::CTransform xf2 = xf * zeus::CTransform::Scale(x0_particleScale); + zeus::CTransform xf2 = xf * zeus::CTransform::Scale(x0_scale); if (x10_animData) return x10_animData->GetBoundingBox(xf2); else @@ -214,14 +214,14 @@ zeus::CTransform CModelData::GetScaledLocatorTransformDynamic(const std::string& const CCharAnimTime* time) const { zeus::CTransform xf = GetLocatorTransformDynamic(name, time); - xf.origin *= x0_particleScale; + xf.origin *= x0_scale; return xf; } zeus::CTransform CModelData::GetScaledLocatorTransform(const std::string& name) const { zeus::CTransform xf = GetLocatorTransform(name); - xf.origin *= x0_particleScale; + xf.origin *= x0_scale; return xf; } @@ -253,7 +253,7 @@ SAdvancementDeltas CModelData::AdvanceAnimationIgnoreParticles(float dt, CRandom SAdvancementDeltas CModelData::AdvanceAnimation(float dt, CStateManager& stateMgr, TAreaId aid, bool advTree) { if (x10_animData) - return x10_animData->Advance(dt, x0_particleScale, stateMgr, aid, advTree); + return x10_animData->Advance(dt, x0_scale, stateMgr, aid, advTree); else return {}; } @@ -295,7 +295,7 @@ void CModelData::Touch(const CStateManager& stateMgr, int shaderIdx) void CModelData::RenderThermal(const zeus::CTransform& xf, const zeus::CColor& a, const zeus::CColor& b) { - CGraphics::SetModelMatrix(xf * zeus::CTransform::Scale(x0_particleScale)); + CGraphics::SetModelMatrix(xf * zeus::CTransform::Scale(x0_scale)); CGraphics::DisableAllLights(); CModelFlags drawFlags; drawFlags.m_extendedShaderIdx = 3; @@ -323,7 +323,7 @@ void CModelData::RenderUnsortedParts(EWhichModel which, const zeus::CTransform& return; } - CGraphics::SetModelMatrix(xf * zeus::CTransform::Scale(x0_particleScale)); + CGraphics::SetModelMatrix(xf * zeus::CTransform::Scale(x0_scale)); std::unique_ptr& model = PickStaticModel(which); if (lights) @@ -347,7 +347,7 @@ void CModelData::Render(EWhichModel which, const zeus::CTransform& xf, } else { - CGraphics::SetModelMatrix(xf * zeus::CTransform::Scale(x0_particleScale)); + CGraphics::SetModelMatrix(xf * zeus::CTransform::Scale(x0_scale)); if (x10_animData) { diff --git a/Runtime/Character/CModelData.hpp b/Runtime/Character/CModelData.hpp index 1ca24d13c..79aeec138 100644 --- a/Runtime/Character/CModelData.hpp +++ b/Runtime/Character/CModelData.hpp @@ -66,7 +66,7 @@ public: class CModelData { friend class CActor; - zeus::CVector3f x0_particleScale; + zeus::CVector3f x0_scale; bool xc_ = false; std::unique_ptr x10_animData; union diff --git a/Runtime/Graphics/CTexture.hpp b/Runtime/Graphics/CTexture.hpp index a50ecb5b5..614f15fb2 100644 --- a/Runtime/Graphics/CTexture.hpp +++ b/Runtime/Graphics/CTexture.hpp @@ -39,10 +39,6 @@ class CTexture void BuildC8(const void* data); public: - ~CTexture() - { - printf(""); - } CTexture(std::unique_ptr&& in, u32 length); enum class EClampMode { diff --git a/Runtime/World/CWorldTransManager.cpp b/Runtime/World/CWorldTransManager.cpp index 358b0a782..cda8cf9a0 100644 --- a/Runtime/World/CWorldTransManager.cpp +++ b/Runtime/World/CWorldTransManager.cpp @@ -353,6 +353,10 @@ void CWorldTransManager::EnableTransition(const CAnimRes& samusRes, { x4_modelData->x100_bgModelData[0] = CStaticRes(bgRes, bgScale); x4_modelData->x100_bgModelData[0].Touch(CModelData::EWhichModel::Normal, 0); + x4_modelData->x100_bgModelData[1] = CStaticRes(bgRes, bgScale); + x4_modelData->x100_bgModelData[1].Touch(CModelData::EWhichModel::Normal, 0); + x4_modelData->x100_bgModelData[2] = CStaticRes(bgRes, bgScale); + x4_modelData->x100_bgModelData[2].Touch(CModelData::EWhichModel::Normal, 0); zeus::CAABox bounds = x4_modelData->x100_bgModelData[0].GetBounds(); x1c_bgHeight = (bounds.max.z - bounds.min.z) * bgScale.z; }