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

DrawWorld implementation complete

This commit is contained in:
Jack Andersen
2017-03-05 20:33:51 -10:00
parent 67293caba1
commit 87a22b73fa
21 changed files with 350 additions and 61 deletions

View File

@@ -1,4 +1,6 @@
#include "CMorphBall.hpp"
#include "CPlayer.hpp"
#include "CMorphBallShadow.hpp"
namespace urde
{
@@ -8,4 +10,28 @@ CMorphBall::CMorphBall(CPlayer& player, float)
{
}
void CMorphBall::DrawBallShadow(const CStateManager& mgr)
{
if (!x1e50_shadow)
return;
float alpha = 1.f;
switch (x0_player.x2f8_morphTransState)
{
case CPlayer::EPlayerMorphBallState::Unmorphed:
return;
case CPlayer::EPlayerMorphBallState::Unmorphing:
alpha = 0.f;
if (x0_player.x578_morphDuration != 0.f)
alpha = zeus::clamp(0.f, x0_player.x574_morphTime / x0_player.x578_morphDuration, 1.f);
alpha = 1.f - alpha;
case CPlayer::EPlayerMorphBallState::Morphing:
alpha = 0.f;
if (x0_player.x578_morphDuration != 0.f)
alpha = zeus::clamp(0.f, x0_player.x574_morphTime / x0_player.x578_morphDuration, 1.f);
default: break;
}
x1e50_shadow->Render(mgr, alpha);
}
}