mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
Match PlayEffect (#478)
* Match PlayEffect * Delete PlayEffect.s * Remove comments * Fix warnings * Update fx_api.c
This commit is contained in:
parent
e8e5aee522
commit
2010d0b320
@ -179,12 +179,12 @@ void playFX_17(s32, f32, f32, f32);
|
|||||||
void playFX_18(s32, f32, f32, f32, f32, f32, f32, s32);
|
void playFX_18(s32, f32, f32, f32, f32, f32, f32, s32);
|
||||||
void playFX_19(s32, f32, f32, f32);
|
void playFX_19(s32, f32, f32, f32);
|
||||||
EffectInstance* playFX_1A(s32, f32, f32, f32, s32);
|
EffectInstance* playFX_1A(s32, f32, f32, f32, s32);
|
||||||
EffectInstance* playFX_1B(s32, f32, f32, f32, f32, s32);
|
EffectInstance* playFX_1B(s32, f32, f32, f32, f32, s32*);
|
||||||
EffectInstance* playFX_1C(s32, f32, f32, f32, s32);
|
EffectInstance* playFX_1C(s32, f32, f32, f32, s32);
|
||||||
void playFX_1D(s32, f32, f32, f32, f32, s32, f32, s32);
|
void playFX_1D(s32, f32, f32, f32, f32, s32, f32, s32);
|
||||||
EffectInstance* playFX_1E(s32, f32, f32, f32, f32, f32, s32, s32*);
|
EffectInstance* playFX_1E(s32, f32, f32, f32, f32, f32, s32, s32*);
|
||||||
EffectInstance* playFX_1F(s32, f32, f32, f32, f32, f32, f32, f32);
|
EffectInstance* playFX_1F(s32, f32, f32, f32, f32, f32, f32, f32);
|
||||||
EffectInstance* playFX_20(s32, f32, f32, f32, f32, s32);
|
EffectInstance* playFX_20(s32, f32, f32, f32, f32, s32*);
|
||||||
EffectInstance* playFX_21(s32, f32, f32, f32, f32, f32, s32);
|
EffectInstance* playFX_21(s32, f32, f32, f32, f32, f32, s32);
|
||||||
void playFX_22(s32, f32, f32, f32, f32, f32, s32, s32);
|
void playFX_22(s32, f32, f32, f32, f32, f32, s32, s32);
|
||||||
EffectInstance* playFX_23(u32, f32, f32, f32, f32);
|
EffectInstance* playFX_23(u32, f32, f32, f32, f32);
|
||||||
@ -193,26 +193,26 @@ EffectInstance* playFX_25(s32, f32, f32, f32);
|
|||||||
void playFX_26(s32, f32, f32, f32);
|
void playFX_26(s32, f32, f32, f32);
|
||||||
EffectInstance* playFX_27(s32, f32, f32, f32, f32, s32);
|
EffectInstance* playFX_27(s32, f32, f32, f32, f32, s32);
|
||||||
void fx_sweat(s32, f32 x, f32 y, f32 z, f32, f32, s32);
|
void fx_sweat(s32, f32 x, f32 y, f32 z, f32, f32, s32);
|
||||||
void fx_sleep_bubble(s32, f32, f32, f32, f32, f32, s32);
|
void fx_sleep_bubble(s32, f32, f32, f32, f32, f32, s32*);
|
||||||
EffectInstance* playFX_2A(s32, f32, f32, f32);
|
EffectInstance* playFX_2A(s32, f32, f32, f32);
|
||||||
EffectInstance* playFX_2B(s32, f32, f32, f32);
|
EffectInstance* playFX_2B(s32, f32, f32, f32);
|
||||||
EffectInstance* playFX_2C(s32, f32, f32, f32);
|
EffectInstance* playFX_2C(s32, f32, f32, f32);
|
||||||
void playFX_2D(s32, f32, f32, f32, s32, s32);
|
void playFX_2D(s32, f32, f32, f32, s32, s32);
|
||||||
void playFX_2E(s32, f32, f32, f32, f32, s32);
|
void playFX_2E(s32, f32, f32, f32, f32, s32);
|
||||||
void playFX_2F(s32, f32, f32, f32, f32, s32, s32);
|
void playFX_2F(s32, f32, f32, f32, f32, s32, s32*);
|
||||||
void playFX_30(s32, f32, f32, f32);
|
void playFX_30(s32, f32, f32, f32);
|
||||||
void playFX_31(s32, f32, f32, f32);
|
void playFX_31(s32, f32, f32, f32);
|
||||||
void playFX_32(s32, f32, f32, f32, f32);
|
void playFX_32(s32, f32, f32, f32, f32);
|
||||||
EffectInstance* playFX_33(s32, f32, f32, f32, f32, s32);
|
EffectInstance* playFX_33(s32, f32, f32, f32, f32, s32);
|
||||||
EffectInstance* playFX_34(s32, f32, f32, f32, f32, s32);
|
EffectInstance* playFX_34(s32, f32, f32, f32, f32, s32*);
|
||||||
EffectInstance* playFX_35(s32, f32, f32, f32, f32, s32);
|
EffectInstance* playFX_35(s32, f32, f32, f32, f32, s32*);
|
||||||
EffectInstance* playFX_36(s32, f32, f32, f32, f32, f32);
|
EffectInstance* playFX_36(s32, f32, f32, f32, f32, f32);
|
||||||
EffectInstance* playFX_37(s32, f32, f32, f32, f32, f32, f32, s32, s32, s32);
|
EffectInstance* playFX_37(s32, f32, f32, f32, f32, f32, f32, s32, s32, s32);
|
||||||
EffectInstance* playFX_38(s32, f32, f32, f32, f32, s32);
|
EffectInstance* playFX_38(s32, f32, f32, f32, f32, s32);
|
||||||
EffectInstance* playFX_39(s32, f32, f32, f32, f32, s32);
|
EffectInstance* playFX_39(s32, f32, f32, f32, f32, s32);
|
||||||
EffectInstance* playFX_3A(s32, f32, f32, f32, f32, f32, s32, s32);
|
EffectInstance* playFX_3A(s32, f32, f32, f32, f32, f32, s32, s32);
|
||||||
void playFX_3B(s32, f32, f32, f32, f32, s32);
|
void playFX_3B(s32, f32, f32, f32, f32, s32*);
|
||||||
EffectInstance* playFX_3C(s32, f32, f32, f32, f32, s32);
|
EffectInstance* playFX_3C(s32, f32, f32, f32, f32, s32*);
|
||||||
void playFX_3D(s32, f32, f32, f32, f32, f32, f32, s32, s32*);
|
void playFX_3D(s32, f32, f32, f32, f32, f32, f32, s32, s32*);
|
||||||
EffectInstance* playFX_3E(s32, f32, f32, f32, f32, s32);
|
EffectInstance* playFX_3E(s32, f32, f32, f32, f32, s32);
|
||||||
EffectInstance* playFX_3F(s32, f32, f32, f32, s32);
|
EffectInstance* playFX_3F(s32, f32, f32, f32, s32);
|
||||||
|
@ -127,57 +127,27 @@ INCLUDE_ASM(ApiStatus, "evt/fx_api", ShowSleepBubble, Evt* script, s32 isInitial
|
|||||||
|
|
||||||
INCLUDE_ASM(ApiStatus, "evt/fx_api", func_802D8248, Evt* script, s32 isInitialCall);
|
INCLUDE_ASM(ApiStatus, "evt/fx_api", func_802D8248, Evt* script, s32 isInitialCall);
|
||||||
|
|
||||||
// So close aside from regalloc at the beginning
|
|
||||||
#ifdef NON_MATCHING
|
|
||||||
ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
|
ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args;
|
Bytecode* intArgs = script->ptrReadPos;
|
||||||
Bytecode* intArgs;
|
Bytecode* floatArgs = script->ptrReadPos;
|
||||||
Bytecode* floatArgs;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 effectID;
|
|
||||||
EffectInstance* effectRet;
|
|
||||||
|
|
||||||
s32 a2;
|
|
||||||
s32 a6;
|
|
||||||
s32 a7;
|
|
||||||
s32 a8;
|
|
||||||
s32 a9;
|
|
||||||
|
|
||||||
|
s32 effectID = evt_get_variable(script, *intArgs++);
|
||||||
|
EffectInstance* effectRet = NULL;
|
||||||
s32 new_var;
|
s32 new_var;
|
||||||
s32 iVar1;
|
|
||||||
s32 iVar2;
|
|
||||||
s32 iVar3;
|
|
||||||
s32 iVar4;
|
|
||||||
s32 iVar5;
|
|
||||||
s32 iVar6;
|
|
||||||
s32 iVar7;
|
|
||||||
s32 iVar8;
|
|
||||||
s32 iVar9;
|
|
||||||
s32 iVar10;
|
|
||||||
|
|
||||||
f32 fVar1;
|
s32 iVar1, iVar2, iVar3, iVar4, iVar5;
|
||||||
f32 fVar2;
|
s32 iVar6, iVar7, iVar8, iVar9, iVar10;
|
||||||
f32 fVar3;
|
|
||||||
f32 fVar4;
|
|
||||||
f32 fVar5;
|
|
||||||
f32 fVar6;
|
|
||||||
f32 fVar7;
|
|
||||||
f32 fVar8;
|
|
||||||
f32 fVar9;
|
|
||||||
f32 fVar10;
|
|
||||||
f32 fVar11;
|
|
||||||
|
|
||||||
s32 sp3C;
|
f32 fVar1, fVar2, fVar3, fVar4, fVar5, fVar6;
|
||||||
s32 sp30;
|
f32 fVar7, fVar8, fVar9, fVar10, fVar11;
|
||||||
s32 sp38;
|
|
||||||
|
|
||||||
args = script->ptrReadPos;
|
s32 sp30, sp34, sp38, sp3C;
|
||||||
intArgs = script->ptrReadPos;
|
|
||||||
floatArgs = script->ptrReadPos;
|
|
||||||
|
|
||||||
effectID = evt_get_variable(script, *args++); // todo maybe increment later on
|
s32 a2, a6, a7, a8, a9;
|
||||||
|
|
||||||
evt_get_variable(script, *intArgs++);
|
|
||||||
evt_get_variable(script, *floatArgs++);
|
evt_get_variable(script, *floatArgs++);
|
||||||
|
evt_get_variable(script, *args++);
|
||||||
|
|
||||||
new_var = evt_get_variable(script, *intArgs++);
|
new_var = evt_get_variable(script, *intArgs++);
|
||||||
iVar2 = evt_get_variable(script, *intArgs++);
|
iVar2 = evt_get_variable(script, *intArgs++);
|
||||||
@ -207,11 +177,11 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
|
|||||||
evt_get_float_variable(script, *floatArgs++);
|
evt_get_float_variable(script, *floatArgs++);
|
||||||
evt_get_float_variable(script, *floatArgs++);
|
evt_get_float_variable(script, *floatArgs++);
|
||||||
|
|
||||||
args++; // 1
|
args++;
|
||||||
a2 = *args++;
|
a2 = *args++;
|
||||||
args++; // 3
|
args++;
|
||||||
args++; // 4
|
args++;
|
||||||
args++; // 5
|
args++;
|
||||||
a6 = *args++;
|
a6 = *args++;
|
||||||
a7 = *args++;
|
a7 = *args++;
|
||||||
a8 = *args++;
|
a8 = *args++;
|
||||||
@ -219,8 +189,6 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
iVar1 = new_var;
|
iVar1 = new_var;
|
||||||
|
|
||||||
effectRet = NULL;
|
|
||||||
|
|
||||||
switch (effectID) {
|
switch (effectID) {
|
||||||
case 0:
|
case 0:
|
||||||
playFX_3E(0, fVar1, fVar2, fVar3, 3.0f, iVar5);
|
playFX_3E(0, fVar1, fVar2, fVar3, 3.0f, iVar5);
|
||||||
@ -293,8 +261,8 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
|
|||||||
playFX_1A(iVar1, fVar2, fVar3, fVar4, iVar5);
|
playFX_1A(iVar1, fVar2, fVar3, fVar4, iVar5);
|
||||||
break;
|
break;
|
||||||
case 27:
|
case 27:
|
||||||
playFX_1B(iVar1, fVar2, fVar3, fVar4, fVar5, &sp38);
|
playFX_1B(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
|
||||||
evt_set_variable(script, a6, sp38);
|
evt_set_variable(script, a6, sp34);
|
||||||
break;
|
break;
|
||||||
case 28:
|
case 28:
|
||||||
playFX_1C(iVar1, fVar2, fVar3, fVar4, iVar5);
|
playFX_1C(iVar1, fVar2, fVar3, fVar4, iVar5);
|
||||||
@ -341,8 +309,8 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
|
|||||||
playFX_2B(iVar1, fVar2, fVar3, fVar4);
|
playFX_2B(iVar1, fVar2, fVar3, fVar4);
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
playFX_20(iVar1, fVar2, fVar3, fVar4, fVar5, &sp38);
|
playFX_20(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
|
||||||
evt_set_variable(script, a6, sp38);
|
evt_set_variable(script, a6, sp34);
|
||||||
break;
|
break;
|
||||||
case 44:
|
case 44:
|
||||||
playFX_2C(iVar1, fVar2, fVar3, fVar4);
|
playFX_2C(iVar1, fVar2, fVar3, fVar4);
|
||||||
@ -370,12 +338,12 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
|
|||||||
playFX_33(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
playFX_33(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||||
break;
|
break;
|
||||||
case 52:
|
case 52:
|
||||||
playFX_34(iVar1, fVar2, fVar3, fVar4, fVar5, &sp38);
|
playFX_34(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
|
||||||
evt_set_variable(script, a6, sp38);
|
evt_set_variable(script, a6, sp34);
|
||||||
break;
|
break;
|
||||||
case 53:
|
case 53:
|
||||||
playFX_35(iVar1, fVar2, fVar3, fVar4, fVar5, &sp38);
|
playFX_35(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
|
||||||
evt_set_variable(script, a6, sp38);
|
evt_set_variable(script, a6, sp34);
|
||||||
break;
|
break;
|
||||||
case 54:
|
case 54:
|
||||||
effectRet = playFX_36(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6);
|
effectRet = playFX_36(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6);
|
||||||
@ -393,12 +361,12 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
|
|||||||
playFX_3A(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, iVar8);
|
playFX_3A(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, iVar8);
|
||||||
break;
|
break;
|
||||||
case 59:
|
case 59:
|
||||||
playFX_3B(iVar1, fVar2, fVar3, fVar4, fVar5, &sp38);
|
playFX_3B(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
|
||||||
evt_set_variable(script, a6, sp38);
|
evt_set_variable(script, a6, sp34);
|
||||||
break;
|
break;
|
||||||
case 60:
|
case 60:
|
||||||
playFX_3C(iVar1, fVar2, fVar3, fVar4, fVar5, &sp38);
|
playFX_3C(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
|
||||||
evt_set_variable(script, a6, sp38);
|
evt_set_variable(script, a6, sp34);
|
||||||
break;
|
break;
|
||||||
case 61:
|
case 61:
|
||||||
playFX_3D(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, &sp3C);
|
playFX_3D(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, &sp3C);
|
||||||
@ -621,6 +589,3 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
INCLUDE_ASM(ApiStatus, "evt/fx_api", PlayEffect, Evt* script, s32 isInitialCall);
|
|
||||||
#endif
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user