Link efxObject.cpp

This commit is contained in:
HeartPiece 2024-05-27 13:19:57 +10:00
parent 7aac4dd7f6
commit 4fcebe4812
8 changed files with 38 additions and 1711 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1454,7 +1454,7 @@ LIBS = [
"objects": [
["plugProjectEbisawaU/efxBase", False],
["plugProjectEbisawaU/efxEnemy", False],
["plugProjectEbisawaU/efxObject", False],
["plugProjectEbisawaU/efxObject", True],
["plugProjectEbisawaU/efxPikmin", False],
["plugProjectEbisawaU/particle2dMgr", True],
["plugProjectEbisawaU/efx2dBase", True],

View File

@ -61,9 +61,9 @@
| File | Size (bytes) | File | Size (bytes) |
| ---- | ---- | ---- | ---- |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/efx2dEffect.cpp">efx2dEffect.cpp</a> | 10349 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/ebi2DCallBack.cpp">ebi2DCallBack.cpp</a> | 10465 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/efxObject.cpp">efxObject.cpp</a> | 11310 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/particleMgr.cpp">particleMgr.cpp</a> | 12851 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/ebiP2Title.cpp">ebiP2Title.cpp</a> | 23800 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/efxPikmin.cpp">efxPikmin.cpp</a> | 31421 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/efxBase.cpp">efxBase.cpp</a> | 34393 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/efxEnemy.cpp">efxEnemy.cpp</a> | 37461 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/particleMgr.cpp">particleMgr.cpp</a> | 12851 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/ebiP2Title.cpp">ebiP2Title.cpp</a> | 23800 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/efxPikmin.cpp">efxPikmin.cpp</a> | 31421 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/efxEnemy.cpp">efxEnemy.cpp</a> | 32976 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectEbisawaU/efxBase.cpp">efxBase.cpp</a> | 34393 | | |
### <section id="plugProjectHikinoU">plugProjectHikinoU</section>
| File | Size (bytes) | File | Size (bytes) |

View File

@ -37,6 +37,8 @@ struct TSync : public TBase, public JPAEmitterCallBack {
virtual void endDemoDrawOn() { mFlags &= ~TSYNCFLAG_DemoDrawOff; } // _44 (weak)
virtual ~TSync() { } // _48 (weak; thunk at _1C)
inline JPABaseEmitter* getEmitter() const { return mEmitter; }
// _00 = VTBL
// _04 = JPAEmitterCallBack
JPABaseEmitter* mEmitter; // _08

View File

@ -1,7 +1,7 @@
EBISAWA_FILES:=\
$(BUILD_DIR)/asm/plugProjectEbisawaU/efxBase.o\
$(BUILD_DIR)/asm/plugProjectEbisawaU/efxEnemy.o\
$(BUILD_DIR)/asm/plugProjectEbisawaU/efxObject.o\
$(BUILD_DIR)/src/plugProjectEbisawaU/efxObject.o\
$(BUILD_DIR)/asm/plugProjectEbisawaU/efxPikmin.o\
$(BUILD_DIR)/src/plugProjectEbisawaU/particle2dMgr.o\
$(BUILD_DIR)/src/plugProjectEbisawaU/efx2dBase.o\

View File

@ -473,74 +473,11 @@ void TYakiBody::setRateLOD(int id)
};
for (int i = 0; i < 4; i++) {
if (mItems[i].mEmitter)
mItems[i].mEmitter->setRate(lods[i][id]);
JPABaseEmitter* emitter = mItems[i].getEmitter();
if (emitter) {
emitter->setRate(lods[i][id]);
}
}
/*
stwu r1, -0x50(r1)
lis r5, lbl_804958CC@ha
slwi r0, r4, 2
stmw r27, 0x3c(r1)
addi r29, r5, lbl_804958CC@l
addi r27, r1, 8
add r27, r27, r0
lwz r28, 0xc(r3)
lwz r30, 0(r29)
lwz r31, 4(r29)
cmplwi r28, 0
lwz r12, 8(r29)
lwz r11, 0xc(r29)
lwz r10, 0x10(r29)
lwz r9, 0x14(r29)
lwz r8, 0x18(r29)
lwz r7, 0x1c(r29)
lwz r6, 0x20(r29)
lwz r5, 0x24(r29)
lwz r4, 0x28(r29)
lwz r0, 0x2c(r29)
stw r30, 8(r1)
stw r31, 0xc(r1)
stw r12, 0x10(r1)
stw r11, 0x14(r1)
stw r10, 0x18(r1)
stw r9, 0x1c(r1)
stw r8, 0x20(r1)
stw r7, 0x24(r1)
stw r6, 0x28(r1)
stw r5, 0x2c(r1)
stw r4, 0x30(r1)
stw r0, 0x34(r1)
beq lbl_803B3CC8
lfs f0, 0(r27)
stfs f0, 0x28(r28)
lbl_803B3CC8:
lwz r28, 0x20(r3)
cmplwi r28, 0
beq lbl_803B3CDC
lfs f0, 0xc(r27)
stfs f0, 0x28(r28)
lbl_803B3CDC:
addi r3, r3, 0x28
lwz r28, 0xc(r3)
cmplwi r28, 0
beq lbl_803B3CF4
lfs f0, 0x18(r27)
stfs f0, 0x28(r28)
lbl_803B3CF4:
lwz r28, 0x20(r3)
cmplwi r28, 0
beq lbl_803B3D08
lfs f0, 0x24(r27)
stfs f0, 0x28(r28)
lbl_803B3D08:
lmw r27, 0x3c(r1)
addi r1, r1, 0x50
blr
*/
}
/**
@ -1213,74 +1150,11 @@ void THibaFire::setRateLOD(int id)
};
for (int i = 0; i < 4; i++) {
if (mItems[i].mEmitter)
mItems[i].mEmitter->mRate = lods[i][id];
JPABaseEmitter* emitter = mItems[i].getEmitter();
if (emitter) {
emitter->setRate(lods[i][id]);
}
}
/*
stwu r1, -0x50(r1)
lis r5, lbl_804958FC@ha
slwi r0, r4, 2
stmw r27, 0x3c(r1)
addi r29, r5, lbl_804958FC@l
addi r27, r1, 8
add r27, r27, r0
lwz r28, 0xc(r3)
lwz r30, 0(r29)
lwz r31, 4(r29)
cmplwi r28, 0
lwz r12, 8(r29)
lwz r11, 0xc(r29)
lwz r10, 0x10(r29)
lwz r9, 0x14(r29)
lwz r8, 0x18(r29)
lwz r7, 0x1c(r29)
lwz r6, 0x20(r29)
lwz r5, 0x24(r29)
lwz r4, 0x28(r29)
lwz r0, 0x2c(r29)
stw r30, 8(r1)
stw r31, 0xc(r1)
stw r12, 0x10(r1)
stw r11, 0x14(r1)
stw r10, 0x18(r1)
stw r9, 0x1c(r1)
stw r8, 0x20(r1)
stw r7, 0x24(r1)
stw r6, 0x28(r1)
stw r5, 0x2c(r1)
stw r4, 0x30(r1)
stw r0, 0x34(r1)
beq lbl_803B4A40
lfs f0, 0(r27)
stfs f0, 0x28(r28)
lbl_803B4A40:
lwz r28, 0x1c(r3)
cmplwi r28, 0
beq lbl_803B4A54
lfs f0, 0xc(r27)
stfs f0, 0x28(r28)
lbl_803B4A54:
addi r3, r3, 0x20
lwz r28, 0xc(r3)
cmplwi r28, 0
beq lbl_803B4A6C
lfs f0, 0x18(r27)
stfs f0, 0x28(r28)
lbl_803B4A6C:
lwz r28, 0x1c(r3)
cmplwi r28, 0
beq lbl_803B4A80
lfs f0, 0x24(r27)
stfs f0, 0x28(r28)
lbl_803B4A80:
lmw r27, 0x3c(r1)
addi r1, r1, 0x50
blr
*/
}
/**
@ -1314,45 +1188,11 @@ void TGasuHiba::setRateLOD(int id)
};
for (int i = 0; i < 2; i++) {
if (mItems[i].mEmitter)
mItems[i].mEmitter->mRate = lods[i][id];
JPABaseEmitter* emitter = mItems[i].getEmitter();
if (emitter) {
emitter->setRate(lods[i][id]);
}
}
/*
stwu r1, -0x20(r1)
lis r5, lbl_80495938@ha
addi r9, r5, lbl_80495938@l
slwi r0, r4, 2
lwz r10, 0xc(r3)
addi r11, r1, 8
lwz r8, 0(r9)
add r11, r11, r0
lwz r7, 4(r9)
cmplwi r10, 0
lwz r6, 8(r9)
lwz r5, 0xc(r9)
lwz r4, 0x10(r9)
lwz r0, 0x14(r9)
stw r8, 8(r1)
stw r7, 0xc(r1)
stw r6, 0x10(r1)
stw r5, 0x14(r1)
stw r4, 0x18(r1)
stw r0, 0x1c(r1)
beq lbl_803B4BA8
lfs f0, 0(r11)
stfs f0, 0x28(r10)
lbl_803B4BA8:
lwz r10, 0x1c(r3)
cmplwi r10, 0
beq lbl_803B4BBC
lfs f0, 0xc(r11)
stfs f0, 0x28(r10)
lbl_803B4BBC:
addi r1, r1, 0x20
blr
*/
}
/**
@ -1651,62 +1491,11 @@ void TDenkiHibaMgr::setRateLOD(int id)
};
for (int i = 0; i < 3; i++) {
if (mHiba.mItems[i].mEmitter)
mHiba.mItems[i].mEmitter->setRate(lods[i][id]);
JPABaseEmitter* emitter = mHiba.mItems[i].getEmitter();
if (emitter) {
emitter->setRate(lods[i][id]);
}
}
/*
stwu r1, -0x40(r1)
lis r5, lbl_80495960@ha
addi r12, r5, lbl_80495960@l
slwi r0, r4, 2
stw r31, 0x3c(r1)
stw r30, 0x38(r1)
addi r30, r1, 8
add r30, r30, r0
lwz r31, 0x10(r3)
lwz r11, 0(r12)
lwz r10, 4(r12)
cmplwi r31, 0
lwz r9, 8(r12)
lwz r8, 0xc(r12)
lwz r7, 0x10(r12)
lwz r6, 0x14(r12)
lwz r5, 0x18(r12)
lwz r4, 0x1c(r12)
lwz r0, 0x20(r12)
stw r11, 8(r1)
stw r10, 0xc(r1)
stw r9, 0x10(r1)
stw r8, 0x14(r1)
stw r7, 0x18(r1)
stw r6, 0x1c(r1)
stw r5, 0x20(r1)
stw r4, 0x24(r1)
stw r0, 0x28(r1)
beq lbl_803B5210
lfs f0, 0(r30)
stfs f0, 0x28(r31)
lbl_803B5210:
lwz r31, 0x20(r3)
cmplwi r31, 0
beq lbl_803B5224
lfs f0, 0xc(r30)
stfs f0, 0x28(r31)
lbl_803B5224:
lwz r31, 0x30(r3)
cmplwi r31, 0
beq lbl_803B5238
lfs f0, 0x18(r30)
stfs f0, 0x28(r31)
lbl_803B5238:
lwz r31, 0x3c(r1)
lwz r30, 0x38(r1)
addi r1, r1, 0x40
blr
*/
}
} // namespace efx

