From fa7d4d28965733a680d5d7e00a10485c66a246df Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Thu, 24 Apr 2025 14:53:58 -0400 Subject: Fix relocation and data value mismatches --- src/JSystem/JParticle/JPADrawVisitor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/JSystem') diff --git a/src/JSystem/JParticle/JPADrawVisitor.cpp b/src/JSystem/JParticle/JPADrawVisitor.cpp index f03c1c2b..916e598a 100644 --- a/src/JSystem/JParticle/JPADrawVisitor.cpp +++ b/src/JSystem/JParticle/JPADrawVisitor.cpp @@ -83,7 +83,7 @@ void JPADrawExecGenPrjTexMtx::exec(const JPADrawContext* pDC) { f32 transY = tick * pDC->pbsp->getTexScrollTransY() + pDC->pbsp->getTexStaticTransY(); f32 scaleX = tick * pDC->pbsp->getTexScrollScaleX() + pDC->pbsp->getTexStaticScaleX(); f32 scaleY = tick * pDC->pbsp->getTexScrollScaleY() + pDC->pbsp->getTexStaticScaleY(); - s32 angle = DEG_TO_RAD(tick * pDC->pbsp->getTexScrollRotate()); + s32 angle = 0x8000 * (tick * pDC->pbsp->getTexScrollRotate()); f32 sin = JMASSin(angle); f32 cos = JMASCos(angle); @@ -131,7 +131,7 @@ void JPADrawExecSetTexMtx::exec(const JPADrawContext* pDC) { f32 transY = tick * pDC->pbsp->getTexScrollTransY() + pDC->pbsp->getTexStaticTransY(); f32 scaleX = tick * pDC->pbsp->getTexScrollScaleX() + pDC->pbsp->getTexStaticScaleX(); f32 scaleY = tick * pDC->pbsp->getTexScrollScaleY() + pDC->pbsp->getTexStaticScaleY(); - s32 angle = DEG_TO_RAD(tick * pDC->pbsp->getTexScrollRotate()); + s32 angle = 0x8000 * (tick * pDC->pbsp->getTexScrollRotate()); f32 sin = JMASSin(angle); f32 cos = JMASCos(angle); @@ -248,7 +248,7 @@ void JPADrawExecSetTexMtx::exec(const JPADrawContext* pDC, JPABaseParticle* ptcl f32 transY = tick * pDC->pbsp->getTexScrollTransY() + pDC->pbsp->getTexStaticTransY(); f32 scaleX = tick * pDC->pbsp->getTexScrollScaleX() + pDC->pbsp->getTexStaticScaleX(); f32 scaleY = tick * pDC->pbsp->getTexScrollScaleY() + pDC->pbsp->getTexStaticScaleY(); - s32 angle = DEG_TO_RAD(tick * pDC->pbsp->getTexScrollRotate()); + s32 angle = 0x8000 * (tick * pDC->pbsp->getTexScrollRotate()); f32 sin = JMASSin(angle); f32 cos = JMASCos(angle); @@ -441,7 +441,7 @@ void rotTypeZ(f32 sin, f32 cos, Mtx& out) { /* 80261568-802615C4 .text rotTypeXYZ__FffRA3_A4_f */ void rotTypeXYZ(f32 sin, f32 cos, Mtx& out) { f32 a, b, c; - a = (1.0f - cos) * (1.0f / 3.0f); + a = (1.0f - cos) * 0.333333f; c = a + (0.57735f * sin); b = a - (0.57735f * sin); a = a + cos; -- cgit v1.2.3