2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-07-05 13:15:51 +00:00

Initial ScriptLoader cleanup pass

This commit is contained in:
Phillip Stephens 2020-09-11 11:42:51 -07:00
parent b417a01222
commit c2043557c7
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
2 changed files with 317 additions and 200 deletions

View File

@ -326,10 +326,9 @@ void CMorphBall::InitializeWakeEffects() {
std::unique_ptr<CModelData> CMorphBall::GetMorphBallModel(const char* name, float radius) { std::unique_ptr<CModelData> CMorphBall::GetMorphBallModel(const char* name, float radius) {
const SObjectTag* tag = g_ResFactory->GetResourceIdByName(name); const SObjectTag* tag = g_ResFactory->GetResourceIdByName(name);
if (tag->type == FOURCC('CMDL')) { if (tag->type == FOURCC('CMDL')) {
return std::make_unique<CModelData>(CStaticRes(tag->id, zeus::CVector3f(radius * 2.f))); return std::make_unique<CModelData>(CStaticRes(tag->id, zeus::CVector3f(2.f * radius)));
} else {
return std::make_unique<CModelData>(CAnimRes(tag->id, 0, zeus::CVector3f(radius * 2.f), 0, false));
} }
return std::make_unique<CModelData>(CAnimRes(tag->id, 0, zeus::CVector3f(2.f * radius), 0, false));
} }
void CMorphBall::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) { void CMorphBall::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) {
@ -376,7 +375,7 @@ void CMorphBall::DrawBallShadow(const CStateManager& mgr) {
default: default:
break; break;
} }
x1e50_shadow->Render(mgr, alpha); //x1e50_shadow->Render(mgr, alpha);
} }
void CMorphBall::DeleteBallShadow() { x1e50_shadow.reset(); } void CMorphBall::DeleteBallShadow() { x1e50_shadow.reset(); }

File diff suppressed because it is too large Load Diff