Skip to content

Commit

Permalink
JPADrawVisitor - minor matches
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Jul 16, 2024
1 parent 4375c45 commit 38d6a5e
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/JSystem/JParticle/JPADrawVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,12 +774,8 @@ void JPADrawCalcTextureAnmIndexNormal::calc(const JPADrawContext* pDC) {

/* 80264A34-80264AD0 .text calc__32JPADrawCalcTextureAnmIndexRepeatFPC14JPADrawContext */
void JPADrawCalcTextureAnmIndexRepeat::calc(const JPADrawContext* pDC) {
/* Nonmatching */
s32 tick = pDC->pbe->mTick.getFrame();
s32 maxFrame = pDC->pbsp->getTextureAnmKeyNum();
u8 idx = tick % maxFrame;
idx = pDC->pbsp->getTextureIndex(idx);
pDC->mpDraw->mTexIdx = pDC->pTexIdx[idx];
pDC->mpDraw->mTexIdx = pDC->pTexIdx[pDC->pbsp->getTextureIndex(tick % pDC->pbsp->getTextureAnmKeyNum())];
}

/* 80264AD0-80264B80 .text calc__33JPADrawCalcTextureAnmIndexReverseFPC14JPADrawContext */
Expand Down Expand Up @@ -969,20 +965,19 @@ void JPADrawCalcAlpha::calc(const JPADrawContext* pDC, JPABaseParticle* ptcl) {

/* 80265C40-80265D54 .text calc__27JPADrawCalcAlphaFlickNrmSinFPC14JPADrawContextP15JPABaseParticle */
void JPADrawCalcAlphaFlickNrmSin::calc(const JPADrawContext* pDC, JPABaseParticle* ptcl) {
/* Nonmatching */
f32 sin = JMASSin((ptcl->getAge() * 16384) * ptcl->mAlphaWaveRandom * (1.0f - pDC->pesp->getAlphaWaveParam1()));
ptcl->mAlphaOut *= ptcl->mAlphaWaveRandom * ((sin - 1.0f) * 0.5f) * pDC->pesp->getAlphaWaveParam3() + 1.0f;
ptcl->mAlphaOut *= ptcl->mAlphaWaveRandom * (((sin - 1.0f) * 0.5f) * pDC->pesp->getAlphaWaveParam3()) + 1.0f;
if (ptcl->mAlphaOut < 0.0f)
ptcl->mAlphaOut = 0.0f;
}

/* 80265D54-80265EC4 .text calc__27JPADrawCalcAlphaFlickAddSinFPC14JPADrawContextP15JPABaseParticle */
void JPADrawCalcAlphaFlickAddSin::calc(const JPADrawContext* pDC, JPABaseParticle* ptcl) {
/* Nonmatching */
/* Nonmatching - operand swap */
f32 theta = (ptcl->getAge() * 16384) * ptcl->mAlphaWaveRandom;
f32 sin2 = JMASSin(theta * (1.0f - pDC->pesp->getAlphaWaveParam2()));
f32 sin1 = JMASSin(theta * (1.0f - pDC->pesp->getAlphaWaveParam1()));
ptcl->mAlphaOut *= (ptcl->mAlphaWaveRandom * 0.5f * (pDC->pesp->getAlphaWaveParam3() * (sin1 + sin2) - 2.0f) * 0.5f + 2.0f) * 0.5f;
ptcl->mAlphaOut *= (ptcl->mAlphaWaveRandom * ((((sin1 + sin2) - 2.0f) * 0.5f) * pDC->pesp->getAlphaWaveParam3()) + 2.0f) * 0.5f;
if (ptcl->mAlphaOut < 0.0f)
ptcl->mAlphaOut = 0.0f;
}
Expand Down

0 comments on commit 38d6a5e

Please sign in to comment.