mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
decomp some effect funcs in hos_05 (#873)
This commit is contained in:
parent
2adca590f6
commit
3e0e550eb3
@ -30,6 +30,8 @@ typedef struct UnkHosStruct {
|
||||
/* 0x60 */ char unk_6E[0x2];
|
||||
} UnkHosStruct; // size = 0x60
|
||||
|
||||
extern s32 D_802495DC_A3381C;
|
||||
extern s32 D_802495E0_A33820;
|
||||
extern f32 D_8024963C_A3387C[];
|
||||
extern f32 D_8024987C_A33ABC;
|
||||
extern f32 D_802498A8_A33AE8;
|
||||
@ -196,13 +198,47 @@ ApiStatus func_80240E30_A2B070(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
|
||||
// adjusts properties of EmitterVolume:GoldShimmer2 effect
|
||||
INCLUDE_ASM(s32, "world/area_hos/hos_05/A2AAC0", func_80240E50_A2B090);
|
||||
ApiStatus func_80240E50_A2B090(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
|
||||
s32 subtype = evt_get_variable(script, *args++);
|
||||
s32 posX = evt_get_float_variable(script, *args++);
|
||||
s32 posY = evt_get_float_variable(script, *args++);
|
||||
s32 posZ = evt_get_float_variable(script, *args++);
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_hos/hos_05/A2AAC0", func_80240F30_A2B170);
|
||||
effect->data.miscParticles->pos.x = posX;
|
||||
effect->data.miscParticles->pos.y = posY;
|
||||
effect->data.miscParticles->pos.z = posZ;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_hos/hos_05/A2AAC0", func_80240F88_A2B1C8);
|
||||
ApiStatus func_80240F30_A2B170(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, ArrayVar(0));
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_hos/hos_05/A2AAC0", func_80240FE0_A2B220);
|
||||
effect->data.somethingRotating[D_802495DC_A3381C + 1].unk_29 = 1;
|
||||
D_802495DC_A3381C++;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80240F88_A2B1C8(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, ArrayVar(0));
|
||||
|
||||
effect->data.somethingRotating[D_802495E0_A33820 + 1].unk_29 = 3;
|
||||
D_802495E0_A33820++;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80240FE0_A2B220(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, ArrayVar(16));
|
||||
|
||||
effect->data.lightRays->unk_10 = script->varTable[0];
|
||||
effect->data.lightRays->unk_14 = script->varTable[1];
|
||||
effect->data.lightRays->unk_18 = script->varTable[2];
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
void func_80241044_A2B284(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32* arg4) {
|
||||
f32 temp_f2 = arg1 - arg2;
|
||||
|
@ -1,60 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80240E50_A2B090
|
||||
/* A2B090 80240E50 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* A2B094 80240E54 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* A2B098 80240E58 0080882D */ daddu $s1, $a0, $zero
|
||||
/* A2B09C 80240E5C AFBF0020 */ sw $ra, 0x20($sp)
|
||||
/* A2B0A0 80240E60 AFB3001C */ sw $s3, 0x1c($sp)
|
||||
/* A2B0A4 80240E64 AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* A2B0A8 80240E68 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* A2B0AC 80240E6C 8E30000C */ lw $s0, 0xc($s1)
|
||||
/* A2B0B0 80240E70 8E050000 */ lw $a1, ($s0)
|
||||
/* A2B0B4 80240E74 0C0B1EAF */ jal evt_get_variable
|
||||
/* A2B0B8 80240E78 26100004 */ addiu $s0, $s0, 4
|
||||
/* A2B0BC 80240E7C 8E050000 */ lw $a1, ($s0)
|
||||
/* A2B0C0 80240E80 26100004 */ addiu $s0, $s0, 4
|
||||
/* A2B0C4 80240E84 0220202D */ daddu $a0, $s1, $zero
|
||||
/* A2B0C8 80240E88 0C0B1EAF */ jal evt_get_variable
|
||||
/* A2B0CC 80240E8C 0040902D */ daddu $s2, $v0, $zero
|
||||
/* A2B0D0 80240E90 8E050000 */ lw $a1, ($s0)
|
||||
/* A2B0D4 80240E94 26100004 */ addiu $s0, $s0, 4
|
||||
/* A2B0D8 80240E98 0C0B210B */ jal evt_get_float_variable
|
||||
/* A2B0DC 80240E9C 0220202D */ daddu $a0, $s1, $zero
|
||||
/* A2B0E0 80240EA0 8E050000 */ lw $a1, ($s0)
|
||||
/* A2B0E4 80240EA4 26100004 */ addiu $s0, $s0, 4
|
||||
/* A2B0E8 80240EA8 4600010D */ trunc.w.s $f4, $f0
|
||||
/* A2B0EC 80240EAC 44132000 */ mfc1 $s3, $f4
|
||||
/* A2B0F0 80240EB0 0C0B210B */ jal evt_get_float_variable
|
||||
/* A2B0F4 80240EB4 0220202D */ daddu $a0, $s1, $zero
|
||||
/* A2B0F8 80240EB8 8E050000 */ lw $a1, ($s0)
|
||||
/* A2B0FC 80240EBC 4600010D */ trunc.w.s $f4, $f0
|
||||
/* A2B100 80240EC0 44102000 */ mfc1 $s0, $f4
|
||||
/* A2B104 80240EC4 0C0B210B */ jal evt_get_float_variable
|
||||
/* A2B108 80240EC8 0220202D */ daddu $a0, $s1, $zero
|
||||
/* A2B10C 80240ECC 8E43000C */ lw $v1, 0xc($s2)
|
||||
/* A2B110 80240ED0 44931000 */ mtc1 $s3, $f2
|
||||
/* A2B114 80240ED4 00000000 */ nop
|
||||
/* A2B118 80240ED8 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* A2B11C 80240EDC E4620004 */ swc1 $f2, 4($v1)
|
||||
/* A2B120 80240EE0 8E43000C */ lw $v1, 0xc($s2)
|
||||
/* A2B124 80240EE4 44901000 */ mtc1 $s0, $f2
|
||||
/* A2B128 80240EE8 00000000 */ nop
|
||||
/* A2B12C 80240EEC 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* A2B130 80240EF0 E4620008 */ swc1 $f2, 8($v1)
|
||||
/* A2B134 80240EF4 4600010D */ trunc.w.s $f4, $f0
|
||||
/* A2B138 80240EF8 44032000 */ mfc1 $v1, $f4
|
||||
/* A2B13C 80240EFC 8E44000C */ lw $a0, 0xc($s2)
|
||||
/* A2B140 80240F00 44830000 */ mtc1 $v1, $f0
|
||||
/* A2B144 80240F04 00000000 */ nop
|
||||
/* A2B148 80240F08 46800020 */ cvt.s.w $f0, $f0
|
||||
/* A2B14C 80240F0C E480000C */ swc1 $f0, 0xc($a0)
|
||||
/* A2B150 80240F10 8FBF0020 */ lw $ra, 0x20($sp)
|
||||
/* A2B154 80240F14 8FB3001C */ lw $s3, 0x1c($sp)
|
||||
/* A2B158 80240F18 8FB20018 */ lw $s2, 0x18($sp)
|
||||
/* A2B15C 80240F1C 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* A2B160 80240F20 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* A2B164 80240F24 24020002 */ addiu $v0, $zero, 2
|
||||
/* A2B168 80240F28 03E00008 */ jr $ra
|
||||
/* A2B16C 80240F2C 27BD0028 */ addiu $sp, $sp, 0x28
|
@ -1,26 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80240F30_A2B170
|
||||
/* A2B170 80240F30 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* A2B174 80240F34 3C05F4AC */ lui $a1, 0xf4ac
|
||||
/* A2B178 80240F38 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* A2B17C 80240F3C 0C0B1EAF */ jal evt_get_variable
|
||||
/* A2B180 80240F40 34A5D480 */ ori $a1, $a1, 0xd480
|
||||
/* A2B184 80240F44 3C058025 */ lui $a1, %hi(D_802495DC_A3381C)
|
||||
/* A2B188 80240F48 24A595DC */ addiu $a1, $a1, %lo(D_802495DC_A3381C)
|
||||
/* A2B18C 80240F4C 8CA40000 */ lw $a0, ($a1)
|
||||
/* A2B190 80240F50 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* A2B194 80240F54 00041840 */ sll $v1, $a0, 1
|
||||
/* A2B198 80240F58 00641821 */ addu $v1, $v1, $a0
|
||||
/* A2B19C 80240F5C 00031900 */ sll $v1, $v1, 4
|
||||
/* A2B1A0 80240F60 00621821 */ addu $v1, $v1, $v0
|
||||
/* A2B1A4 80240F64 24020001 */ addiu $v0, $zero, 1
|
||||
/* A2B1A8 80240F68 A0620059 */ sb $v0, 0x59($v1)
|
||||
/* A2B1AC 80240F6C 8CA30000 */ lw $v1, ($a1)
|
||||
/* A2B1B0 80240F70 24630001 */ addiu $v1, $v1, 1
|
||||
/* A2B1B4 80240F74 ACA30000 */ sw $v1, ($a1)
|
||||
/* A2B1B8 80240F78 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* A2B1BC 80240F7C 24020002 */ addiu $v0, $zero, 2
|
||||
/* A2B1C0 80240F80 03E00008 */ jr $ra
|
||||
/* A2B1C4 80240F84 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,26 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80240F88_A2B1C8
|
||||
/* A2B1C8 80240F88 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* A2B1CC 80240F8C 3C05F4AC */ lui $a1, 0xf4ac
|
||||
/* A2B1D0 80240F90 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* A2B1D4 80240F94 0C0B1EAF */ jal evt_get_variable
|
||||
/* A2B1D8 80240F98 34A5D480 */ ori $a1, $a1, 0xd480
|
||||
/* A2B1DC 80240F9C 3C058025 */ lui $a1, %hi(D_802495E0_A33820)
|
||||
/* A2B1E0 80240FA0 24A595E0 */ addiu $a1, $a1, %lo(D_802495E0_A33820)
|
||||
/* A2B1E4 80240FA4 8CA40000 */ lw $a0, ($a1)
|
||||
/* A2B1E8 80240FA8 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* A2B1EC 80240FAC 00041840 */ sll $v1, $a0, 1
|
||||
/* A2B1F0 80240FB0 00641821 */ addu $v1, $v1, $a0
|
||||
/* A2B1F4 80240FB4 00031900 */ sll $v1, $v1, 4
|
||||
/* A2B1F8 80240FB8 00621821 */ addu $v1, $v1, $v0
|
||||
/* A2B1FC 80240FBC 24020003 */ addiu $v0, $zero, 3
|
||||
/* A2B200 80240FC0 A0620059 */ sb $v0, 0x59($v1)
|
||||
/* A2B204 80240FC4 8CA30000 */ lw $v1, ($a1)
|
||||
/* A2B208 80240FC8 24630001 */ addiu $v1, $v1, 1
|
||||
/* A2B20C 80240FCC ACA30000 */ sw $v1, ($a1)
|
||||
/* A2B210 80240FD0 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* A2B214 80240FD4 24020002 */ addiu $v0, $zero, 2
|
||||
/* A2B218 80240FD8 03E00008 */ jr $ra
|
||||
/* A2B21C 80240FDC 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,29 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80240FE0_A2B220
|
||||
/* A2B220 80240FE0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* A2B224 80240FE4 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* A2B228 80240FE8 0080802D */ daddu $s0, $a0, $zero
|
||||
/* A2B22C 80240FEC 3C05F4AC */ lui $a1, 0xf4ac
|
||||
/* A2B230 80240FF0 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* A2B234 80240FF4 0C0B1EAF */ jal evt_get_variable
|
||||
/* A2B238 80240FF8 34A5D490 */ ori $a1, $a1, 0xd490
|
||||
/* A2B23C 80240FFC 0040182D */ daddu $v1, $v0, $zero
|
||||
/* A2B240 80241000 8C64000C */ lw $a0, 0xc($v1)
|
||||
/* A2B244 80241004 C6000084 */ lwc1 $f0, 0x84($s0)
|
||||
/* A2B248 80241008 46800020 */ cvt.s.w $f0, $f0
|
||||
/* A2B24C 8024100C E4800010 */ swc1 $f0, 0x10($a0)
|
||||
/* A2B250 80241010 8C64000C */ lw $a0, 0xc($v1)
|
||||
/* A2B254 80241014 C6000088 */ lwc1 $f0, 0x88($s0)
|
||||
/* A2B258 80241018 46800020 */ cvt.s.w $f0, $f0
|
||||
/* A2B25C 8024101C E4800014 */ swc1 $f0, 0x14($a0)
|
||||
/* A2B260 80241020 8C63000C */ lw $v1, 0xc($v1)
|
||||
/* A2B264 80241024 C600008C */ lwc1 $f0, 0x8c($s0)
|
||||
/* A2B268 80241028 46800020 */ cvt.s.w $f0, $f0
|
||||
/* A2B26C 8024102C E4600018 */ swc1 $f0, 0x18($v1)
|
||||
/* A2B270 80241030 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* A2B274 80241034 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* A2B278 80241038 24020002 */ addiu $v0, $zero, 2
|
||||
/* A2B27C 8024103C 03E00008 */ jr $ra
|
||||
/* A2B280 80241040 27BD0018 */ addiu $sp, $sp, 0x18
|
Loading…
Reference in New Issue
Block a user