CCubeMaterial: Implement H/VStrip animations

This commit is contained in:
Phillip Stephens 2022-03-19 01:16:06 -07:00
parent b4e242b88d
commit ecb4645e89
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
1 changed files with 8 additions and 1 deletions

View File

@ -403,8 +403,15 @@ u32 CCubeMaterial::HandleAnimatedUV(const u32* uvAnim, GX::TexMtx texMtx, GX::PT
} }
case 4: case 4:
case 5: { case 5: {
// TODO
zeus::CTransform xf; zeus::CTransform xf;
const float value = SBig(params[0]) * SBig(params[2]) * (SBig(params[3]) + CGraphics::GetSecondsMod900());
if (type == 4) {
xf.origin.x() = std::trunc(SBig(params[1]) * std::fmod(value, 1.f)) * SBig(params[2]);
xf.origin.y() = 0.f;
} else {
xf.origin.x() = 0.f;
xf.origin.y() = std::trunc(SBig(params[1]) * std::fmod(value, 1.f)) * SBig(params[2]);
}
GXLoadTexMtxImm(&xf, texMtx, GX::MTX3x4); GXLoadTexMtxImm(&xf, texMtx, GX::MTX3x4);
return 5; return 5;
} }