View File

@ -154,117 +154,25 @@ bool TKouhaiDamage::create(Arg* arg)
int p1 = argKouhai->mSize;
if (TSimple1::create(argKouhai)) {
Vector2f scale;
JGeometry::TVec3f scale;
switch (p1) {
case 0:
scale.set(0.35f, 0.35f);
scale.set(0.35f, 0.35f, 0.35f);
break;
case 1:
scale.set(0.6f, 0.6f);
scale.set(0.6f, 0.6f, 0.6f);
break;
case 2:
scale.set(0.35f, 1.0f); // this should be 1.0 and 1.0 but doing so breaks it
scale.set(1.0f, 1.0f, 1.0f);
break;
}
for (int i = 0; i < 1; i++) {
mEmitters[i]->setScale(scale.x, scale.y);
mEmitters[i]->setScale(scale);
}
return true;
}
return false;
/*
stwu r1, -0x40(r1)
mflr r0
stw r0, 0x44(r1)
stfd f31, 0x30(r1)
psq_st f31, 56(r1), 0, qr0
stfd f30, 0x20(r1)
psq_st f30, 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_80495988@ha
lwz r12, 0(r30)
addi r31, r4, lbl_80495988@l
lwz r12, 8(r12)
mtctr r12
bctrl
mr r4, r3
addi r3, r31, 0x28
bl strcmp
cntlzw r0, r3
rlwinm. r0, r0, 0x1b, 0x18, 0x1f
bne lbl_803B6064
addi r3, r31, 0
addi r5, r31, 0x1c
li r4, 0xf9
crclr 6
bl panic_f__12JUTExceptionFPCciPCce
lbl_803B6064:
lwz r31, 0x10(r30)
mr r3, r29
mr r4, r30
bl create__Q23efx8TSimple1FPQ23efx3Arg
clrlwi. r0, r3, 0x18
beq lbl_803B60E0
cmpwi r31, 1
beq lbl_803B60AC
bge lbl_803B6094
cmpwi r31, 0
bge lbl_803B60A0
b lbl_803B60C0
lbl_803B6094:
cmpwi r31, 3
bge lbl_803B60C0
b lbl_803B60B8
lbl_803B60A0:
lfs f31, lbl_8051F65C@sda21(r2)
fmr f30, f31
b lbl_803B60C0
lbl_803B60AC:
lfs f31, lbl_8051F660@sda21(r2)
fmr f30, f31
b lbl_803B60C0
lbl_803B60B8:
lfs f31, lbl_8051F664@sda21(r2)
fmr f30, f31
lbl_803B60C0:
lwz r4, 8(r29)
li r3, 1
stfs f31, 0x98(r4)
stfs f31, 0x9c(r4)
stfs f30, 0xa0(r4)
stfs f31, 0xb0(r4)
stfs f31, 0xb4(r4)
b lbl_803B60E4
lbl_803B60E0:
li r3, 0
lbl_803B60E4:
psq_l f31, 56(r1), 0, qr0
lfd f31, 0x30(r1)
psq_l f30, 40(r1), 0, qr0
lfd f30, 0x20(r1)
lwz r31, 0x1c(r1)
lwz r30, 0x18(r1)
lwz r0, 0x44(r1)
lwz r29, 0x14(r1)
mtlr r0
addi r1, r1, 0x40
blr
*/
}
/**
@ -362,8 +270,10 @@ void WarpZone::setRateLOD(int id, bool flag)
{ 0.1f, 0.08f, 0.06f },
};
for (int i = 0; i < 4; i++) {
if (mItems[i].mEmitter)
mItems[i].mEmitter->setRate(lods[i][id]);
JPABaseEmitter* emitter = mItems[i].getEmitter();
if (emitter) {
emitter->setRate(lods[i][id]);
}
}
} else {
f32 lods[4][3] = {
@ -374,136 +284,12 @@ void WarpZone::setRateLOD(int id, bool flag)
};
for (int i = 0; i < 4; i++) {
if (mItems[i].mEmitter)
mItems[i].mEmitter->setRate(lods[i][id]);
JPABaseEmitter* emitter = mItems[i].getEmitter();
if (emitter) {
emitter->setRate(lods[i][id]);
}
}
}
/*
stwu r1, -0x80(r1)
clrlwi. r0, r5, 0x18
stmw r27, 0x6c(r1)
bne lbl_803B648C
lis r5, lbl_804959C8@ha
lwz r28, 0xc(r3)
addi r31, r5, lbl_804959C8@l
slwi r0, r4, 2
addi r27, r1, 0x38
lwz r30, 0(r31)
lwz r29, 4(r31)
add r27, r27, r0
lwz r12, 8(r31)
cmplwi r28, 0
lwz r11, 0xc(r31)
lwz r10, 0x10(r31)
lwz r9, 0x14(r31)
lwz r8, 0x18(r31)
lwz r7, 0x1c(r31)
lwz r6, 0x20(r31)
lwz r5, 0x24(r31)
lwz r4, 0x28(r31)
lwz r0, 0x2c(r31)
stw r30, 0x38(r1)
stw r29, 0x3c(r1)
stw r12, 0x40(r1)
stw r11, 0x44(r1)
stw r10, 0x48(r1)
stw r9, 0x4c(r1)
stw r8, 0x50(r1)
stw r7, 0x54(r1)
stw r6, 0x58(r1)
stw r5, 0x5c(r1)
stw r4, 0x60(r1)
stw r0, 0x64(r1)
beq lbl_803B6448
lfs f0, 0(r27)
stfs f0, 0x28(r28)
lbl_803B6448:
lwz r28, 0x1c(r3)
cmplwi r28, 0
beq lbl_803B645C
lfs f0, 0xc(r27)
stfs f0, 0x28(r28)
lbl_803B645C:
addi r3, r3, 0x20
lwz r28, 0xc(r3)
cmplwi r28, 0
beq lbl_803B6474
lfs f0, 0x18(r27)
stfs f0, 0x28(r28)
lbl_803B6474:
lwz r28, 0x1c(r3)
cmplwi r28, 0
beq lbl_803B6554
lfs f0, 0x24(r27)
stfs f0, 0x28(r28)
b lbl_803B6554
lbl_803B648C:
lis r5, lbl_804959F8@ha
lwz r28, 0xc(r3)
addi r29, r5, lbl_804959F8@l
slwi r0, r4, 2
addi r27, r1, 8
lwz r30, 0(r29)
lwz r31, 4(r29)
add r27, r27, r0
lwz r12, 8(r29)
cmplwi r28, 0
lwz r11, 0xc(r29)
lwz r10, 0x10(r29)
lwz r9, 0x14(r29)
lwz r8, 0x18(r29)
lwz r7, 0x1c(r29)
lwz r6, 0x20(r29)
lwz r5, 0x24(r29)
lwz r4, 0x28(r29)
lwz r0, 0x2c(r29)
stw r30, 8(r1)
stw r31, 0xc(r1)
stw r12, 0x10(r1)
stw r11, 0x14(r1)
stw r10, 0x18(r1)
stw r9, 0x1c(r1)
stw r8, 0x20(r1)
stw r7, 0x24(r1)
stw r6, 0x28(r1)
stw r5, 0x2c(r1)
stw r4, 0x30(r1)
stw r0, 0x34(r1)
beq lbl_803B6514
lfs f0, 0(r27)
stfs f0, 0x28(r28)
lbl_803B6514:
lwz r28, 0x1c(r3)
cmplwi r28, 0
beq lbl_803B6528
lfs f0, 0xc(r27)
stfs f0, 0x28(r28)
lbl_803B6528:
addi r3, r3, 0x20
lwz r28, 0xc(r3)
cmplwi r28, 0
beq lbl_803B6540
lfs f0, 0x18(r27)
stfs f0, 0x28(r28)
lbl_803B6540:
lwz r28, 0x1c(r3)
cmplwi r28, 0
beq lbl_803B6554
lfs f0, 0x24(r27)
stfs f0, 0x28(r28)
lbl_803B6554:
lmw r27, 0x6c(r1)
addi r1, r1, 0x80
blr
*/
}
} // namespace efx

View File

@ -999,3 +999,5 @@ You have 4591 out of 10000 Pokos and 113 out of 201 treasures.",2024-05-21 22:29
You have 4595 out of 10000 Pokos and 113 out of 201 treasures.",2024-05-23 17:13:46.008587
4600,2140264,0.4600391371934024,113,402949,0.565260024464969,"
You have 4600 out of 10000 Pokos and 113 out of 201 treasures.",2024-05-27 02:38:52.714408
4608,2144092,0.4608619468174377,113,403458,0.5659740536658175,"
You have 4608 out of 10000 Pokos and 113 out of 201 treasures.",2024-05-27 13:18:32.748006

1 code_count_in_pokos code_completion_in_bytes code_completion_in_percentage data_count_in_treasures data_completion_in_bytes data_completion_in_percentage sentence created_at
999
1000
1001
1002
1003