diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-05-26 22:18:04 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-05-26 22:18:04 -0400 |
| commit | bafd8aba628a0f525e6ec1c334adf8531ae61c82 (patch) | |
| tree | c5b5d7d160e51723ffdfca839e4c7da041f570e0 /src | |
| parent | 2dced07761c17ee0eff709173e78420d392058ff (diff) | |
Implement some more JPAEmitter inlines
Diffstat (limited to 'src')
| -rw-r--r-- | src/JSystem/JParticle/JPADrawVisitor.cpp | 16 | ||||
| -rw-r--r-- | src/JSystem/JParticle/JPAParticle.cpp | 2 | ||||
| -rw-r--r-- | src/d/actor/d_a_himo2.cpp | 10 | ||||
| -rw-r--r-- | src/d/actor/d_a_npc_fa1.cpp | 2 | ||||
| -rw-r--r-- | src/d/actor/d_a_obj_ospbox.cpp | 4 | ||||
| -rw-r--r-- | src/d/actor/d_a_player_main.cpp | 6 | ||||
| -rw-r--r-- | src/d/actor/d_a_player_particle.inc | 11 | ||||
| -rw-r--r-- | src/d/d_meter.cpp | 2 | ||||
| -rw-r--r-- | src/d/d_particle.cpp | 20 |
9 files changed, 38 insertions, 35 deletions
diff --git a/src/JSystem/JParticle/JPADrawVisitor.cpp b/src/JSystem/JParticle/JPADrawVisitor.cpp index 9187002e..bd6ce074 100644 --- a/src/JSystem/JParticle/JPADrawVisitor.cpp +++ b/src/JSystem/JParticle/JPADrawVisitor.cpp @@ -80,7 +80,7 @@ void JPADrawExecGenPrjTexMtx::exec(const JPADrawContext* pDC) { f32 fovy = JPABaseEmitter::getFovy(); C_MTXLightPerspective(projMtx, fovy, aspect, 0.5f, -0.5f, 0.5f, 0.5f); - f32 tick = pDC->pbe->mTick.getFrame(); + f32 tick = pDC->pbe->getFrame(); f32 transX = tick * pDC->pbsp->getTexScrollTransX() + pDC->pbsp->getTexStaticTransX(); f32 transY = tick * pDC->pbsp->getTexScrollTransY() + pDC->pbsp->getTexStaticTransY(); f32 scaleX = tick * pDC->pbsp->getTexScrollScaleX() + pDC->pbsp->getTexStaticScaleX(); @@ -126,7 +126,7 @@ void JPADrawExecGenIdtMtx::exec(const JPADrawContext* pDC) { /* 8025FFB0-802602F0 .text exec__20JPADrawExecSetTexMtxFPC14JPADrawContext */ void JPADrawExecSetTexMtx::exec(const JPADrawContext* pDC) { - s32 tick = pDC->pbe->mTick.getFrame(); + s32 tick = pDC->pbe->getFrame(); f32 tilingX = 0.5f * pDC->pbsp->getTilingX(); f32 tilingY = 0.5f * pDC->pbsp->getTilingY(); f32 transX = tick * pDC->pbsp->getTexScrollTransX() + pDC->pbsp->getTexStaticTransX(); @@ -747,21 +747,21 @@ void JPADrawCalcColorEnv::calc(const JPADrawContext* pDC) { /* 802647E0-8026486C .text calc__30JPADrawCalcColorAnmFrameNormalFPC14JPADrawContext */ void JPADrawCalcColorAnmFrameNormal::calc(const JPADrawContext* pDC) { - s32 tick = pDC->pbe->mTick.getFrame(); + s32 tick = pDC->pbe->getFrame(); s32 frame = (tick < pDC->pbsp->getColorRegAnmMaxFrm()) ? tick : pDC->pbsp->getColorRegAnmMaxFrm(); JPADrawContext::pcb->mColorAnmFrame = frame; } /* 8026486C-802648E0 .text calc__30JPADrawCalcColorAnmFrameRepeatFPC14JPADrawContext */ void JPADrawCalcColorAnmFrameRepeat::calc(const JPADrawContext* pDC) { - f32 tick = pDC->pbe->mTick.getFrame(); + f32 tick = pDC->pbe->getFrame(); s32 frame = ((u32)tick) % (pDC->pbsp->getColorRegAnmMaxFrm() + 1); JPADrawContext::pcb->mColorAnmFrame = frame; } /* 802648E0-8026495C .text calc__31JPADrawCalcColorAnmFrameReverseFPC14JPADrawContext */ void JPADrawCalcColorAnmFrameReverse::calc(const JPADrawContext* pDC) { - s32 tick = pDC->pbe->mTick.getFrame(); + s32 tick = pDC->pbe->getFrame(); s32 maxFrame = pDC->pbsp->getColorRegAnmMaxFrm(); s32 odd = (tick / maxFrame) & 1; // whether we're on an even or odd loop s32 frame = tick % maxFrame; @@ -780,20 +780,20 @@ void JPADrawCalcColorAnmFrameRandom::calc(const JPADrawContext* pDC) { /* 8026497C-80264A34 .text calc__32JPADrawCalcTextureAnmIndexNormalFPC14JPADrawContext */ void JPADrawCalcTextureAnmIndexNormal::calc(const JPADrawContext* pDC) { - s32 tick = pDC->pbe->mTick.getFrame(); + s32 tick = pDC->pbe->getFrame(); s32 idx = ((pDC->pbsp->getTextureAnmKeyNum() - 1) < tick) ? pDC->pbsp->getTextureAnmKeyNum() - 1 : tick; pDC->mpDraw->mTexIdx = pDC->pTexIdx[pDC->pbsp->getTextureIndex(idx)]; } /* 80264A34-80264AD0 .text calc__32JPADrawCalcTextureAnmIndexRepeatFPC14JPADrawContext */ void JPADrawCalcTextureAnmIndexRepeat::calc(const JPADrawContext* pDC) { - s32 tick = pDC->pbe->mTick.getFrame(); + s32 tick = pDC->pbe->getFrame(); pDC->mpDraw->mTexIdx = pDC->pTexIdx[pDC->pbsp->getTextureIndex(tick % pDC->pbsp->getTextureAnmKeyNum())]; } /* 80264AD0-80264B80 .text calc__33JPADrawCalcTextureAnmIndexReverseFPC14JPADrawContext */ void JPADrawCalcTextureAnmIndexReverse::calc(const JPADrawContext* pDC) { - s32 tick = pDC->pbe->mTick.getFrame(); + s32 tick = pDC->pbe->getFrame(); s32 maxFrame = pDC->pbsp->getTextureAnmKeyNum() - 1; s32 odd = (tick / maxFrame) & 1; // whether we're on an even or odd loop s32 frame = tick % maxFrame; diff --git a/src/JSystem/JParticle/JPAParticle.cpp b/src/JSystem/JParticle/JPAParticle.cpp index 9072e850..fdee40d5 100644 --- a/src/JSystem/JParticle/JPAParticle.cpp +++ b/src/JSystem/JParticle/JPAParticle.cpp @@ -26,7 +26,7 @@ void JPABaseParticle::initParticle() { mFieldDrag = 1.0f; mDrag = 1.0f; MTXMultVec(emtrInfo.mEmitterGlobalSR, emtrInfo.mVolumePos, mLocalPosition); - if ((emtr->mDataFlag & JPADynFlag_FollowEmtr) != 0) + if (emtr->checkEmDataFlag(JPADynFlag_FollowEmtr)) setStatus(JPAPtclStts_UNK_20); mOffsetPosition.set(emtrInfo.mEmitterGlobalCenter); diff --git a/src/d/actor/d_a_himo2.cpp b/src/d/actor/d_a_himo2.cpp index c9e35b57..1433cc9f 100644 --- a/src/d/actor/d_a_himo2.cpp +++ b/src/d/actor/d_a_himo2.cpp @@ -716,20 +716,20 @@ BOOL himo2_bg_check(himo2_class* i_this) { NULL ); if (pJVar5 != NULL) { - pJVar5->mSpread = 0.2f; - pJVar5->mVolumeSweep = 0.15f; + pJVar5->setSpread(0.2f); + pJVar5->setVolumeSweep(0.15f); } } else { local_38.x = local_38.x + 0x4000; pJVar5 = dComIfGp_particle_set(dPa_name::ID_AK_JN_ELEMENTHIBANA00, &actor->current.pos, &local_38); if (pJVar5 != NULL) { - pJVar5->mInitialVelAxis = 15.0f; + pJVar5->setAwayFromAxisSpeed(15.0f); } dKy_Sound_set(actor->current.pos, 100, fopAcM_GetID(actor), 5); } if (pJVar5 != NULL) { - pJVar5->mRate = 8.0f; - pJVar5->mMaxFrame = 1; + pJVar5->setRate(8.0f); + pJVar5->setMaxFrame(1); } } return true; diff --git a/src/d/actor/d_a_npc_fa1.cpp b/src/d/actor/d_a_npc_fa1.cpp index cad2ba8a..04b58217 100644 --- a/src/d/actor/d_a_npc_fa1.cpp +++ b/src/d/actor/d_a_npc_fa1.cpp @@ -323,7 +323,7 @@ BOOL daNpc_Fa1_c::_execute() { setPointLightParam(); } if (isLinkMode() && mpEmitter != NULL) { - mpEmitter->mRate = 1.0f; + mpEmitter->setRate(1.0f); } dComIfGp_att_LookRequest(this, 400.0f, 300.0f, -300.0f, 0x6000, 1); return TRUE; diff --git a/src/d/actor/d_a_obj_ospbox.cpp b/src/d/actor/d_a_obj_ospbox.cpp index b04d9334..895f9a17 100644 --- a/src/d/actor/d_a_obj_ospbox.cpp +++ b/src/d/actor/d_a_obj_ospbox.cpp @@ -169,8 +169,8 @@ void daObjOspbox::Act_c::eff_break() { NULL, -1, &tevStr.mColorK0, &tevStr.mColorK0, &particle_scale); if (emitter != NULL) { - emitter->mLifeTime = 0x1E; - emitter->mInitialVelAxis = 30.0f; + emitter->setLifeTime(30); + emitter->setAwayFromAxisSpeed(30.0f); } } diff --git a/src/d/actor/d_a_player_main.cpp b/src/d/actor/d_a_player_main.cpp index 0b8b3092..f1d0c0f5 100644 --- a/src/d/actor/d_a_player_main.cpp +++ b/src/d/actor/d_a_player_main.cpp @@ -9976,13 +9976,13 @@ void daPy_lk_c::setCollision() { NULL ); if (emitter1 != NULL) { - emitter1->mGlobalParticleScale.x = dVar27; + emitter1->setGlobalParticleWidthScale(dVar27); } if (emitter2 != NULL) { - emitter2->mGlobalParticleScale.x = dVar27; + emitter2->setGlobalParticleWidthScale(dVar27); } if (emitter3 != NULL) { - emitter3->mGlobalParticleScale.x = dVar27; + emitter3->setGlobalParticleWidthScale(dVar27); } } } diff --git a/src/d/actor/d_a_player_particle.inc b/src/d/actor/d_a_player_particle.inc index 904d72db..b32380b2 100644 --- a/src/d/actor/d_a_player_particle.inc +++ b/src/d/actor/d_a_player_particle.inc @@ -656,10 +656,13 @@ void daPy_lk_c::setWaterRipple() { simpleAnmPlay(mpSuimenMunyaBtk); JPABaseEmitter* emitter = m3280.getEmitter(); - if (emitter != NULL && ((emitter->mGlobalParticleScale.x < 0.8f && checkNoResetFlg0(daPyFlg0_UNK80)) || (emitter->mGlobalParticleScale.x > 0.8f && !checkNoResetFlg0(daPyFlg0_UNK80)))) { - m3280.remove(); - - emitter = dComIfGp_particle_setShipTail(dPa_name::ID_AK_JN_HAMON00, ¤t.pos, NULL, NULL, 0xFF, &m3280); + if (emitter != NULL) { + JGeometry::TVec3<f32> ptcl_scale; + emitter->getGlobalParticleScale(ptcl_scale); + if ((ptcl_scale.x < 0.8f && checkNoResetFlg0(daPyFlg0_UNK80)) || (ptcl_scale.x > 0.8f && !checkNoResetFlg0(daPyFlg0_UNK80))) { + m3280.remove(); + emitter = dComIfGp_particle_setShipTail(dPa_name::ID_AK_JN_HAMON00, ¤t.pos, NULL, NULL, 0xFF, &m3280); + } } if (emitter != NULL) { diff --git a/src/d/d_meter.cpp b/src/d/d_meter.cpp index 30f447e8..d2e0b2e3 100644 --- a/src/d/d_meter.cpp +++ b/src/d/d_meter.cpp @@ -5949,7 +5949,7 @@ void dMeter_arwMove(sub_meter_class* i_Meter) { f32 x = i_Meter->field_0x29b0[1].mPosCenter.x - 320.0f; f32 y = i_Meter->field_0x29b0[1].mPosCenter.y - 240.0f; i_Meter->field_0x2f24[i]->setGlobalTranslation(x, y, 0.0f); - i_Meter->field_0x2f24[i]->mGlobalPrmColor.a = i_Meter->field_0x2940[i].mNowAlpha; + i_Meter->field_0x2f24[i]->setGlobalAlpha(i_Meter->field_0x2940[i].mNowAlpha); } } } diff --git a/src/d/d_particle.cpp b/src/d/d_particle.cpp index 3976e160..2087aed1 100644 --- a/src/d/d_particle.cpp +++ b/src/d/d_particle.cpp @@ -350,7 +350,7 @@ void dPa_smokeEcallBack::setup(JPABaseEmitter* param_1, const cXyz* param_2, con dPa_followEcallBack::setup(param_1, param_2, param_3, param_4); field_0x14 = param_4; param_1->setParticleCallBackPtr(dPa_control_c::getSmokePcallback()); - param_1->mUserData = mWindOff; + param_1->setUserWork(mWindOff); } /* 8007B73C-8007B804 .text initiateLighting__FR11_GXColorS10R8_GXColorR8_GXColor */ @@ -395,11 +395,11 @@ void smokeEcallBack(JPABaseEmitter* emtr, dKy_tevstr_c* tevStr, s8, GXColor colo } else { initiateLighting(tevStr->mColorC0, tevStr->mColorK0, color); } - color.a = emtr->mGlobalPrmColor.a; + color.a = emtr->getGlobalAlpha(); GXSetNumTexGens(2); GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY); GXSetTexCoordGen(GX_TEXCOORD1, GX_TG_SRTG, GX_TG_COLOR0, GX_IDENTITY); - emtr->mDraw.loadTexture(1, GX_TEXMAP1); + emtr->loadTexture(1, GX_TEXMAP1); GXSetNumTevStages(3); GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_C0, GX_CC_KONST, GX_CC_TEXC, GX_CC_ZERO); GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, true, GX_TEVPREV); @@ -449,7 +449,7 @@ void dPa_setWindPower(JPABaseParticle* ptcl) { /* 8007BC84-8007BCB4 .text execute__18dPa_smokePcallBackFP14JPABaseEmitterP15JPABaseParticle */ void dPa_smokePcallBack::execute(JPABaseEmitter* emtr, JPABaseParticle* ptcl) { - if (emtr->mUserData == 0) + if (emtr->getUserWork() == 0) dPa_setWindPower(ptcl); } @@ -460,7 +460,7 @@ void dPa_smokePcallBack::draw(JPABaseEmitter* emtr, JPABaseParticle* ptcl) { /* 8007C380-8007C3B0 .text draw__22dPa_selectTexEcallBackFP14JPABaseEmitter */ void dPa_selectTexEcallBack::draw(JPABaseEmitter* emtr) { - emtr->mDraw.loadTexture(mTexNo, GX_TEXMAP0); + emtr->loadTexture(mTexNo, GX_TEXMAP0); } /* 8007C3B0-8007C420 .text __ct__19dPa_simpleEcallBackFv */ @@ -474,7 +474,7 @@ dPa_simpleData_c::dPa_simpleData_c() {} /* 8007C460-8007C618 .text executeAfter__19dPa_simpleEcallBackFP14JPABaseEmitter */ void dPa_simpleEcallBack::executeAfter(JPABaseEmitter* param_1) { - s32 r28 = JPABaseEmitter::emtrInfo.mVolumeEmitCount; + s32 r28 = param_1->getCurrentCreateNumber(); if (r28 <= 0) { mCount = 0; } else { @@ -510,7 +510,7 @@ void dPa_simpleEcallBack::draw(JPABaseEmitter* emtr) { if (mbIsSmoke) smokeEcallBack(emtr, NULL, -1, (GXColor){ 0xA0, 0xA0, 0x80, 0xFF }); - if (emtr->mGroupID == dPa_control_c::dPtclGroup_Projection_e) + if (emtr->getGroupID() == dPa_control_c::dPtclGroup_Projection_e) GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_A0); } @@ -538,8 +538,8 @@ JPABaseEmitter* dPa_simpleEcallBack::createEmitter(JPAEmitterManager* manager) { if (!mpBaseEmitter) { return mpBaseEmitter; } - mpBaseEmitter->mpEmitterCallBack = this; - mpBaseEmitter->mMaxFrame = 0; + mpBaseEmitter->setEmitterCallBackPtr(this); + mpBaseEmitter->setMaxFrame(0); mpBaseEmitter->stopCreateParticle(); } return mpBaseEmitter; @@ -765,7 +765,7 @@ JPABaseEmitter* dPa_control_c::set(u8 groupID, u16 userID, const cXyz* pos, cons emtr->setGlobalScale(tmp2); } - emtr->mGlobalPrmColor.a = alpha; + emtr->setGlobalAlpha(alpha); if (pCallBack != NULL) { emtr->setEmitterCallBackPtr(pCallBack); pCallBack->setup(emtr, pos, angle, setupInfo); |
