diff --git a/docs/recommended_todo.md b/docs/recommended_todo.md index 11b514d20..4530fe82c 100644 --- a/docs/recommended_todo.md +++ b/docs/recommended_todo.md @@ -72,10 +72,10 @@ | ebi2DGraph.cpp | 4210 | ebiScreenOmakeCardE.cpp | 5774 | | ebiOmakeMgr.cpp | 7786 | ebiCardEReader.cpp | 9524 | | particle2dMgr.cpp | 9790 | ebi2DCallBack.cpp | 10813 | -| ebiScreenSaveMenu.cpp | 11850 | ebiScreenTitleMenu.cpp | 11996 | -| ebiScreenOmakeGame.cpp | 12403 | ebiMainTitleMgr.cpp | 12858 | -| ebiP2TitleUnit.cpp | 13380 | ebiSaveMgr.cpp | 15440 | -| efxTPkEffectMgr.cpp | 15831 | efx2dEffect.cpp | 17839 | +| efxObject.cpp | 11070 | ebiScreenSaveMenu.cpp | 11850 | +| ebiScreenTitleMenu.cpp | 11996 | ebiScreenOmakeGame.cpp | 12403 | +| ebiMainTitleMgr.cpp | 12858 | ebiP2TitleUnit.cpp | 13380 | +| ebiSaveMgr.cpp | 15440 | efxTPkEffectMgr.cpp | 15831 | ###
plugProjectHikinoU
| File | Size (bytes) | File | Size (bytes) | diff --git a/include/efx/Arg.h b/include/efx/Arg.h index cad908186..6cabdaa60 100644 --- a/include/efx/Arg.h +++ b/include/efx/Arg.h @@ -214,7 +214,7 @@ struct ArgKouhai : public Arg { ArgKouhai(Vector3f position, int type) : Arg(position) { - _10 = type; + mSize = type; } virtual const char* getName() // _08 (weak) @@ -224,7 +224,7 @@ struct ArgKouhai : public Arg { // _00 = VTBL // _00-_10 = Arg - int _10; // _10 + int mSize; // _10 }; struct ArgPelType : public Arg { diff --git a/include/efx/Container.h b/include/efx/Container.h index f66ed5b51..dcb343a08 100644 --- a/include/efx/Container.h +++ b/include/efx/Container.h @@ -10,7 +10,7 @@ struct Container : public TForever { { } virtual bool create(Arg*); // _08 - virtual ~Container(); // _48 (weak) + virtual ~Container() { } // _48 (weak) // _00 = VTBL // _00-_10 = TForever diff --git a/include/efx/TOtakara.h b/include/efx/TOtakara.h index 20317257f..c7d4fd371 100644 --- a/include/efx/TOtakara.h +++ b/include/efx/TOtakara.h @@ -33,9 +33,9 @@ struct TOtakaraAp : public TBase { : TBase() { } - virtual bool create(Arg*); // _08 - virtual void forceKill(); // _0C (weak) - virtual void fade(); // _10 (weak) + virtual bool create(Arg*); // _08 + virtual void forceKill() { } // _0C (weak) + virtual void fade() { } // _10 (weak) // _00 VTBL }; diff --git a/include/efx/TPelkira.h b/include/efx/TPelkira.h index 2e7005a3b..5dc4162e3 100644 --- a/include/efx/TPelkira.h +++ b/include/efx/TPelkira.h @@ -14,7 +14,7 @@ struct TPelkira_ver01 : public TChasePos { virtual bool create(Arg*); // _08 // _0C-_14 // vtable 2 (JPAEmitterCallBack + Self) - virtual ~TPelkira_ver01(); // _48 (weak) + virtual ~TPelkira_ver01() { } // _48 (weak) }; } // namespace efx diff --git a/include/efx2d/FileSelect.h b/include/efx2d/FileSelect.h index da03c9070..99e5ffd52 100644 --- a/include/efx2d/FileSelect.h +++ b/include/efx2d/FileSelect.h @@ -13,8 +13,7 @@ struct ArgFilecopy : public Arg { // _00-_08 = Vector2f // _08 = VTBL - int _0C; - int _10; + Vector2f mAltPosition; JUtility::TColor mColor; // _14 }; diff --git a/src/plugProjectEbisawaU/efx2dEffect.cpp b/src/plugProjectEbisawaU/efx2dEffect.cpp index d5fab8eea..3342e99b8 100644 --- a/src/plugProjectEbisawaU/efx2dEffect.cpp +++ b/src/plugProjectEbisawaU/efx2dEffect.cpp @@ -362,13 +362,29 @@ bool FileSelect::T2DFilecopyBase::create(Arg* arg) bool nameCheck = strcmp("ArgFilecopy", arg->getName()) == 0; P2ASSERTLINE(160, nameCheck); ArgFilecopy* args = static_cast(arg); + f32 dist = args->mAltPosition.distance(*args); + f32 scale = dist /= 200.0f; - f32 scale = 200.0f; // yeah nope + Vector3f test(args->mAltPosition.x - args->x, args->mAltPosition.y - args->y, 0.0f); + test.normalise(); JUtility::TColor col = args->mColor; - Matrixf mtx; + + Mtx mtx; + mtx[0][0] = test.x; + mtx[0][1] = test.x; + mtx[0][2] = 0.0f; + mtx[0][3] = test.y; + mtx[1][0] = test.y; + mtx[1][1] = test.x; + mtx[1][2] = 0.0f; + mtx[1][3] = test.y; + mtx[2][0] = test.z; + mtx[2][1] = 0.0f; + mtx[2][2] = 1.0f; + mtx[2][3] = 0.0f; if (TForever::create(arg)) { mEmitter->setColorRGB(col); - JPASetRMtxfromMtx(mtx.mMatrix.mtxView, mEmitter->mMatrix); + JPASetRMtxfromMtx(mtx, mEmitter->mMatrix); mEmitter->setScaleOnly(scale); return true; } @@ -664,39 +680,4 @@ void WorldMap::T2DRocketB::setGlobalParticleScale(f32 scale) mEmitter->setScaleMain(test.x, test.y, test.z); } -/* - * --INFO-- - * Address: 803BAC6C - * Size: 00009C - */ -// WorldMap::T2DRocketB::~T2DRocketB() { } - -/* - * --INFO-- - * Address: 803BAD08 - * Size: 00009C - */ -// WorldMap::T2DOnyonKira::~T2DOnyonKira() { } - -/* - * --INFO-- - * Address: 803BADA4 - * Size: 000084 - */ -FileSelect::T2DFilecopyBase::~T2DFilecopyBase() { } - -/* - * --INFO-- - * Address: 803BAE28 - * Size: 000084 - */ -// T2DCountKira::~T2DCountKira() { } - -/* - * --INFO-- - * Address: 803BAEAC - * Size: 00009C - */ -// T2DCursor::~T2DCursor() { } - } // namespace efx2d diff --git a/src/plugProjectEbisawaU/efxBase.cpp b/src/plugProjectEbisawaU/efxBase.cpp index 367f85c6e..2cf9a855e 100644 --- a/src/plugProjectEbisawaU/efxBase.cpp +++ b/src/plugProjectEbisawaU/efxBase.cpp @@ -1,22 +1,15 @@ #include "JSystem/JGeometry.h" -#include "JSystem/JParticle/JPAEmitter.h" #include "JSystem/JParticle/JPAMath.h" -#include "JSystem/JUtility/JUTException.h" #include "ParticleMgr.h" #include "efx/Arg.h" #include "efx/Context.h" -#include "efx/TBase.h" #include "efx/TCallBack_StaticClipping.h" #include "efx/TChaseMtx.h" #include "efx/TChasePos.h" #include "efx/TForever.h" #include "efx/TOneEmitter.h" -#include "efx/TSimple.h" #include "efx/TSimpleMtx.h" #include "efx/TSyncGroup.h" -#include "sysMath.h" -#include "types.h" -#include "Vector3.h" efx::TCallBack_StaticClipping efx::TBase::mCallBack_StaticClipping; @@ -725,8 +718,10 @@ void TChasePosPosLocalZScale::doExecuteEmitterOperation(JPABaseEmitter* emitter) Vector3f vec1 = *_10; Vector3f vec2 = *_14; makeMtxZAxisAlongPosPos(mtxZ, vec1, vec2); + f32 dist = _distanceBetween(vec2, vec1); JPASetRMtxTVecfromMtx(mtxZ, emitter->mMatrix, &emitter->mPosition); - // needs some extra math here + emitter->mScale.z = dist / _18; + /* stwu r1, -0x70(r1) mflr r0 @@ -836,8 +831,9 @@ void TChasePosPosLocalYScale::doExecuteEmitterOperation(JPABaseEmitter* emitter) Vector3f vec1 = *_10; Vector3f vec2 = *_14; makeMtxZAxisAlongPosPos(mtxZ, vec1, vec2); + f32 dist = _distanceBetween(vec2, vec1); JPASetRMtxTVecfromMtx(mtxZ, emitter->mMatrix, &emitter->mPosition); - // needs some extra math here + emitter->mScale.y = dist / _18; /* stwu r1, -0x70(r1) mflr r0 @@ -2962,34 +2958,4 @@ TCallBack_StaticClipping::~TCallBack_StaticClipping() { } // { // } -/* - * --INFO-- - * Address: 803B2CD0 - * Size: 00004C - */ -// void __sinit_efxBase_cpp() -// { -// /* -// stwu r1, -0x10(r1) -// mflr r0 -// lis r4, __vt__18JPAEmitterCallBack@ha -// lis r3, __vt__Q23efx24TCallBack_StaticClipping@ha -// stw r0, 0x14(r1) -// addi r0, r4, __vt__18JPAEmitterCallBack@l -// lis r4, __dt__Q23efx24TCallBack_StaticClippingFv@ha -// stw r0, mCallBack_StaticClipping__Q23efx5TBase@sda21(r13) -// addi r0, r3, __vt__Q23efx24TCallBack_StaticClipping@l -// lis r3, lbl_804F7C10@ha -// addi r4, r4, __dt__Q23efx24TCallBack_StaticClippingFv@l -// stw r0, mCallBack_StaticClipping__Q23efx5TBase@sda21(r13) -// addi r5, r3, lbl_804F7C10@l -// addi r3, r13, mCallBack_StaticClipping__Q23efx5TBase@sda21 -// bl __register_global_object -// lwz r0, 0x14(r1) -// mtlr r0 -// addi r1, r1, 0x10 -// blr -// */ -// } - } // namespace efx diff --git a/src/plugProjectEbisawaU/efxEnemyBoss.cpp b/src/plugProjectEbisawaU/efxEnemyBoss.cpp index a856f7cd4..dbc8ee922 100644 --- a/src/plugProjectEbisawaU/efxEnemyBoss.cpp +++ b/src/plugProjectEbisawaU/efxEnemyBoss.cpp @@ -14,13 +14,13 @@ namespace efx { * Address: 803EB360 * Size: 0001A8 */ -bool TDangoCrash::create(efx::Arg* arg) +bool TDangoCrash::create(Arg* arg) { bool nameCheck = strcmp("ArgDir", arg->getName()) == 0; P2ASSERTLINE(16, nameCheck); - efx::ArgDir* argd = static_cast(arg); - Vector3f ang = argd->mAngle; + ArgDir* argd = static_cast(arg); + Vector3f ang = argd->mAngle; if (TSimple2::create(arg)) { _normalise2(ang); @@ -43,12 +43,12 @@ bool TDangoCrash::create(efx::Arg* arg) * Address: 803EB508 * Size: 00011C */ -bool TDangoTurn::create(efx::Arg* arg) +bool TDangoTurn::create(Arg* arg) { bool nameCheck = strcmp("ArgRotY", arg->getName()) == 0; P2ASSERTLINE(47, nameCheck); - efx::ArgRotY* argy = static_cast(arg); + ArgRotY* argy = static_cast(arg); f32 x = arg->mPosition.x; f32 y = arg->mPosition.y; @@ -113,21 +113,20 @@ void TKageDead1::setGlobalPrmColor(Color4& color) * Address: 803EB6B4 * Size: 0000CC */ -bool TKageDead2::create(efx::Arg* arg) +bool TKageDead2::create(Arg* arg) { bool nameCheck = strcmp("ArgPrmColor", arg->getName()) == 0; P2ASSERTLINE(103, nameCheck); - efx::ArgPrmColor* argp = static_cast(arg); + ArgPrmColor* argp = static_cast(arg); if (TSimple1::create(arg)) { mEmitters[0]->setPrmColor(*(JUtility::TColor*)(&argp->mColor)); // mEmitters[0]->mColor1.setRGB(*(JUtility::TColor*)(&argp->mColor)); // mEmitters[0]->mColor1.a = argp->mColor.a; return true; - } else { - return false; } + return false; /* stwu r1, -0x20(r1) mflr r0 @@ -204,12 +203,12 @@ void TOootaParticle::setGlobalDynamicsScale(f32) * Address: 803EB780 * Size: 000174 */ -bool TOootaBombLeg::create(efx::Arg* arg) +bool TOootaBombLeg::create(Arg* arg) { bool nameCheck = strcmp("ArgPosPos", arg->getName()) == 0; P2ASSERTLINE(132, nameCheck); - efx::ArgPosPos* argp = static_cast(arg); + ArgPosPos* argp = static_cast(arg); Vector3f pos1, pos2; pos1 = argp->mPos1; pos2 = argp->mPos2; @@ -217,14 +216,14 @@ bool TOootaBombLeg::create(efx::Arg* arg) if (TSimple1::create(arg)) { Matrixf mtx; makeMtxZAxisAlongPosPos(mtx.mMatrix.mtxView, pos1, pos2); - f32 dist = _distanceBetween(pos1, pos2); + f32 dist = _distanceBetween(pos2, pos1); dist /= 100.0f; JPASetRMtxTVecfromMtx(mtx.mMatrix.mtxView, mEmitters[0]->mMatrix, &mEmitters[0]->mPosition); mEmitters[0]->mScale.y *= dist; return true; - } else { - return false; } + return false; + /* stwu r1, -0x70(r1) mflr r0 @@ -337,116 +336,22 @@ bool TOootaBombLeg::create(efx::Arg* arg) * Address: 803EB8F4 * Size: 000150 */ -bool TOootaFire::create(efx::Arg* arg) +bool TOootaFire::create(Arg* arg) { P2ASSERTLINE(161, arg); bool nameCheck = strcmp("ArgScale", arg->getName()) == 0; P2ASSERTLINE(162, nameCheck); - efx::ArgScale* argp = static_cast(arg); + ArgScale* sarg = static_cast(arg); - if (TSyncGroup6::create(arg)) { + if (TSyncGroup6::create(sarg)) { + f32 scale = sarg->mScale; for (int i = 0; i < 6; i++) { - mItems[i].mEmitter->setScale(argp->mScale); + mItems[i].mEmitter->setScale(scale); } return true; - } else { - return false; } - /* - stwu r1, -0x20(r1) - mflr r0 - stw r0, 0x24(r1) - stw r31, 0x1c(r1) - stw r30, 0x18(r1) - or. r30, r4, r4 - lis r4, lbl_80497910@ha - stw r29, 0x14(r1) - mr r29, r3 - addi r31, r4, lbl_80497910@l - bne lbl_803EB934 - addi r3, r31, 0 - addi r5, r31, 0x14 - li r4, 0xa1 - crclr 6 - bl panic_f__12JUTExceptionFPCciPCce - -lbl_803EB934: - mr r3, r30 - lwz r12, 0(r30) - lwz r12, 8(r12) - mtctr r12 - bctrl - mr r4, r3 - addi r3, r31, 0x38 - bl strcmp - cntlzw r0, r3 - rlwinm. r0, r0, 0x1b, 0x18, 0x1f - bne lbl_803EB974 - addi r3, r31, 0 - addi r5, r31, 0x14 - li r4, 0xa2 - crclr 6 - bl panic_f__12JUTExceptionFPCciPCce - -lbl_803EB974: - mr r3, r29 - mr r4, r30 - bl "create__Q23efx29TSyncGroup6FPQ23efx3Arg" - clrlwi. r0, r3, 0x18 - beq lbl_803EBA24 - lfs f0, 0x10(r30) - li r3, 1 - lwz r4, 0xc(r29) - stfs f0, 0x98(r4) - stfs f0, 0x9c(r4) - stfs f0, 0xa0(r4) - stfs f0, 0xb0(r4) - stfs f0, 0xb4(r4) - lwz r4, 0x20(r29) - stfs f0, 0x98(r4) - stfs f0, 0x9c(r4) - stfs f0, 0xa0(r4) - stfs f0, 0xb0(r4) - stfs f0, 0xb4(r4) - lwz r4, 0x34(r29) - stfs f0, 0x98(r4) - stfs f0, 0x9c(r4) - stfs f0, 0xa0(r4) - stfs f0, 0xb0(r4) - stfs f0, 0xb4(r4) - lwz r4, 0x48(r29) - stfs f0, 0x98(r4) - stfs f0, 0x9c(r4) - stfs f0, 0xa0(r4) - stfs f0, 0xb0(r4) - stfs f0, 0xb4(r4) - lwz r4, 0x5c(r29) - stfs f0, 0x98(r4) - stfs f0, 0x9c(r4) - stfs f0, 0xa0(r4) - stfs f0, 0xb0(r4) - stfs f0, 0xb4(r4) - lwz r4, 0x70(r29) - stfs f0, 0x98(r4) - stfs f0, 0x9c(r4) - stfs f0, 0xa0(r4) - stfs f0, 0xb0(r4) - stfs f0, 0xb4(r4) - b lbl_803EBA28 - -lbl_803EBA24: - li r3, 0 - -lbl_803EBA28: - lwz r0, 0x24(r1) - lwz r31, 0x1c(r1) - lwz r30, 0x18(r1) - lwz r29, 0x14(r1) - mtlr r0 - addi r1, r1, 0x20 - blr - */ + return false; } /* @@ -454,17 +359,18 @@ bool TOootaFire::create(efx::Arg* arg) * Address: 803EBA44 * Size: 000154 */ -bool TKchFlickSand::create(efx::Arg* arg) +bool TKchFlickSand::create(Arg* arg) { bool nameCheck = strcmp("ArgRotYScale", arg->getName()) == 0; P2ASSERTLINE(181, nameCheck); - efx::ArgRotYScale* argp = static_cast(arg); + ArgRotYScale* argp = static_cast(arg); - f32 scale = argp->mScale; - f32 x = argp->mPosition.x; - f32 y = argp->mPosition.y; - f32 z = argp->mPosition.z; + f32 x, y, z, scale; + scale = argp->mScale; + x = argp->mPosition.x; + y = argp->mPosition.y; + z = argp->mPosition.z; Matrixf mtx; PSMTXRotRad(mtx.mMatrix.mtxView, 'y', argp->mFaceDir); @@ -477,105 +383,8 @@ bool TKchFlickSand::create(efx::Arg* arg) mEmitters[i]->setScale(scale); } return true; - } else { - return false; } - - /* - stwu r1, -0x90(r1) - mflr r0 - stw r0, 0x94(r1) - stfd f31, 0x80(r1) - psq_st f31, 136(r1), 0, qr0 - stfd f30, 0x70(r1) - psq_st f30, 120(r1), 0, qr0 - stfd f29, 0x60(r1) - psq_st f29, 104(r1), 0, qr0 - stfd f28, 0x50(r1) - psq_st f28, 88(r1), 0, qr0 - stw r31, 0x4c(r1) - stw r30, 0x48(r1) - stw r29, 0x44(r1) - mr r30, r4 - mr r29, r3 - mr r3, r30 - lis r4, lbl_80497910@ha - lwz r12, 0(r30) - addi r31, r4, lbl_80497910@l - lwz r12, 8(r12) - mtctr r12 - bctrl - mr r4, r3 - addi r3, r31, 0x44 - bl strcmp - cntlzw r0, r3 - rlwinm. r0, r0, 0x1b, 0x18, 0x1f - bne lbl_803EBACC - addi r3, r31, 0 - addi r5, r31, 0x14 - li r4, 0xb5 - crclr 6 - bl panic_f__12JUTExceptionFPCciPCce - -lbl_803EBACC: - lfs f28, 0x14(r30) - addi r3, r1, 8 - lfs f31, 4(r30) - li r4, 0x79 - lfs f30, 8(r30) - lfs f29, 0xc(r30) - lfs f1, 0x10(r30) - bl PSMTXRotRad - stfs f31, 0x14(r1) - mr r3, r29 - mr r4, r30 - stfs f30, 0x24(r1) - stfs f29, 0x34(r1) - bl create__Q23efx8TSimple2FPQ23efx3Arg - clrlwi. r0, r3, 0x18 - beq lbl_803EBB58 - li r30, 0 - mr r31, r29 - -lbl_803EBB14: - lwz r5, 8(r31) - addi r3, r1, 8 - addi r4, r5, 0x68 - addi r5, r5, 0xa4 - bl "JPASetRMtxTVecfromMtx__FPA4_CfPA4_fPQ29JGeometry8TVec3" - lwz r3, 8(r31) - addi r30, r30, 1 - cmpwi r30, 2 - addi r31, r31, 4 - stfs f28, 0x98(r3) - stfs f28, 0x9c(r3) - stfs f28, 0xa0(r3) - stfs f28, 0xb0(r3) - stfs f28, 0xb4(r3) - blt lbl_803EBB14 - li r3, 1 - b lbl_803EBB5C - -lbl_803EBB58: - li r3, 0 - -lbl_803EBB5C: - psq_l f31, 136(r1), 0, qr0 - lfd f31, 0x80(r1) - psq_l f30, 120(r1), 0, qr0 - lfd f30, 0x70(r1) - psq_l f29, 104(r1), 0, qr0 - lfd f29, 0x60(r1) - psq_l f28, 88(r1), 0, qr0 - lfd f28, 0x50(r1) - lwz r31, 0x4c(r1) - lwz r30, 0x48(r1) - lwz r0, 0x94(r1) - lwz r29, 0x44(r1) - mtlr r0 - addi r1, r1, 0x90 - blr - */ + return false; } /* @@ -583,17 +392,18 @@ bool TKchFlickSand::create(efx::Arg* arg) * Address: 803EBB98 * Size: 000154 */ -bool TKchApSand::create(efx::Arg* arg) +bool TKchApSand::create(Arg* arg) { bool nameCheck = strcmp("ArgRotYScale", arg->getName()) == 0; P2ASSERTLINE(204, nameCheck); - efx::ArgRotYScale* argp = static_cast(arg); + ArgRotYScale* argp = static_cast(arg); - f32 scale = argp->mScale; - f32 x = argp->mPosition.x; - f32 y = argp->mPosition.y; - f32 z = argp->mPosition.z; + f32 x, y, z, scale; + scale = argp->mScale; + x = argp->mPosition.x; + y = argp->mPosition.y; + z = argp->mPosition.z; Matrixf mtx; PSMTXRotRad(mtx.mMatrix.mtxView, 'y', argp->mFaceDir); @@ -606,104 +416,8 @@ bool TKchApSand::create(efx::Arg* arg) mEmitters[i]->setScale(scale); } return true; - } else { - return false; } - /* - stwu r1, -0x90(r1) - mflr r0 - stw r0, 0x94(r1) - stfd f31, 0x80(r1) - psq_st f31, 136(r1), 0, qr0 - stfd f30, 0x70(r1) - psq_st f30, 120(r1), 0, qr0 - stfd f29, 0x60(r1) - psq_st f29, 104(r1), 0, qr0 - stfd f28, 0x50(r1) - psq_st f28, 88(r1), 0, qr0 - stw r31, 0x4c(r1) - stw r30, 0x48(r1) - stw r29, 0x44(r1) - mr r30, r4 - mr r29, r3 - mr r3, r30 - lis r4, lbl_80497910@ha - lwz r12, 0(r30) - addi r31, r4, lbl_80497910@l - lwz r12, 8(r12) - mtctr r12 - bctrl - mr r4, r3 - addi r3, r31, 0x44 - bl strcmp - cntlzw r0, r3 - rlwinm. r0, r0, 0x1b, 0x18, 0x1f - bne lbl_803EBC20 - addi r3, r31, 0 - addi r5, r31, 0x14 - li r4, 0xcc - crclr 6 - bl panic_f__12JUTExceptionFPCciPCce - -lbl_803EBC20: - lfs f28, 0x14(r30) - addi r3, r1, 8 - lfs f31, 4(r30) - li r4, 0x79 - lfs f30, 8(r30) - lfs f29, 0xc(r30) - lfs f1, 0x10(r30) - bl PSMTXRotRad - stfs f31, 0x14(r1) - mr r3, r29 - mr r4, r30 - stfs f30, 0x24(r1) - stfs f29, 0x34(r1) - bl create__Q23efx8TSimple3FPQ23efx3Arg - clrlwi. r0, r3, 0x18 - beq lbl_803EBCAC - li r30, 0 - mr r31, r29 - -lbl_803EBC68: - lwz r5, 0xc(r31) - addi r3, r1, 8 - addi r4, r5, 0x68 - addi r5, r5, 0xa4 - bl "JPASetRMtxTVecfromMtx__FPA4_CfPA4_fPQ29JGeometry8TVec3" - lwz r3, 0xc(r31) - addi r30, r30, 1 - cmpwi r30, 3 - addi r31, r31, 4 - stfs f28, 0x98(r3) - stfs f28, 0x9c(r3) - stfs f28, 0xa0(r3) - stfs f28, 0xb0(r3) - stfs f28, 0xb4(r3) - blt lbl_803EBC68 - li r3, 1 - b lbl_803EBCB0 - -lbl_803EBCAC: - li r3, 0 - -lbl_803EBCB0: - psq_l f31, 136(r1), 0, qr0 - lfd f31, 0x80(r1) - psq_l f30, 120(r1), 0, qr0 - lfd f30, 0x70(r1) - psq_l f29, 104(r1), 0, qr0 - lfd f29, 0x60(r1) - psq_l f28, 88(r1), 0, qr0 - lfd f28, 0x50(r1) - lwz r31, 0x4c(r1) - lwz r30, 0x48(r1) - lwz r0, 0x94(r1) - lwz r29, 0x44(r1) - mtlr r0 - addi r1, r1, 0x90 - blr - */ + return false; } /* @@ -711,17 +425,18 @@ bool TKchApSand::create(efx::Arg* arg) * Address: 803EBCEC * Size: 000154 */ -bool TKchApWat::create(efx::Arg* arg) +bool TKchApWat::create(Arg* arg) { bool nameCheck = strcmp("ArgRotYScale", arg->getName()) == 0; P2ASSERTLINE(227, nameCheck); - efx::ArgRotYScale* argp = static_cast(arg); + ArgRotYScale* argp = static_cast(arg); - f32 scale = argp->mScale; - f32 x = argp->mPosition.x; - f32 y = argp->mPosition.y; - f32 z = argp->mPosition.z; + f32 x, y, z, scale; + scale = argp->mScale; + x = argp->mPosition.x; + y = argp->mPosition.y; + z = argp->mPosition.z; Matrixf mtx; PSMTXRotRad(mtx.mMatrix.mtxView, 'y', argp->mFaceDir); @@ -734,104 +449,8 @@ bool TKchApWat::create(efx::Arg* arg) mEmitters[i]->setScale(scale); } return true; - } else { - return false; } - /* - stwu r1, -0x90(r1) - mflr r0 - stw r0, 0x94(r1) - stfd f31, 0x80(r1) - psq_st f31, 136(r1), 0, qr0 - stfd f30, 0x70(r1) - psq_st f30, 120(r1), 0, qr0 - stfd f29, 0x60(r1) - psq_st f29, 104(r1), 0, qr0 - stfd f28, 0x50(r1) - psq_st f28, 88(r1), 0, qr0 - stw r31, 0x4c(r1) - stw r30, 0x48(r1) - stw r29, 0x44(r1) - mr r30, r4 - mr r29, r3 - mr r3, r30 - lis r4, lbl_80497910@ha - lwz r12, 0(r30) - addi r31, r4, lbl_80497910@l - lwz r12, 8(r12) - mtctr r12 - bctrl - mr r4, r3 - addi r3, r31, 0x44 - bl strcmp - cntlzw r0, r3 - rlwinm. r0, r0, 0x1b, 0x18, 0x1f - bne lbl_803EBD74 - addi r3, r31, 0 - addi r5, r31, 0x14 - li r4, 0xe3 - crclr 6 - bl panic_f__12JUTExceptionFPCciPCce - -lbl_803EBD74: - lfs f28, 0x14(r30) - addi r3, r1, 8 - lfs f31, 4(r30) - li r4, 0x79 - lfs f30, 8(r30) - lfs f29, 0xc(r30) - lfs f1, 0x10(r30) - bl PSMTXRotRad - stfs f31, 0x14(r1) - mr r3, r29 - mr r4, r30 - stfs f30, 0x24(r1) - stfs f29, 0x34(r1) - bl create__Q23efx8TSimple5FPQ23efx3Arg - clrlwi. r0, r3, 0x18 - beq lbl_803EBE00 - li r30, 0 - mr r31, r29 - -lbl_803EBDBC: - lwz r5, 0x10(r31) - addi r3, r1, 8 - addi r4, r5, 0x68 - addi r5, r5, 0xa4 - bl "JPASetRMtxTVecfromMtx__FPA4_CfPA4_fPQ29JGeometry8TVec3" - lwz r3, 0x10(r31) - addi r30, r30, 1 - cmpwi r30, 5 - addi r31, r31, 4 - stfs f28, 0x98(r3) - stfs f28, 0x9c(r3) - stfs f28, 0xa0(r3) - stfs f28, 0xb0(r3) - stfs f28, 0xb4(r3) - blt lbl_803EBDBC - li r3, 1 - b lbl_803EBE04 - -lbl_803EBE00: - li r3, 0 - -lbl_803EBE04: - psq_l f31, 136(r1), 0, qr0 - lfd f31, 0x80(r1) - psq_l f30, 120(r1), 0, qr0 - lfd f30, 0x70(r1) - psq_l f29, 104(r1), 0, qr0 - lfd f29, 0x60(r1) - psq_l f28, 88(r1), 0, qr0 - lfd f28, 0x50(r1) - lwz r31, 0x4c(r1) - lwz r30, 0x48(r1) - lwz r0, 0x94(r1) - lwz r29, 0x44(r1) - mtlr r0 - addi r1, r1, 0x90 - blr - */ + return false; } /* @@ -886,14 +505,6 @@ void TKchCryInd::setGlobalScale(f32 scale) if (mEmitter) { mEmitter->setGlobalScale(scale); } - /* - lwz r3, 8(r3) - cmplwi r3, 0 - beqlr - stfs f1, 0xb0(r3) - stfs f1, 0xb4(r3) - blr - */ } /* @@ -901,102 +512,22 @@ void TKchCryInd::setGlobalScale(f32 scale) * Address: 803EBF04 * Size: 000118 */ -bool TKchDamage::create(efx::Arg* arg) +bool TKchDamage::create(Arg* arg) { bool nameCheck = strcmp("ArgScale", arg->getName()) == 0; P2ASSERTLINE(296, nameCheck); - efx::ArgScale* argp = static_cast(arg); + ArgScale* argp = static_cast(arg); f32 scale = argp->mScale; if (TSimpleMtx4::create(arg)) { - mEmitters[0]->setScale(scale); - mEmitters[1]->setScale(scale); - mEmitters[2]->setScale(scale); - mEmitters[3]->setScale(scale); + for (int i = 0; i < 4; i++) { + mEmitters[i]->setScale(scale); + } return true; - } else { - return false; } - /* - stwu r1, -0x30(r1) - mflr r0 - stw r0, 0x34(r1) - stfd f31, 0x20(r1) - psq_st f31, 40(r1), 0, qr0 - stw r31, 0x1c(r1) - stw r30, 0x18(r1) - stw r29, 0x14(r1) - mr r30, r4 - mr r29, r3 - mr r3, r30 - lis r4, lbl_80497910@ha - lwz r12, 0(r30) - addi r31, r4, lbl_80497910@l - lwz r12, 8(r12) - mtctr r12 - bctrl - mr r4, r3 - addi r3, r31, 0x38 - bl strcmp - cntlzw r0, r3 - rlwinm. r0, r0, 0x1b, 0x18, 0x1f - bne lbl_803EBF74 - addi r3, r31, 0 - addi r5, r31, 0x14 - li r4, 0x128 - crclr 6 - bl panic_f__12JUTExceptionFPCciPCce - -lbl_803EBF74: - lfs f31, 0x10(r30) - mr r3, r29 - mr r4, r30 - bl create__Q23efx11TSimpleMtx4FPQ23efx3Arg - clrlwi. r0, r3, 0x18 - beq lbl_803EBFF4 - lwz r4, 0xc(r29) - li r3, 1 - stfs f31, 0x98(r4) - stfs f31, 0x9c(r4) - stfs f31, 0xa0(r4) - stfs f31, 0xb0(r4) - stfs f31, 0xb4(r4) - lwz r4, 0x10(r29) - stfs f31, 0x98(r4) - stfs f31, 0x9c(r4) - stfs f31, 0xa0(r4) - stfs f31, 0xb0(r4) - stfs f31, 0xb4(r4) - lwz r4, 0x14(r29) - stfs f31, 0x98(r4) - stfs f31, 0x9c(r4) - stfs f31, 0xa0(r4) - stfs f31, 0xb0(r4) - stfs f31, 0xb4(r4) - lwz r4, 0x18(r29) - stfs f31, 0x98(r4) - stfs f31, 0x9c(r4) - stfs f31, 0xa0(r4) - stfs f31, 0xb0(r4) - stfs f31, 0xb4(r4) - b lbl_803EBFF8 - -lbl_803EBFF4: - li r3, 0 - -lbl_803EBFF8: - psq_l f31, 40(r1), 0, qr0 - lwz r0, 0x34(r1) - lfd f31, 0x20(r1) - lwz r31, 0x1c(r1) - lwz r30, 0x18(r1) - lwz r29, 0x14(r1) - mtlr r0 - addi r1, r1, 0x30 - blr - */ + return false; } /* @@ -1016,21 +547,20 @@ void TKchSmokeHana::setGlobalScale(f32 scale) * Address: 803EC034 * Size: 0000D0 */ -bool TKchDownsmoke::create(efx::Arg* arg) +bool TKchDownsmoke::create(Arg* arg) { bool nameCheck = strcmp("ArgScale", arg->getName()) == 0; P2ASSERTLINE(323, nameCheck); - efx::ArgScale* argp = static_cast(arg); + ArgScale* argp = static_cast(arg); f32 scale = argp->mScale; if (TSimple1::create(arg)) { mEmitters[0]->setScale(scale); return true; - } else { - return false; } + return false; } /* @@ -1073,7 +603,7 @@ void TParticleCallBack_KchYodare::execute(JPABaseEmitter* emit, JPABaseParticle* } if (position.y < groundY) { - ptcl->_7C |= 2; + ptcl->mFlags |= 2; position.y = groundY; // if (mPosID1 < _1C) { // Vector3f* pos = &mPosList1[mPosID1]; @@ -1097,97 +627,22 @@ void TParticleCallBack_KchYodare::execute(JPABaseEmitter* emit, JPABaseParticle* * Address: 803EC2B0 * Size: 000108 */ -bool TKchYodareBaseChaseMtx::create(efx::Arg* arg) +bool TKchYodareBaseChaseMtx::create(Arg* arg) { P2ASSERTLINE(388, arg); bool nameCheck = strcmp("ArgKchYodare", arg->getName()) == 0; P2ASSERTLINE(389, nameCheck); - efx::ArgKchYodare* argp = static_cast(arg); - f32 scale = argp->mScale; + ArgKchYodare* argp = static_cast(arg); + f32 scale = argp->mScale; mParticleCallBack.mHitGround.create(nullptr); mParticleCallBack.mHitWater.create(nullptr); mScale = scale; if (TSync::create(arg)) { - mEmitter->mEmitterCallback = &mParticleCallBack.mHitGround; + mEmitter->mParticleCallback = &mParticleCallBack; } - return true; - /* - stwu r1, -0x30(r1) - mflr r0 - stw r0, 0x34(r1) - stfd f31, 0x20(r1) - psq_st f31, 40(r1), 0, qr0 - stw r31, 0x1c(r1) - stw r30, 0x18(r1) - stw r29, 0x14(r1) - or. r30, r4, r4 - lis r4, lbl_80497910@ha - mr r29, r3 - addi r31, r4, lbl_80497910@l - bne lbl_803EC2F8 - addi r3, r31, 0 - addi r5, r31, 0x14 - li r4, 0x184 - crclr 6 - bl panic_f__12JUTExceptionFPCciPCce - -lbl_803EC2F8: - mr r3, r30 - lwz r12, 0(r30) - lwz r12, 8(r12) - mtctr r12 - bctrl - mr r4, r3 - addi r3, r31, 0x54 - bl strcmp - cntlzw r0, r3 - rlwinm. r0, r0, 0x1b, 0x18, 0x1f - bne lbl_803EC338 - addi r3, r31, 0 - addi r5, r31, 0x14 - li r4, 0x185 - crclr 6 - bl panic_f__12JUTExceptionFPCciPCce - -lbl_803EC338: - addi r3, r29, 0x18 - lfs f31, 0x10(r30) - lwz r12, 0x18(r29) - li r4, 0 - lwz r12, 8(r12) - mtctr r12 - bctrl - addi r3, r29, 0x34 - li r4, 0 - lwz r12, 0x34(r29) - lwz r12, 8(r12) - mtctr r12 - bctrl - stfs f31, 0x50(r29) - mr r3, r29 - mr r4, r30 - bl create__Q23efx5TSyncFPQ23efx3Arg - clrlwi. r0, r3, 0x18 - beq lbl_803EC390 - lwz r3, 8(r29) - addi r0, r29, 0x14 - stw r0, 0xf0(r3) - -lbl_803EC390: - li r3, 1 - psq_l f31, 40(r1), 0, qr0 - lwz r0, 0x34(r1) - lfd f31, 0x20(r1) - lwz r31, 0x1c(r1) - lwz r30, 0x18(r1) - lwz r29, 0x14(r1) - mtlr r0 - addi r1, r1, 0x30 - blr - */ } /* @@ -1211,10 +666,8 @@ void efx::THdamaSight::setPosNrm(Vector3f& pos, Vector3f& angle) { if (mEmitter) { Matrixf mtx; - mtx.mMatrix.structView.yy = angle.y; - mtx.mMatrix.structView.yz = angle.z; - mtx.mMatrix.structView.yx = angle.x; - // f32 len = _sqrtf(); + angle.normalise(); + mtx.multTranspose(angle); // setAngleMtx maybe mtx.setTranslation(pos); JPASetRMtxTVecfromMtx(mtx.mMatrix.mtxView, mEmitter->mMatrix, &mEmitter->mPosition); @@ -1353,9 +806,9 @@ bool THdamaHit2W::create(efx::Arg* arg) THdamaShootA effect; effect.create(argd); return true; - } else { - return false; } + return false; + /* stwu r1, -0x90(r1) mflr r0 @@ -1497,14 +950,14 @@ bool THdamaDeadHahen1::create(efx::Arg* arg) if (TSimple1::create(arg)) { Matrixf mtx; makeMtxZAxisAlongPosPos(mtx.mMatrix.mtxView, pos1, pos2); - f32 dist = _distanceBetween(pos1, pos2); + f32 dist = _distanceBetween(pos2, pos1); dist /= 100.0f; JPASetRMtxTVecfromMtx(mtx.mMatrix.mtxView, mEmitters[0]->mMatrix, &mEmitters[0]->mPosition); mEmitters[0]->mScale.y *= dist; return true; - } else { - return false; } + return false; + /* stwu r1, -0x70(r1) mflr r0 @@ -1630,16 +1083,16 @@ bool THdamaDeadHahen2::create(efx::Arg* arg) if (TSimple2::create(arg)) { Matrixf mtx; makeMtxZAxisAlongPosPos(mtx.mMatrix.mtxView, pos1, pos2); - f32 dist = _distanceBetween(pos1, pos2); + f32 dist = _distanceBetween(pos2, pos1); dist /= 100.0f; for (int i = 0; i < 2; i++) { JPASetRMtxTVecfromMtx(mtx.mMatrix.mtxView, mEmitters[i]->mMatrix, &mEmitters[i]->mPosition); mEmitters[i]->mScale.y *= dist; } return true; - } else { - return false; } + return false; + /* stwu r1, -0x70(r1) mflr r0 diff --git a/src/plugProjectEbisawaU/efxObject.cpp b/src/plugProjectEbisawaU/efxObject.cpp index bb0b7c1b5..26faba309 100644 --- a/src/plugProjectEbisawaU/efxObject.cpp +++ b/src/plugProjectEbisawaU/efxObject.cpp @@ -25,13 +25,12 @@ bool TOtakaraDive::create(Arg* arg) scale = scale / 35.0f; if (TSimple3::create(arg)) { - mEmitters[0]->setScale(scale); - mEmitters[1]->setScale(scale); - mEmitters[2]->setScale(scale); + for (int i = 0; i < 3; i++) { + mEmitters[i]->setScale(scale); + } return true; - } else { - return false; } + return false; } /* @@ -51,9 +50,8 @@ bool TTsuyuGrow0::create(Arg* arg) if (TSimple1::create(arg)) { JPASetRMtxTVecfromMtx(mtxRot.mMatrix.mtxView, mEmitters[0]->mMatrix, &mEmitters[0]->mPosition); return true; - } else { - return false; } + return false; } /* @@ -69,13 +67,12 @@ bool TOtakaraApL::create(Arg* arg) f32 scale = argScale->mScale; if (TSimple3::create(argScale)) { - mEmitters[0]->setScale(scale); - mEmitters[1]->setScale(scale); - mEmitters[2]->setScale(scale); + for (int i = 0; i < 3; i++) { + mEmitters[i]->setScale(scale); + } return true; - } else { - return false; } + return false; } /* @@ -91,12 +88,12 @@ bool TOtakaraApS::create(Arg* arg) f32 scale = argScale->mScale; if (TSimple2::create(argScale)) { - mEmitters[0]->setScale(scale); - mEmitters[1]->setScale(scale); + for (int i = 0; i < 2; i++) { + mEmitters[i]->setScale(scale); + } return true; - } else { - return false; } + return false; } /* @@ -161,12 +158,10 @@ bool TKouhaiDamage::create(Arg* arg) P2ASSERTLINE(249, argCheck); ArgKouhai* argKouhai = static_cast(arg); - int p1 = argKouhai->_10; + int p1 = argKouhai->mSize; if (TSimple1::create(argKouhai)) { Vector2f scale; - f32 scaleXY; - f32 scaleZ; switch (p1) { case 0: scale = Vector2f(0.35f, 0.35f); @@ -182,9 +177,9 @@ bool TKouhaiDamage::create(Arg* arg) mEmitters[0]->setScale(scale.x, scale.y); return true; - } else { - return false; } + return false; + /* stwu r1, -0x40(r1) mflr r0 @@ -304,81 +299,7 @@ bool TPelkira_ver01::create(Arg* arg) mEffectID = PID_PelKira_3; break; } - return TSync::create(arg); - /* - stwu r1, -0x20(r1) - mflr r0 - stw r0, 0x24(r1) - stw r31, 0x1c(r1) - stw r30, 0x18(r1) - mr r30, r4 - lis r4, lbl_80495988@ha - stw r29, 0x14(r1) - mr r29, r3 - mr r3, r30 - addi r31, r4, lbl_80495988@l - lwz r12, 0(r30) - lwz r12, 8(r12) - mtctr r12 - bctrl - mr r4, r3 - addi r3, r31, 0x34 - bl strcmp - cntlzw r0, r3 - rlwinm. r0, r0, 0x1b, 0x18, 0x1f - bne lbl_803B6178 - addi r3, r31, 0 - addi r5, r31, 0x1c - li r4, 0x113 - crclr 6 - bl panic_f__12JUTExceptionFPCciPCce - -lbl_803B6178: - lwz r0, 0x10(r30) - mr r4, r30 - cmpwi r0, 2 - beq lbl_803B61C0 - bge lbl_803B619C - cmpwi r0, 0 - beq lbl_803B61A8 - bge lbl_803B61B4 - b lbl_803B61D4 - -lbl_803B619C: - cmpwi r0, 4 - bge lbl_803B61D4 - b lbl_803B61CC - -lbl_803B61A8: - li r0, 0x142 - sth r0, 0xc(r29) - b lbl_803B61D4 - -lbl_803B61B4: - li r0, 0x145 - sth r0, 0xc(r29) - b lbl_803B61D4 - -lbl_803B61C0: - li r0, 0x143 - sth r0, 0xc(r29) - b lbl_803B61D4 - -lbl_803B61CC: - li r0, 0x144 - sth r0, 0xc(r29) - -lbl_803B61D4: - mr r3, r29 - bl create__Q23efx5TSyncFPQ23efx3Arg - lwz r0, 0x24(r1) - lwz r31, 0x1c(r1) - lwz r30, 0x18(r1) - lwz r29, 0x14(r1) - mtlr r0 - addi r1, r1, 0x20 - blr - */ + return TSync::create(argpel); } /* @@ -393,7 +314,7 @@ bool Container::create(efx::Arg* arg) ArgType* argtype = static_cast(arg); - switch (argtype->mOnyonType) { + switch (argtype->mType) { case ONYON_TYPE_BLUE: mEffectID = PID_Container_Blue; break; @@ -404,73 +325,7 @@ bool Container::create(efx::Arg* arg) mEffectID = PID_Container_Yellow; break; } - return TSync::create(arg); - /* - stwu r1, -0x10(r1) - mflr r0 - stw r0, 0x14(r1) - stw r31, 0xc(r1) - mr r31, r4 - stw r30, 8(r1) - mr r30, r3 - mr r3, r31 - lwz r12, 0(r31) - lwz r12, 8(r12) - mtctr r12 - bctrl - mr r4, r3 - addi r3, r2, lbl_8051F668@sda21 - bl strcmp - cntlzw r0, r3 - rlwinm. r0, r0, 0x1b, 0x18, 0x1f - bne lbl_803B625C - lis r3, lbl_80495988@ha - lis r5, lbl_804959A4@ha - addi r3, r3, lbl_80495988@l - li r4, 0x12d - addi r5, r5, lbl_804959A4@l - crclr 6 - bl panic_f__12JUTExceptionFPCciPCce - -lbl_803B625C: - lhz r0, 0x10(r31) - mr r4, r31 - cmpwi r0, 1 - beq lbl_803B6294 - bge lbl_803B627C - cmpwi r0, 0 - bge lbl_803B6288 - b lbl_803B62A8 - -lbl_803B627C: - cmpwi r0, 3 - bge lbl_803B62A8 - b lbl_803B62A0 - -lbl_803B6288: - li r0, 0x105 - sth r0, 0xc(r30) - b lbl_803B62A8 - -lbl_803B6294: - li r0, 0x106 - sth r0, 0xc(r30) - b lbl_803B62A8 - -lbl_803B62A0: - li r0, 0x107 - sth r0, 0xc(r30) - -lbl_803B62A8: - mr r3, r30 - bl create__Q23efx5TSyncFPQ23efx3Arg - lwz r0, 0x14(r1) - lwz r31, 0xc(r1) - lwz r30, 8(r1) - mtlr r0 - addi r1, r1, 0x10 - blr - */ + return TSync::create(argtype); } /* @@ -485,7 +340,7 @@ bool ContainerAct::create(efx::Arg* arg) ArgType* argtype = static_cast(arg); - switch (argtype->mOnyonType) { + switch (argtype->mType) { case ONYON_TYPE_BLUE: mItems[0].mEffectID = PID_ContainerAct_Blue_1; mItems[1].mEffectID = PID_ContainerAct_Blue_2; @@ -499,79 +354,7 @@ bool ContainerAct::create(efx::Arg* arg) mItems[1].mEffectID = PID_ContainerAct_Yellow_2; break; } - return TSyncGroup2::create(arg); - /* - stwu r1, -0x10(r1) - mflr r0 - stw r0, 0x14(r1) - stw r31, 0xc(r1) - mr r31, r4 - stw r30, 8(r1) - mr r30, r3 - mr r3, r31 - lwz r12, 0(r31) - lwz r12, 8(r12) - mtctr r12 - bctrl - mr r4, r3 - addi r3, r2, lbl_8051F668@sda21 - bl strcmp - cntlzw r0, r3 - rlwinm. r0, r0, 0x1b, 0x18, 0x1f - bne lbl_803B632C - lis r3, lbl_80495988@ha - lis r5, lbl_804959A4@ha - addi r3, r3, lbl_80495988@l - li r4, 0x142 - addi r5, r5, lbl_804959A4@l - crclr 6 - bl panic_f__12JUTExceptionFPCciPCce - -lbl_803B632C: - lhz r0, 0x10(r31) - mr r4, r31 - cmpwi r0, 1 - beq lbl_803B636C - bge lbl_803B634C - cmpwi r0, 0 - bge lbl_803B6358 - b lbl_803B6390 - -lbl_803B634C: - cmpwi r0, 3 - bge lbl_803B6390 - b lbl_803B6380 - -lbl_803B6358: - li r3, 0xf8 - li r0, 0xf9 - sth r3, 0x10(r30) - sth r0, 0x20(r30) - b lbl_803B6390 - -lbl_803B636C: - li r3, 0xfa - li r0, 0xfb - sth r3, 0x10(r30) - sth r0, 0x20(r30) - b lbl_803B6390 - -lbl_803B6380: - li r3, 0xfc - li r0, 0xfd - sth r3, 0x10(r30) - sth r0, 0x20(r30) - -lbl_803B6390: - mr r3, r30 - bl "create__Q23efx28TSyncGroup2FPQ23efx3Arg" - lwz r0, 0x14(r1) - lwz r31, 0xc(r1) - lwz r30, 8(r1) - mtlr r0 - addi r1, r1, 0x10 - blr - */ + return TSyncGroup2::create(argtype); } /* @@ -579,44 +362,30 @@ bool ContainerAct::create(efx::Arg* arg) * Address: 803B63B0 * Size: 0001B0 */ -void WarpZone::setRateLOD(int offs, bool flag) +void WarpZone::setRateLOD(int id, bool flag) { - JPABaseEmitter* emit; - if (flag) { - emit = mItems[0].mEmitter; - f32 data[12] = { 0.3f, 0.25f, 0.15f, 0.06f, 0.05f, 0.04f, 0.0f, 0.0f, 0.0f, 0.1f, 0.08f, 0.06f }; - if (emit) { - emit->_28 = data[offs]; - } - emit = mItems[1].mEmitter; - if (emit) { - emit->_28 = data[offs + 3]; - } - emit = mItems[2].mEmitter; - if (emit) { - emit->_28 = data[offs + 6]; - } - emit = mItems[3].mEmitter; - if (emit) { - emit->_28 = data[offs + 9]; + if (!flag) { + f32 lods[4][3] = { + { 0.3f, 0.25f, 0.15f }, + { 0.06f, 0.05f, 0.04f }, + { 0.225f, 0.2f, 0.15f }, + { 0.1f, 0.08f, 0.06f }, + }; + for (int i = 0; i < 4; i++) { + if (mItems[i].mEmitter) + mItems[i].mEmitter->_28 = lods[i][id]; } } else { - emit = mItems[0].mEmitter; - f32 data[12] = { 0.3f, 0.25f, 0.15f, 0.06f, 0.05f, 0.04f, 0.225f, 0.2f, 0.15f, 0.1f, 0.08f, 0.06f }; - if (emit) { - emit->_28 = data[offs]; - } - emit = mItems[1].mEmitter; - if (emit) { - emit->_28 = data[offs + 3]; - } - emit = mItems[2].mEmitter; - if (emit) { - emit->_28 = data[offs + 6]; - } - emit = mItems[3].mEmitter; - if (emit) { - emit->_28 = data[offs + 9]; + f32 lods[4][3] = { + { 0.3f, 0.25f, 0.15f }, + { 0.06f, 0.05f, 0.04f }, + { 0.0f, 0.0f, 0.0f }, + { 0.1f, 0.08f, 0.06f }, + }; + + for (int i = 0; i < 4; i++) { + if (mItems[i].mEmitter) + mItems[i].mEmitter->_28 = lods[i][id]; } } /* @@ -747,126 +516,4 @@ void WarpZone::setRateLOD(int offs, bool flag) */ } -/* - * --INFO-- - * Address: 803B6560 - * Size: 00009C - */ -Container::~Container() -{ - /* - stwu r1, -0x10(r1) - mflr r0 - stw r0, 0x14(r1) - stw r31, 0xc(r1) - mr r31, r4 - stw r30, 8(r1) - or. r30, r3, r3 - beq lbl_803B65E0 - lis r3, __vt__Q23efx9Container@ha - addi r3, r3, __vt__Q23efx9Container@l - stw r3, 0(r30) - addi r0, r3, 0x14 - stw r0, 4(r30) - beq lbl_803B65D0 - lis r3, __vt__Q23efx8TForever@ha - addi r3, r3, __vt__Q23efx8TForever@l - stw r3, 0(r30) - addi r0, r3, 0x14 - stw r0, 4(r30) - beq lbl_803B65D0 - lis r4, __vt__Q23efx5TSync@ha - addi r3, r30, 4 - addi r5, r4, __vt__Q23efx5TSync@l - li r4, 0 - stw r5, 0(r30) - addi r0, r5, 0x14 - stw r0, 4(r30) - bl __dt__18JPAEmitterCallBackFv - -lbl_803B65D0: - extsh. r0, r31 - ble lbl_803B65E0 - mr r3, r30 - bl __dl__FPv - -lbl_803B65E0: - lwz r0, 0x14(r1) - mr r3, r30 - lwz r31, 0xc(r1) - lwz r30, 8(r1) - mtlr r0 - addi r1, r1, 0x10 - blr - */ -} - -/* - * --INFO-- - * Address: 803B65FC - * Size: 00009C - */ -TPelkira_ver01::~TPelkira_ver01() -{ - /* - stwu r1, -0x10(r1) - mflr r0 - stw r0, 0x14(r1) - stw r31, 0xc(r1) - mr r31, r4 - stw r30, 8(r1) - or. r30, r3, r3 - beq lbl_803B667C - lis r3, __vt__Q23efx14TPelkira_ver01@ha - addi r3, r3, __vt__Q23efx14TPelkira_ver01@l - stw r3, 0(r30) - addi r0, r3, 0x14 - stw r0, 4(r30) - beq lbl_803B666C - lis r3, __vt__Q23efx9TChasePos@ha - addi r3, r3, __vt__Q23efx9TChasePos@l - stw r3, 0(r30) - addi r0, r3, 0x14 - stw r0, 4(r30) - beq lbl_803B666C - lis r4, __vt__Q23efx5TSync@ha - addi r3, r30, 4 - addi r5, r4, __vt__Q23efx5TSync@l - li r4, 0 - stw r5, 0(r30) - addi r0, r5, 0x14 - stw r0, 4(r30) - bl __dt__18JPAEmitterCallBackFv - -lbl_803B666C: - extsh. r0, r31 - ble lbl_803B667C - mr r3, r30 - bl __dl__FPv - -lbl_803B667C: - lwz r0, 0x14(r1) - mr r3, r30 - lwz r31, 0xc(r1) - lwz r30, 8(r1) - mtlr r0 - addi r1, r1, 0x10 - blr - */ -} - -/* - * --INFO-- - * Address: 803B6698 - * Size: 000004 - */ -void TOtakaraAp::forceKill() { } - -/* - * --INFO-- - * Address: 803B669C - * Size: 000004 - */ -void TOtakaraAp::fade() { } - } // namespace efx diff --git a/src/plugProjectEbisawaU/efxPikmin.cpp b/src/plugProjectEbisawaU/efxPikmin.cpp index 69ac21a47..f9688b5fb 100644 --- a/src/plugProjectEbisawaU/efxPikmin.cpp +++ b/src/plugProjectEbisawaU/efxPikmin.cpp @@ -1617,7 +1617,7 @@ void TPkEffectTane::init() { mPikiColor = -1; mPos = nullptr; - mPos2 = nullptr; + _0C = nullptr; _08 = nullptr; _10 = nullptr; }