text
stringlengths
6.38k
228k
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80032970 /* DD70 80032970 44853000 */ mtc1 $a1, $f6 /* DD74 80032974 94820000 */ lhu $v0, 0x0($a0) /* DD78 80032978 8C830448 */ lw $v1, 0x448($a0) /* DD7C 8003297C 30421000 */ andi $v0, $v0, 0x1000 /* DD80 80032980 10600005 */ beqz $v1, .L80032998 /* DD84 80032984 0002302B */ sltu $a2, $zero, $v0 /* DD88 80032988 8C630000 */ lw $v1, 0x0($v1) /* DD8C 8003298C 24020004 */ addiu $v0, $zero, 0x4 /* DD90 80032990 50620001 */ beql $v1, $v0, .L80032998 /* DD94 80032994 24060001 */ addiu $a2, $zero, 0x1 .L80032998: /* DD98 80032998 10C00008 */ beqz $a2, .L800329BC /* DD9C 8003299C 24020001 */ addiu $v0, $zero, 0x1 /* DDA0 800329A0 44804000 */ mtc1 $zero, $f8 /* DDA4 800329A4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* DDA8 800329A8 44810000 */ mtc1 $at, $f0 /* DDAC 800329AC AC82051C */ sw $v0, 0x51C($a0) /* DDB0 800329B0 E4800514 */ swc1 $f0, 0x514($a0) /* DDB4 800329B4 0800CA8D */ j .L80032A34 /* DDB8 800329B8 E4880510 */ swc1 $f8, 0x510($a0) .L800329BC: /* DDBC 800329BC 3C05800F */ lui $a1, %hi(gPlayerStatusPtr) /* DDC0 800329C0 8CA57B30 */ lw $a1, %lo(gPlayerStatusPtr)($a1) /* DDC4 800329C4 8CA20004 */ lw $v0, 0x4($a1) /* DDC8 800329C8 3C030040 */ lui $v1, (0x400000 >> 16) /* DDCC 800329CC 00431024 */ and $v0, $v0, $v1 /* DDD0 800329D0 10400007 */ beqz $v0, .L800329F0 /* DDD4 800329D4 00000000 */ nop /* DDD8 800329D8 3C028011 */ lui $v0, %hi(gPartnerStatus + 0x4) /* DDDC 800329DC 8442EBB4 */ lh $v0, %lo(gPartnerStatus + 0x4)($v0) /* DDE0 800329E0 44824000 */ mtc1 $v0, $f8 /* DDE4 800329E4 00000000 */ nop /* DDE8 800329E8 0800CA7E */ j .L800329F8 /* DDEC 800329EC 46804220 */ cvt.s.w $f8, $f8 .L800329F0: /* DDF0 800329F0 C4A800E8 */ lwc1 $f8, 0xE8($a1) /* DDF4 800329F4 46804220 */ cvt.s.w $f8, $f8 .L800329F8: /* DDF8 800329F8 44800000 */ mtc1 $zero, $f0 /* DDFC 800329FC 00000000 */ nop /* DE00 80032A00 4608003C */ c.lt.s $f0, $f8 /* DE04 80032A04 00000000 */ nop /* DE08 80032A08 45000004 */ bc1f .L80032A1C /* DE0C 80032A0C 00000000 */ nop /* DE10 80032A10 3C014248 */ lui $at, (0x42480000 >> 16) /* DE14 80032A14 44814000 */ mtc1 $at, $f8 /* DE18 80032A18 00000000 */ nop .L80032A1C: /* DE1C 80032A1C 4600403C */ c.lt.s $f8, $f0 /* DE20 80032A20 00000000 */ nop /* DE24 80032A24 45000003 */ bc1f .L80032A34 /* DE28 80032A28 00000000 */ nop /* DE2C 80032A2C 3C01C248 */ lui $at, (0xC2480000 >> 16) /* DE30 80032A30 44814000 */ mtc1 $at, $f8 .L80032A34: /* DE34 80032A34 44801000 */ mtc1 $zero, $f2 /* DE38 80032A38 00000000 */ nop /* DE3C 80032A3C 46024032 */ c.eq.s $f8, $f2 /* DE40 80032A40 00000000 */ nop /* DE44 80032A44 4501003A */ bc1t .L80032B30 /* DE48 80032A48 00000000 */ nop /* DE4C 80032A4C 4602403C */ c.lt.s $f8, $f2 /* DE50 80032A50 00000000 */ nop /* DE54 80032A54 4500001C */ bc1f .L80032AC8 /* DE58 80032A58 00000000 */ nop /* DE5C 80032A5C C4800518 */ lwc1 $f0, 0x518($a0) /* DE60 80032A60 4600103C */ c.lt.s $f2, $f0 /* DE64 80032A64 00000000 */ nop /* DE68 80032A68 45020003 */ bc1fl .L80032A78 /* DE6C 80032A6C 46080000 */ add.s $f0, $f0, $f8 /* DE70 80032A70 0800CA9F */ j .L80032A7C /* DE74 80032A74 E4880518 */ swc1 $f8, 0x518($a0) .L80032A78: /* DE78 80032A78 E4800518 */ swc1 $f0, 0x518($a0) .L80032A7C: /* DE7C 80032A7C C4800518 */ lwc1 $f0, 0x518($a0) /* DE80 80032A80 3C01C396 */ lui $at, (0xC3960000 >> 16) /* DE84 80032A84 44812000 */ mtc1 $at, $f4 /* DE88 80032A88 00000000 */ nop /* DE8C 80032A8C 4604003E */ c.le.s $f0, $f4 /* DE90 80032A90 00000000 */ nop /* DE94 80032A94 45000026 */ bc1f .L80032B30 /* DE98 80032A98 24020001 */ addiu $v0, $zero, 0x1 /* DE9C 80032A9C C4800510 */ lwc1 $f0, 0x510($a0) /* DEA0 80032AA0 44801000 */ mtc1 $zero, $f2 /* DEA4 80032AA4 00000000 */ nop /* DEA8 80032AA8 4600103C */ c.lt.s $f2, $f0 /* DEAC 80032AAC 00000000 */ nop /* DEB0 80032AB0 45000002 */ bc1f .L80032ABC /* DEB4 80032AB4 AC82051C */ sw $v0, 0x51C($a0) /* DEB8 80032AB8 E4820514 */ swc1 $f2, 0x514($a0) .L80032ABC: /* DEBC 80032ABC 46003007 */ neg.s $f0, $f6 /* DEC0 80032AC0 0800CACB */ j .L80032B2C /* DEC4 80032AC4 E4800510 */ swc1 $f0, 0x510($a0) .L80032AC8: /* DEC8 80032AC8 C4800518 */ lwc1 $f0, 0x518($a0) /* DECC 80032ACC 4602003C */ c.lt.s $f0, $f2 /* DED0 80032AD0 00000000 */ nop /* DED4 80032AD4 45020003 */ bc1fl .L80032AE4 /* DED8 80032AD8 46080000 */ add.s $f0, $f0, $f8 /* DEDC 80032ADC 0800CABA */ j .L80032AE8 /* DEE0 80032AE0 E4880518 */ swc1 $f8, 0x518($a0) .L80032AE4: /* DEE4 80032AE4 E4800518 */ swc1 $f0, 0x518($a0) .L80032AE8: /* DEE8 80032AE8 C4800518 */ lwc1 $f0, 0x518($a0) /* DEEC 80032AEC 3C014396 */ lui $at, (0x43960000 >> 16) /* DEF0 80032AF0 44812000 */ mtc1 $at, $f4 /* DEF4 80032AF4 00000000 */ nop /* DEF8 80032AF8 4600203E */ c.le.s $f4, $f0 /* DEFC 80032AFC 00000000 */ nop /* DF00 80032B00 4500000B */ bc1f .L80032B30 /* DF04 80032B04 24020001 */ addiu $v0, $zero, 0x1 /* DF08 80032B08 C4800510 */ lwc1 $f0, 0x510($a0) /* DF0C 80032B0C 44801000 */ mtc1 $zero, $f2 /* DF10 80032B10 00000000 */ nop /* DF14 80032B14 4602003C */ c.lt.s $f0, $f2 /* DF18 80032B18 00000000 */ nop /* DF1C 80032B1C 45000002 */ bc1f .L80032B28 /* DF20 80032B20 AC82051C */ sw $v0, 0x51C($a0) /* DF24 80032B24 E4820514 */ swc1 $f2, 0x514($a0) .L80032B28: /* DF28 80032B28 E4860510 */ swc1 $f6, 0x510($a0) .L80032B2C: /* DF2C 80032B2C E4840518 */ swc1 $f4, 0x518($a0) .L80032B30: /* DF30 80032B30 8C82051C */ lw $v0, 0x51C($a0) /* DF34 80032B34 1040000F */ beqz $v0, .L80032B74 /* DF38 80032B38 00000000 */ nop /* DF3C 80032B3C C4800514 */ lwc1 $f0, 0x514($a0) /* DF40 80032B40 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* DF44 80032B44 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* DF48 80032B48 44811000 */ mtc1 $at, $f2 /* DF4C 80032B4C 00000000 */ nop /* DF50 80032B50 46020000 */ add.s $f0, $f0, $f2 /* DF54 80032B54 3C013F80 */ lui $at, (0x3F800000 >> 16) /* DF58 80032B58 44811000 */ mtc1 $at, $f2 /* DF5C 80032B5C 00000000 */ nop /* DF60 80032B60 4600103C */ c.lt.s $f2, $f0 /* DF64 80032B64 00000000 */ nop /* DF68 80032B68 45000002 */ bc1f .L80032B74 /* DF6C 80032B6C E4800514 */ swc1 $f0, 0x514($a0) /* DF70 80032B70 E4820514 */ swc1 $f2, 0x514($a0) .L80032B74: /* DF74 80032B74 C4800510 */ lwc1 $f0, 0x510($a0) /* DF78 80032B78 C482050C */ lwc1 $f2, 0x50C($a0) /* DF7C 80032B7C 46020001 */ sub.s $f0, $f0, $f2 /* DF80 80032B80 44805000 */ mtc1 $zero, $f10 /* DF84 80032B84 00000000 */ nop /* DF88 80032B88 460A0032 */ c.eq.s $f0, $f10 /* DF8C 80032B8C 00000000 */ nop /* DF90 80032B90 45000003 */ bc1f .L80032BA0 /* DF94 80032B94 00000000 */ nop /* DF98 80032B98 E48A0514 */ swc1 $f10, 0x514($a0) /* DF9C 80032B9C AC80051C */ sw $zero, 0x51C($a0) .L80032BA0: /* DFA0 80032BA0 C4800510 */ lwc1 $f0, 0x510($a0) /* DFA4 80032BA4 C482050C */ lwc1 $f2, 0x50C($a0) /* DFA8 80032BA8 46020101 */ sub.s $f4, $f0, $f2 /* DFAC 80032BAC C4800514 */ lwc1 $f0, 0x514($a0) /* DFB0 80032BB0 46002182 */ mul.s $f6, $f4, $f0 /* DFB4 80032BB4 00000000 */ nop /* DFB8 80032BB8 4604503C */ c.lt.s $f10, $f4 /* DFBC 80032BBC 00000000 */ nop /* DFC0 80032BC0 4500000D */ bc1f .L80032BF8 /* DFC4 80032BC4 46002021 */ cvt.d.s $f0, $f4 /* DFC8 80032BC8 3C01800A */ lui $at, %hi(D_80098280) /* DFCC 80032BCC D4228280 */ ldc1 $f2, %lo(D_80098280)($at) /* DFD0 80032BD0 4622003C */ c.lt.d $f0, $f2 /* DFD4 80032BD4 00000000 */ nop /* DFD8 80032BD8 45030001 */ bc1tl .L80032BE0 /* DFDC 80032BDC 46002186 */ mov.s $f6, $f4 .L80032BE0: /* DFE0 80032BE0 3C014040 */ lui $at, (0x40400000 >> 16) /* DFE4 80032BE4 44810000 */ mtc1 $at, $f0 /* DFE8 80032BE8 00000000 */ nop /* DFEC 80032BEC 4606003C */ c.lt.s $f0, $f6 /* DFF0 80032BF0 0800CB09 */ j .L80032C24 /* DFF4 80032BF4 00000000 */ nop .L80032BF8: /* DFF8 80032BF8 3C01800A */ lui $at, %hi(D_80098288) /* DFFC 80032BFC D4228288 */ ldc1 $f2, %lo(D_80098288)($at) /* E000 80032C00 4620103C */ c.lt.d $f2, $f0 /* E004 80032C04 00000000 */ nop /* E008 80032C08 45030001 */ bc1tl .L80032C10 /* E00C 80032C0C 46002186 */ mov.s $f6, $f4 .L80032C10: /* E010 80032C10 3C01C040 */ lui $at, (0xC0400000 >> 16) /* E014 80032C14 44810000 */ mtc1 $at, $f0 /* E018 80032C18 00000000 */ nop /* E01C 80032C1C 4600303C */ c.lt.s $f6, $f0 /* E020 80032C20 00000000 */ nop .L80032C24: /* E024 80032C24 45030001 */ bc1tl .L80032C2C /* E028 80032C28 46000186 */ mov.s $f6, $f0 .L80032C2C: /* E02C 80032C2C 44800000 */ mtc1 $zero, $f0 /* E030 80032C30 00000000 */ nop /* E034 80032C34 46004032 */ c.eq.s $f8, $f0 /* E038 80032C38 00000000 */ nop /* E03C 80032C3C 45000003 */ bc1f .L80032C4C /* E040 80032C40 00000000 */ nop /* E044 80032C44 10C00005 */ beqz $a2, .L80032C5C /* E048 80032C48 00000000 */ nop .L80032C4C: /* E04C 80032C4C C480050C */ lwc1 $f0, 0x50C($a0) /* E050 80032C50 46060000 */ add.s $f0, $f0, $f6 /* E054 80032C54 03E00008 */ jr $ra /* E058 80032C58 E480050C */ swc1 $f0, 0x50C($a0) .L80032C5C: /* E05C 80032C5C 03E00008 */ jr $ra /* E060 80032C60 E4800514 */ swc1 $f0, 0x514($a0) ### DECOMPILED C INSTRUCTIONS: void func_80032970(Camera* camera, f32 arg1) { f32 stickX; f32 deltaLeadAmount; s32 flags = camera->flags & CAMERA_FLAG_1000; s32 a2 = flags != 0; if (camera->currentController != NULL && camera->currentController->type == CAM_CONTROL_FIXED_POS_AND_ORIENTATION) { a2 = TRUE; } if (a2) { stickX = 0.0f; camera->unk_51C = TRUE; camera->unk_514 = 1.0f; camera->unk_510 = 0.0f; } else { if (gPlayerStatusPtr->animFlags & PA_FLAG_RIDING_PARTNER) { stickX = gPartnerStatus.stickX; } else { stickX = gPlayerStatusPtr->stickAxis[0]; } if (stickX > 0.0f) { stickX = 50.0f; } if (stickX < 0.0f) { stickX = -50.0f; } } if (stickX != 0.0f) { if (stickX < 0.0f) { if (camera->unk_518 > 0.0f) { camera->unk_518 = stickX; } else { camera->unk_518 += stickX; } if (camera->unk_518 <= -300.0f) { camera->unk_51C = TRUE; if (camera->unk_510 > 0.0f) { camera->unk_514 = 0.0f; } camera->unk_510 = -arg1; camera->unk_518 = -300.0f; } } else { if (camera->unk_518 < 0.0f) { camera->unk_518 = stickX; } else { camera->unk_518 += stickX; } if (camera->unk_518 >= 300.0f) { camera->unk_51C = TRUE; if (camera->unk_510 < 0.0f) { camera->unk_514 = 0.0f; } camera->unk_510 = arg1; camera->unk_518 = 300.0f; } } } if (camera->unk_51C) { camera->unk_514 += 0.01f; if (camera->unk_514 > 1.0f) { camera->unk_514 = 1.0f; } } if (camera->unk_510 - camera->leadAmount == 0.0f) { camera->unk_514 = 0.0f; camera->unk_51C = FALSE; } deltaLeadAmount = (camera->unk_510 - camera->leadAmount) * camera->unk_514; if (camera->unk_510 - camera->leadAmount > 0.0f) { if (camera->unk_510 - camera->leadAmount < 0.1) { deltaLeadAmount = camera->unk_510 - camera->leadAmount; } if (deltaLeadAmount > 3.0f) { deltaLeadAmount = 3.0f; } } else { if (camera->unk_510 - camera->leadAmount > -0.1) { deltaLeadAmount = camera->unk_510 - camera->leadAmount; } if (deltaLeadAmount < -3.0f) { deltaLeadAmount = -3.0f; } } if (stickX != 0.0f || a2) { camera->leadAmount += deltaLeadAmount; } else { camera->unk_514 = 0.0f; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel appendGfx_ispy_icon /* E225B0 802B7000 3C028011 */ lui $v0, %hi(gPlayerStatus + 0x4) /* E225B4 802B7004 8C42EFCC */ lw $v0, %lo(gPlayerStatus + 0x4)($v0) /* E225B8 802B7008 27BDFF30 */ addiu $sp, $sp, -0xD0 /* E225BC 802B700C AFBF00C8 */ sw $ra, 0xC8($sp) /* E225C0 802B7010 AFB300C4 */ sw $s3, 0xC4($sp) /* E225C4 802B7014 AFB200C0 */ sw $s2, 0xC0($sp) /* E225C8 802B7018 AFB100BC */ sw $s1, 0xBC($sp) /* E225CC 802B701C 30420100 */ andi $v0, $v0, 0x100 /* E225D0 802B7020 104000A0 */ beqz $v0, .L802B72A4 /* E225D4 802B7024 AFB000B8 */ sw $s0, 0xB8($sp) /* E225D8 802B7028 3C13802B */ lui $s3, %hi(ISpyPtr) /* E225DC 802B702C 26737C78 */ addiu $s3, $s3, %lo(ISpyPtr) /* E225E0 802B7030 8E620000 */ lw $v0, 0x0($s3) /* E225E4 802B7034 27A40020 */ addiu $a0, $sp, 0x20 /* E225E8 802B7038 8C45000C */ lw $a1, 0xC($v0) .L802B703C: /* E225EC 802B703C 3C120001 */ lui $s2, (0x11630 >> 16) /* E225F0 802B7040 00A0302D */ daddu $a2, $a1, $zero .L802B7044: /* E225F4 802B7044 0C019DF0 */ jal guScaleF /* E225F8 802B7048 00A0382D */ daddu $a3, $a1, $zero glabel should_continue_pulse_stone /* E225FC 802B704C 27B00060 */ addiu $s0, $sp, 0x60 /* E22600 802B7050 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* E22604 802B7054 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* E22608 802B7058 44800000 */ mtc1 $zero, $f0 /* E2260C 802B705C 00031080 */ sll $v0, $v1, 2 /* E22610 802B7060 00431021 */ addu $v0, $v0, $v1 /* E22614 802B7064 00021080 */ sll $v0, $v0, 2 /* E22618 802B7068 00431023 */ subu $v0, $v0, $v1 .L802B706C: /* E2261C 802B706C 000218C0 */ sll $v1, $v0, 3 /* E22620 802B7070 00431021 */ addu $v0, $v0, $v1 /* E22624 802B7074 000210C0 */ sll $v0, $v0, 3 /* E22628 802B7078 44060000 */ mfc1 $a2, $f0 /* E2262C 802B707C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* E22630 802B7080 00220821 */ addu $at, $at, $v0 /* E22634 802B7084 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* E22638 802B7088 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* E2263C 802B708C 46000007 */ neg.s $f0, $f0 /* E22640 802B7090 44050000 */ mfc1 $a1, $f0 /* E22644 802B7094 0200202D */ daddu $a0, $s0, $zero /* E22648 802B7098 0C019EC8 */ jal guRotateF .L802B709C: /* E2264C 802B709C AFA60010 */ sw $a2, 0x10($sp) /* E22650 802B70A0 27A40020 */ addiu $a0, $sp, 0x20 /* E22654 802B70A4 0200282D */ daddu $a1, $s0, $zero /* E22658 802B70A8 0C019D80 */ jal guMtxCatF .L802B70AC: /* E2265C 802B70AC 0080302D */ daddu $a2, $a0, $zero /* E22660 802B70B0 8E620000 */ lw $v0, 0x0($s3) glabel interact_speech_setup /* E22664 802B70B4 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* E22668 802B70B8 8C450000 */ lw $a1, 0x0($v0) /* E2266C 802B70BC 8C460004 */ lw $a2, 0x4($v0) /* E22670 802B70C0 8C470008 */ lw $a3, 0x8($v0) /* E22674 802B70C4 0C019E40 */ jal guTranslateF /* E22678 802B70C8 0200202D */ daddu $a0, $s0, $zero /* E2267C 802B70CC 27A40020 */ addiu $a0, $sp, 0x20 /* E22680 802B70D0 0200282D */ daddu $a1, $s0, $zero /* E22684 802B70D4 0C019D80 */ jal guMtxCatF /* E22688 802B70D8 0200302D */ daddu $a2, $s0, $zero /* E2268C 802B70DC 0200202D */ daddu $a0, $s0, $zero /* E22690 802B70E0 3C108007 */ lui $s0, %hi(gMatrixListPos) /* E22694 802B70E4 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* E22698 802B70E8 3C11800A */ lui $s1, %hi(gDisplayContext) /* E2269C 802B70EC 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* E226A0 802B70F0 96050000 */ lhu $a1, 0x0($s0) /* E226A4 802B70F4 8E220000 */ lw $v0, 0x0($s1) /* E226A8 802B70F8 00052980 */ sll $a1, $a1, 6 /* E226AC 802B70FC 00B22821 */ addu $a1, $a1, $s2 /* E226B0 802B7100 0C019D40 */ jal guMtxF2L .L802B7104: /* E226B4 802B7104 00452821 */ addu $a1, $v0, $a1 /* E226B8 802B7108 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* E226BC 802B710C 3C05800A */ lui $a1, %hi(gMainGfxPos) /* E226C0 802B7110 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* E226C4 802B7114 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* E226C8 802B7118 8CA40000 */ lw $a0, 0x0($a1) /* E226CC 802B711C 96020000 */ lhu $v0, 0x0($s0) /* E226D0 802B7120 0080302D */ daddu $a2, $a0, $zero /* E226D4 802B7124 24840008 */ addiu $a0, $a0, 0x8 /* E226D8 802B7128 ACA40000 */ sw $a0, 0x0($a1) /* E226DC 802B712C ACC30000 */ sw $v1, 0x0($a2) .L802B7130: /* E226E0 802B7130 24430001 */ addiu $v1, $v0, 0x1 /* E226E4 802B7134 3042FFFF */ andi $v0, $v0, 0xFFFF /* E226E8 802B7138 00021180 */ sll $v0, $v0, 6 /* E226EC 802B713C A6030000 */ sh $v1, 0x0($s0) pulse_stone_notification_setup: /* E226F0 802B7140 8E230000 */ lw $v1, 0x0($s1) .L802B7144: /* E226F4 802B7144 00521021 */ addu $v0, $v0, $s2 /* E226F8 802B7148 00621821 */ addu $v1, $v1, $v0 /* E226FC 802B714C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* E22700 802B7150 ACC30004 */ sw $v1, 0x4($a2) /* E22704 802B7154 AC820000 */ sw $v0, 0x0($a0) /* E22708 802B7158 8E630000 */ lw $v1, 0x0($s3) /* E2270C 802B715C 3C02802B */ lui $v0, %hi(ispy_icon_gfx) /* E22710 802B7160 24427C00 */ addiu $v0, $v0, %lo(ispy_icon_gfx) /* E22714 802B7164 AC820004 */ sw $v0, 0x4($a0) /* E22718 802B7168 8C620018 */ lw $v0, 0x18($v1) /* E2271C 802B716C 24840008 */ addiu $a0, $a0, 0x8 /* E22720 802B7170 2842002F */ slti $v0, $v0, 0x2F /* E22724 802B7174 10400004 */ beqz $v0, .L802B7188 /* E22728 802B7178 ACA40000 */ sw $a0, 0x0($a1) /* E2272C 802B717C 8C620020 */ lw $v0, 0x20($v1) /* E22730 802B7180 24420001 */ addiu $v0, $v0, 0x1 /* E22734 802B7184 AC620020 */ sw $v0, 0x20($v1) .L802B7188: /* E22738 802B7188 8E620000 */ lw $v0, 0x0($s3) /* E2273C 802B718C 3C032AAA */ lui $v1, (0x2AAAAAAB >> 16) /* E22740 802B7190 8C440020 */ lw $a0, 0x20($v0) /* E22744 802B7194 3463AAAB */ ori $v1, $v1, (0x2AAAAAAB & 0xFFFF) /* E22748 802B7198 00830018 */ mult $a0, $v1 /* E2274C 802B719C 000417C3 */ sra $v0, $a0, 31 /* E22750 802B71A0 00004010 */ mfhi $t0 /* E22754 802B71A4 00081843 */ sra $v1, $t0, 1 /* E22758 802B71A8 00621823 */ subu $v1, $v1, $v0 /* E2275C 802B71AC 00031040 */ sll $v0, $v1, 1 /* E22760 802B71B0 00431021 */ addu $v0, $v0, $v1 /* E22764 802B71B4 00021080 */ sll $v0, $v0, 2 /* E22768 802B71B8 00822023 */ subu $a0, $a0, $v0 /* E2276C 802B71BC 2C82000C */ sltiu $v0, $a0, 0xC /* E22770 802B71C0 10400011 */ beqz $v0, .L802B7208 /* E22774 802B71C4 00041080 */ sll $v0, $a0, 2 glabel appendGfx_speech_bubble /* E22778 802B71C8 3C01802B */ lui $at, %hi(D_802B7C80) /* E2277C 802B71CC 00220821 */ addu $at, $at, $v0 /* E22780 802B71D0 8C227C80 */ lw $v0, %lo(D_802B7C80)($at) glabel appendGfx_pulse_stone_icon /* E22784 802B71D4 00400008 */ jr $v0 /* E22788 802B71D8 00000000 */ nop /* E2278C 802B71DC 3C02802B */ lui $v0, %hi(ispy_icon_1_pal) /* E22790 802B71E0 24427BA0 */ addiu $v0, $v0, %lo(ispy_icon_1_pal) /* E22794 802B71E4 080ADC82 */ j .L802B7208 glabel appendGfx_interact_prompt /* E22798 802B71E8 AFA200A4 */ sw $v0, 0xA4($sp) /* E2279C 802B71EC 3C02802B */ lui $v0, %hi(ispy_icon_2_pal) /* E227A0 802B71F0 24427BC0 */ addiu $v0, $v0, %lo(ispy_icon_2_pal) /* E227A4 802B71F4 080ADC82 */ j .L802B7208 /* E227A8 802B71F8 AFA200A4 */ sw $v0, 0xA4($sp) /* E227AC 802B71FC 3C02802B */ lui $v0, %hi(ispy_icon_3_pal) /* E227B0 802B7200 24427BE0 */ addiu $v0, $v0, %lo(ispy_icon_3_pal) /* E227B4 802B7204 AFA200A4 */ sw $v0, 0xA4($sp) .L802B7208: /* E227B8 802B7208 0000202D */ daddu $a0, $zero, $zero /* E227BC 802B720C 24050007 */ addiu $a1, $zero, 0x7 /* E227C0 802B7210 240600FF */ addiu $a2, $zero, 0xFF /* E227C4 802B7214 3C02802B */ lui $v0, %hi(ISpyPtr) /* E227C8 802B7218 8C427C78 */ lw $v0, %lo(ISpyPtr)($v0) /* E227CC 802B721C 00C0802D */ daddu $s0, $a2, $zero /* E227D0 802B7220 AFB00010 */ sw $s0, 0x10($sp) /* E227D4 802B7224 8C420028 */ lw $v0, 0x28($v0) /* E227D8 802B7228 00C0382D */ daddu $a3, $a2, $zero /* E227DC 802B722C AFA00018 */ sw $zero, 0x18($sp) /* E227E0 802B7230 0C04EAA7 */ jal imgfx_update /* E227E4 802B7234 AFA20014 */ sw $v0, 0x14($sp) /* E227E8 802B7238 0000202D */ daddu $a0, $zero, $zero /* E227EC 802B723C 27A500A0 */ addiu $a1, $sp, 0xA0 /* E227F0 802B7240 0080302D */ daddu $a2, $a0, $zero /* E227F4 802B7244 27A70060 */ addiu $a3, $sp, 0x60 /* E227F8 802B7248 3C02802B */ lui $v0, %hi(ispy_icon_img) /* E227FC 802B724C 24427580 */ addiu $v0, $v0, %lo(ispy_icon_img) /* E22800 802B7250 AFA200A0 */ sw $v0, 0xA0($sp) /* E22804 802B7254 24020038 */ addiu $v0, $zero, 0x38 /* E22808 802B7258 A7A200A8 */ sh $v0, 0xA8($sp) /* E2280C 802B725C A7A200AA */ sh $v0, 0xAA($sp) /* E22810 802B7260 2402FFE4 */ addiu $v0, $zero, -0x1C /* E22814 802B7264 A7A200AC */ sh $v0, 0xAC($sp) /* E22818 802B7268 2402002E */ addiu $v0, $zero, 0x2E /* E2281C 802B726C A7A200AE */ sh $v0, 0xAE($sp) /* E22820 802B7270 0C04EBDC */ jal imgfx_appendGfx_component /* E22824 802B7274 A3B000B0 */ sb $s0, 0xB0($sp) /* E22828 802B7278 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* E2282C 802B727C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* E22830 802B7280 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* E22834 802B7284 8C620000 */ lw $v0, 0x0($v1) /* E22838 802B7288 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* E2283C 802B728C 0040202D */ daddu $a0, $v0, $zero /* E22840 802B7290 24420008 */ addiu $v0, $v0, 0x8 /* E22844 802B7294 AC620000 */ sw $v0, 0x0($v1) /* E22848 802B7298 24020040 */ addiu $v0, $zero, 0x40 /* E2284C 802B729C AC850000 */ sw $a1, 0x0($a0) /* E22850 802B72A0 AC820004 */ sw $v0, 0x4($a0) .L802B72A4: /* E22854 802B72A4 8FBF00C8 */ lw $ra, 0xC8($sp) /* E22858 802B72A8 8FB300C4 */ lw $s3, 0xC4($sp) /* E2285C 802B72AC 8FB200C0 */ lw $s2, 0xC0($sp) /* E22860 802B72B0 8FB100BC */ lw $s1, 0xBC($sp) /* E22864 802B72B4 8FB000B8 */ lw $s0, 0xB8($sp) /* E22868 802B72B8 03E00008 */ jr $ra /* E2286C 802B72BC 27BD00D0 */ addiu $sp, $sp, 0xD0 ### DECOMPILED C INSTRUCTIONS: void appendGfx_ispy_icon(void) { Matrix4f matrix1; Matrix4f matrix2; ImgFXTexture ifxImg; s32 flashPhase; if (gPlayerStatus.animFlags & PA_FLAG_ISPY_VISIBLE) { guScaleF(matrix1, ISpyPtr->scale, ISpyPtr->scale, ISpyPtr->scale); guRotateF(matrix2, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); guMtxCatF(matrix1, matrix2, matrix1); guTranslateF(matrix2, ISpyPtr->pos.x, ISpyPtr->pos.y, ISpyPtr->pos.z); guMtxCatF(matrix1, matrix2, matrix2); guMtxF2L(matrix2, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], 3); gSPDisplayList(gMainGfxPos++, ispy_icon_gfx); if (ISpyPtr->time < 47) { ISpyPtr->flashCount++; } flashPhase = ISpyPtr->flashCount; flashPhase = flashPhase % 12; switch (flashPhase) { case 0: case 1: case 2: case 3: ifxImg.palette = ispy_icon_1_pal; break; case 4: case 5: case 6: case 7: ifxImg.palette = ispy_icon_2_pal; break; case 8: case 9: case 10: case 11: ifxImg.palette = ispy_icon_3_pal; break; } imgfx_update(0, IMGFX_SET_ALPHA, 255, 255, 255, ISpyPtr->alpha, 0); ifxImg.raster = ispy_icon_img; ifxImg.width = ispy_icon_img_width; ifxImg.height = ispy_icon_img_height; ifxImg.xOffset = -28; ifxImg.yOffset = 46; ifxImg.alpha = 255; imgfx_appendGfx_component(0, &ifxImg, 0, matrix2); gSPPopMatrix(gMainGfxPos++, 0); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel D_80242F68 /* 1637C8 80242F68 3C0A8025 */ lui $t2, %hi(D_80249B94) glabel func_80242F6C /* 1637CC 80242F6C 254A9B94 */ addiu $t2, $t2, %lo(D_80249B94) glabel func_80242F70 /* 1637D0 80242F70 3C058025 */ lui $a1, %hi(D_80249BA0) glabel func_80242F74 /* 1637D4 80242F74 8CA59BA0 */ lw $a1, %lo(D_80249BA0)($a1) .L80242F78: /* 1637D8 80242F78 8D430000 */ lw $v1, 0x0($t2) glabel func_80242F7C /* 1637DC 80242F7C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) .L80242F80: /* 1637E0 80242F80 44812800 */ mtc1 $at, $f5 .L80242F84: /* 1637E4 80242F84 44802000 */ mtc1 $zero, $f4 D_80242F88: /* 1637E8 80242F88 00A31023 */ subu $v0, $a1, $v1 .L80242F8C: /* 1637EC 80242F8C 44821000 */ mtc1 $v0, $f2 D_80242F90: /* 1637F0 80242F90 00000000 */ nop glabel func_80242F94 /* 1637F4 80242F94 468010A1 */ cvt.d.w $f2, $f2 glabel func_80242F98 /* 1637F8 80242F98 46241082 */ mul.d $f2, $f2, $f4 glabel dead_kzn_17_UnkFunc49 /* 1637FC 80242F9C 00000000 */ nop glabel func_80242FA0 /* 163800 80242FA0 3C098025 */ lui $t1, %hi(D_80249B98) glabel func_80242FA4 /* 163804 80242FA4 25299B98 */ addiu $t1, $t1, %lo(D_80249B98) .L80242FA8: /* 163808 80242FA8 3C048025 */ lui $a0, %hi(D_80249BA4) glabel func_80242FAC /* 16380C 80242FAC 8C849BA4 */ lw $a0, %lo(D_80249BA4)($a0) D_80242FB0: /* 163810 80242FB0 8D260000 */ lw $a2, 0x0($t1) D_80242FB4: /* 163814 80242FB4 00861023 */ subu $v0, $a0, $a2 glabel func_80242FB8 /* 163818 80242FB8 44820000 */ mtc1 $v0, $f0 glabel func_80242FBC /* 16381C 80242FBC 00000000 */ nop .L80242FC0: /* 163820 80242FC0 46800021 */ cvt.d.w $f0, $f0 .L80242FC4: /* 163824 80242FC4 46240002 */ mul.d $f0, $f0, $f4 glabel func_80242FC8 /* 163828 80242FC8 00000000 */ nop D_80242FCC: /* 16382C 80242FCC 4620118D */ trunc.w.d $f6, $f2 D_80242FD0: /* 163830 80242FD0 44073000 */ mfc1 $a3, $f6 glabel func_80242FD4 /* 163834 80242FD4 4620018D */ trunc.w.d $f6, $f0 glabel func_80242FD8 /* 163838 80242FD8 44083000 */ mfc1 $t0, $f6 glabel func_80242FDC /* 16383C 80242FDC 14A30003 */ bne $a1, $v1, .L80242FEC D_80242FE0: /* 163840 80242FE0 00000000 */ nop glabel func_80242FE4 /* 163844 80242FE4 10860007 */ beq $a0, $a2, func_80243004 D_80242FE8: /* 163848 80242FE8 00000000 */ nop .L80242FEC: /* 16384C 80242FEC 14E00005 */ bnez $a3, func_80243004 D_80242FF0: /* 163850 80242FF0 00000000 */ nop glabel func_80242FF4 /* 163854 80242FF4 15000003 */ bnez $t0, func_80243004 D_80242FF8: /* 163858 80242FF8 00000000 */ nop .L80242FFC: /* 16385C 80242FFC AD450000 */ sw $a1, 0x0($t2) glabel func_80243000 /* 163860 80243000 AD240000 */ sw $a0, 0x0($t1) glabel func_80243004 /* 163864 80243004 3C038025 */ lui $v1, %hi(D_80249B94) D_80243008: /* 163868 80243008 24639B94 */ addiu $v1, $v1, %lo(D_80249B94) D_8024300C: /* 16386C 8024300C 8C620000 */ lw $v0, 0x0($v1) D_80243010: /* 163870 80243010 00471021 */ addu $v0, $v0, $a3 glabel func_80243014 /* 163874 80243014 AC620000 */ sw $v0, 0x0($v1) glabel func_80243018 /* 163878 80243018 3C038025 */ lui $v1, %hi(D_80249B98) glabel func_8024301C /* 16387C 8024301C 24639B98 */ addiu $v1, $v1, %lo(D_80249B98) .L80243020: /* 163880 80243020 8C620000 */ lw $v0, 0x0($v1) /* 163884 80243024 3C048025 */ lui $a0, %hi(D_80249BA8) D_80243028: /* 163888 80243028 8C849BA8 */ lw $a0, %lo(D_80249BA8)($a0) .L8024302C: /* 16388C 8024302C 00481021 */ addu $v0, $v0, $t0 .L80243030: /* 163890 80243030 14800009 */ bnez $a0, func_80243058 glabel func_80243034 /* 163894 80243034 AC620000 */ sw $v0, 0x0($v1) glabel func_80243038 /* 163898 80243038 3C038025 */ lui $v1, %hi(D_80249B9C) D_8024303C: /* 16389C 8024303C 24639B9C */ addiu $v1, $v1, %lo(D_80249B9C) glabel func_80243040 /* 1638A0 80243040 8C620000 */ lw $v0, 0x0($v1) glabel func_80243044 /* 1638A4 80243044 2442FF80 */ addiu $v0, $v0, -0x80 glabel func_80243048 /* 1638A8 80243048 0441000D */ bgez $v0, D_80243080 D_8024304C: /* 1638AC 8024304C AC620000 */ sw $v0, 0x0($v1) glabel func_80243050 /* 1638B0 80243050 08090C20 */ j D_80243080 glabel func_80243054_EA3954 /* 1638B4 80243054 AC600000 */ sw $zero, 0x0($v1) glabel func_80243058 /* 1638B8 80243058 3C038025 */ lui $v1, %hi(D_80249B9C) D_8024305C: /* 1638BC 8024305C 24639B9C */ addiu $v1, $v1, %lo(D_80249B9C) .L80243060: /* 1638C0 80243060 8C620000 */ lw $v0, 0x0($v1) .L80243064: /* 1638C4 80243064 24420020 */ addiu $v0, $v0, 0x20 glabel func_80243068 /* 1638C8 80243068 AC620000 */ sw $v0, 0x0($v1) .L8024306C: /* 1638CC 8024306C 28420100 */ slti $v0, $v0, 0x100 glabel func_80243070 /* 1638D0 80243070 14400004 */ bnez $v0, func_80243084 .L80243074: /* 1638D4 80243074 2404002C */ addiu $a0, $zero, 0x2C D_80243078: /* 1638D8 80243078 240200FF */ addiu $v0, $zero, 0xFF /* 1638DC 8024307C AC620000 */ sw $v0, 0x0($v1) D_80243080: /* 1638E0 80243080 2404002C */ addiu $a0, $zero, 0x2C glabel func_80243084 /* 1638E4 80243084 2406FFFF */ addiu $a2, $zero, -0x1 D_80243088: /* 1638E8 80243088 0080282D */ daddu $a1, $a0, $zero D_8024308C: /* 1638EC 8024308C 3C038016 */ lui $v1, %hi(D_8015A2D0) D_80243090: /* 1638F0 80243090 2463A2D0 */ addiu $v1, $v1, %lo(D_8015A2D0) glabel func_80243094 /* 1638F4 80243094 80620003 */ lb $v0, 0x3($v1) D_80243098: /* 1638F8 80243098 10460003 */ beq $v0, $a2, func_802430A8 D_8024309C: /* 1638FC 8024309C 00000000 */ nop D_802430A0: /* 163900 802430A0 54450006 */ bnel $v0, $a1, dead_flo_08_ItemChoice_SelectedItemID .L802430A4: /* 163904 802430A4 24840001 */ addiu $a0, $a0, 0x1 glabel func_802430A8 /* 163908 802430A8 90620000 */ lbu $v0, 0x0($v1) .L802430AC: /* 16390C 802430AC 30420008 */ andi $v0, $v0, 0x8 D_802430B0: /* 163910 802430B0 14400005 */ bnez $v0, func_802430C8 glabel func_802430B4 /* 163914 802430B4 00000000 */ nop dead_flo_08_ItemChoice_HasSelectedItem: /* 163918 802430B8 24840001 */ addiu $a0, $a0, 0x1 dead_flo_08_ItemChoice_SelectedItemID: /* 16391C 802430BC 28820040 */ slti $v0, $a0, 0x40 glabel func_802430C0 /* 163920 802430C0 1440FFF4 */ bnez $v0, func_80243094 D_802430C4: /* 163924 802430C4 24630020 */ addiu $v1, $v1, 0x20 glabel func_802430C8 /* 163928 802430C8 3C038025 */ lui $v1, %hi(D_80249BB8) glabel func_802430CC /* 16392C 802430CC 24639BB8 */ addiu $v1, $v1, %lo(D_80249BB8) glabel func_802430D0 /* 163930 802430D0 8C620000 */ lw $v0, 0x0($v1) D_802430D4: /* 163934 802430D4 14400008 */ bnez $v0, .L802430F8 dgb_03_pad_30D8: /* 163938 802430D8 28820040 */ slti $v0, $a0, 0x40 .L802430DC: /* 16393C 802430DC 3C028025 */ lui $v0, %hi(D_80249BA8) D_802430E0: /* 163940 802430E0 8C429BA8 */ lw $v0, %lo(D_80249BA8)($v0) glabel dead_kzn_17_UnkFunc51 /* 163944 802430E4 14400004 */ bnez $v0, .L802430F8 D_802430E8: /* 163948 802430E8 28820040 */ slti $v0, $a0, 0x40 flo_11_pad_30EC: /* 16394C 802430EC 24020001 */ addiu $v0, $zero, 0x1 D_802430F0: /* 163950 802430F0 AC620000 */ sw $v0, 0x0($v1) /* 163954 802430F4 28820040 */ slti $v0, $a0, 0x40 .L802430F8: /* 163958 802430F8 1440001E */ bnez $v0, .L80243174 .L802430FC: /* 16395C 802430FC 240200FF */ addiu $v0, $zero, 0xFF D_80243100: /* 163960 80243100 3C038025 */ lui $v1, %hi(D_80249BAC) glabel func_80243104 /* 163964 80243104 8C639BAC */ lw $v1, %lo(D_80249BAC)($v1) glabel func_80243108 /* 163968 80243108 14620010 */ bne $v1, $v0, D_8024314C glabel .L8024310C /* 16396C 8024310C 00000000 */ nop end_01_Font4Patterns: /* 163970 80243110 3C038025 */ lui $v1, %hi(D_80249BB8) .L80243114: /* 163974 80243114 24639BB8 */ addiu $v1, $v1, %lo(D_80249BB8) D_80243118: /* 163978 80243118 8C620000 */ lw $v0, 0x0($v1) D_8024311C: /* 16397C 8024311C 1040000F */ beqz $v0, .L8024315C D_80243120: /* 163980 80243120 2442FFFF */ addiu $v0, $v0, -0x1 glabel func_80243124 /* 163984 80243124 1440001A */ bnez $v0, D_80243190 .L80243128: /* 163988 80243128 AC620000 */ sw $v0, 0x0($v1) .L8024312C: /* 16398C 8024312C 3C028025 */ lui $v0, %hi(D_80249BA0) D_80243130: /* 163990 80243130 8C429BA0 */ lw $v0, %lo(D_80249BA0)($v0) glabel func_80243134 /* 163994 80243134 3C038025 */ lui $v1, %hi(D_80249BA4) glabel func_80243138 /* 163998 80243138 8C639BA4 */ lw $v1, %lo(D_80249BA4)($v1) glabel func_8024313C /* 16399C 8024313C 3C018025 */ lui $at, %hi(D_80249B94) /* 1639A0 80243140 AC229B94 */ sw $v0, %lo(D_80249B94)($at) .L80243144: /* 1639A4 80243144 3C018025 */ lui $at, %hi(D_80249B98) .L80243148: /* 1639A8 80243148 AC239B98 */ sw $v1, %lo(D_80249B98)($at) D_8024314C: /* 1639AC 8024314C 3C028025 */ lui $v0, %hi(D_80249BB8) .L80243150: /* 1639B0 80243150 8C429BB8 */ lw $v0, %lo(D_80249BB8)($v0) .L80243154: /* 1639B4 80243154 1440000F */ bnez $v0, .L80243194 .L80243158: /* 1639B8 80243158 240200FF */ addiu $v0, $zero, 0xFF .L8024315C: /* 1639BC 8024315C 3C028025 */ lui $v0, %hi(D_80249BAC) D_80243160: /* 1639C0 80243160 8C429BAC */ lw $v0, %lo(D_80249BAC)($v0) glabel func_80243164 /* 1639C4 80243164 3C018025 */ lui $at, %hi(D_80249BA8) D_80243168: /* 1639C8 80243168 AC229BA8 */ sw $v0, %lo(D_80249BA8)($at) .L8024316C: /* 1639CC 8024316C 08090C65 */ j .L80243194 D_80243170_EDBF90: /* 1639D0 80243170 240200FF */ addiu $v0, $zero, 0xFF .L80243174: /* 1639D4 80243174 3C028025 */ lui $v0, %hi(D_80249BA8) end_01_Font3Patterns: /* 1639D8 80243178 8C429BA8 */ lw $v0, %lo(D_80249BA8)($v0) glabel func_8024317C /* 1639DC 8024317C 14400005 */ bnez $v0, .L80243194 .L80243180: /* 1639E0 80243180 240200FF */ addiu $v0, $zero, 0xFF .L80243184: /* 1639E4 80243184 24020001 */ addiu $v0, $zero, 0x1 glabel func_80243188 /* 1639E8 80243188 3C018025 */ lui $at, %hi(D_80249BB8) D_8024318C: /* 1639EC 8024318C AC229BB8 */ sw $v0, %lo(D_80249BB8)($at) D_80243190: /* 1639F0 80243190 240200FF */ addiu $v0, $zero, 0xFF .L80243194: /* 1639F4 80243194 3C018025 */ lui $at, %hi(D_80249BAC) glabel func_80243198 /* 1639F8 80243198 03E00008 */ jr $ra glabel .L8024319C /* 1639FC 8024319C AC229BAC */ sw $v0, %lo(D_80249BAC)($at) ### DECOMPILED C INSTRUCTIONS: void filemenu_update_cursor(void) { s32 targetPosX = filemenu_cursor_targetX; s32 targetPosY = filemenu_cursor_targetY; s32 xDelta; s32 yDelta; s32 i; xDelta = (targetPosX - filemenu_cursor_posX) * 0.5; yDelta = (targetPosY - filemenu_cursor_posY) * 0.5; if ((targetPosX != filemenu_cursor_posX) || (targetPosY != filemenu_cursor_posY)) { if ((xDelta == 0) && (yDelta == 0)) { filemenu_cursor_posX = targetPosX; filemenu_cursor_posY = targetPosY; } } filemenu_cursor_posX += xDelta; filemenu_cursor_posY += yDelta; if (filemenu_cursorGoalAlpha == 0) { filemenu_cursor_alpha -= 128; if (filemenu_cursor_alpha < 0) { filemenu_cursor_alpha = 0; } } else { filemenu_cursor_alpha += 32; if (filemenu_cursor_alpha > 255) { filemenu_cursor_alpha = 255; } } for (i = WINDOW_ID_FILEMENU_MAIN; i < ARRAY_COUNT(gWindows); i++) { Window* window = &gWindows[i]; s8 parent = window->parent; if ((parent == -1 || parent == WINDOW_ID_FILEMENU_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) { break; } } if (D_80249BB8 == 0) { if (filemenu_cursorGoalAlpha == 0) { D_80249BB8 = 1; } } if (i >= ARRAY_COUNT(gWindows)) { if (filemenu_cursorGoalAlpha2 == 255) { if (D_80249BB8 != 0) { D_80249BB8--; if (D_80249BB8 == 0) { filemenu_cursor_posX = filemenu_cursor_targetX; filemenu_cursor_posY = filemenu_cursor_targetY; } } } if (D_80249BB8 == 0) { filemenu_cursorGoalAlpha = filemenu_cursorGoalAlpha2; } } else if (filemenu_cursorGoalAlpha == 0) { D_80249BB8 = 1; } filemenu_cursorGoalAlpha2 = 255; }
### RAW ASSEMBLY INSTRUCTIONS: glabel sleep_bubble_update /* 35CB70 E00520F0 27BDFF98 */ addiu $sp, $sp, -0x68 /* 35CB74 E00520F4 AFBF0030 */ sw $ra, 0x30($sp) /* 35CB78 E00520F8 AFB7002C */ sw $s7, 0x2C($sp) /* 35CB7C E00520FC AFB60028 */ sw $s6, 0x28($sp) /* 35CB80 E0052100 AFB50024 */ sw $s5, 0x24($sp) /* 35CB84 E0052104 AFB40020 */ sw $s4, 0x20($sp) /* 35CB88 E0052108 AFB3001C */ sw $s3, 0x1C($sp) /* 35CB8C E005210C AFB20018 */ sw $s2, 0x18($sp) /* 35CB90 E0052110 AFB10014 */ sw $s1, 0x14($sp) /* 35CB94 E0052114 AFB00010 */ sw $s0, 0x10($sp) /* 35CB98 E0052118 F7BE0060 */ sdc1 $f30, 0x60($sp) /* 35CB9C E005211C F7BC0058 */ sdc1 $f28, 0x58($sp) /* 35CBA0 E0052120 F7BA0050 */ sdc1 $f26, 0x50($sp) /* 35CBA4 E0052124 F7B80048 */ sdc1 $f24, 0x48($sp) /* 35CBA8 E0052128 F7B60040 */ sdc1 $f22, 0x40($sp) /* 35CBAC E005212C F7B40038 */ sdc1 $f20, 0x38($sp) /* 35CBB0 E0052130 8C90000C */ lw $s0, 0xC($a0) /* 35CBB4 E0052134 8E03001C */ lw $v1, 0x1C($s0) /* 35CBB8 E0052138 28620064 */ slti $v0, $v1, 0x64 /* 35CBBC E005213C 10400003 */ beqz $v0, .LE005214C /* 35CBC0 E0052140 26130024 */ addiu $s3, $s0, 0x24 /* 35CBC4 E0052144 2462FFFF */ addiu $v0, $v1, -0x1 /* 35CBC8 E0052148 AE02001C */ sw $v0, 0x1C($s0) .LE005214C: /* 35CBCC E005214C 3C030004 */ lui $v1, (0x4F1A0 >> 16) /* 35CBD0 E0052150 8E020020 */ lw $v0, 0x20($s0) /* 35CBD4 E0052154 3463F1A0 */ ori $v1, $v1, (0x4F1A0 & 0xFFFF) /* 35CBD8 E0052158 24420001 */ addiu $v0, $v0, 0x1 /* 35CBDC E005215C 0062182A */ slt $v1, $v1, $v0 /* 35CBE0 E0052160 10600003 */ beqz $v1, .LE0052170 /* 35CBE4 E0052164 AE020020 */ sw $v0, 0x20($s0) /* 35CBE8 E0052168 24020100 */ addiu $v0, $zero, 0x100 /* 35CBEC E005216C AE020020 */ sw $v0, 0x20($s0) .LE0052170: /* 35CBF0 E0052170 8E03001C */ lw $v1, 0x1C($s0) /* 35CBF4 E0052174 04610005 */ bgez $v1, .LE005218C /* 35CBF8 E0052178 0060B82D */ daddu $s7, $v1, $zero /* 35CBFC E005217C 0C080128 */ jal shim_remove_effect /* 35CC00 E0052180 00000000 */ nop /* 35CC04 E0052184 080148F6 */ j .LE00523D8 /* 35CC08 E0052188 00000000 */ nop .LE005218C: /* 35CC0C E005218C C6020014 */ lwc1 $f2, 0x14($s0) /* 35CC10 E0052190 C6140018 */ lwc1 $f20, 0x18($s0) /* 35CC14 E0052194 46141081 */ sub.s $f2, $f2, $f20 /* 35CC18 E0052198 3C013DCC */ lui $at, (0x3DCCCCCD >> 16) /* 35CC1C E005219C 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF) /* 35CC20 E00521A0 44810000 */ mtc1 $at, $f0 /* 35CC24 E00521A4 00000000 */ nop /* 35CC28 E00521A8 46001082 */ mul.s $f2, $f2, $f0 /* 35CC2C E00521AC 00000000 */ nop /* 35CC30 E00521B0 8E160020 */ lw $s6, 0x20($s0) /* 35CC34 E00521B4 00161040 */ sll $v0, $s6, 1 /* 35CC38 E00521B8 4602A500 */ add.s $f20, $f20, $f2 /* 35CC3C E00521BC 00561021 */ addu $v0, $v0, $s6 /* 35CC40 E00521C0 44826000 */ mtc1 $v0, $f12 /* 35CC44 E00521C4 00000000 */ nop /* 35CC48 E00521C8 46806320 */ cvt.s.w $f12, $f12 /* 35CC4C E00521CC 0C080140 */ jal shim_sin_deg /* 35CC50 E00521D0 E6140018 */ swc1 $f20, 0x18($s0) /* 35CC54 E00521D4 4600A002 */ mul.s $f0, $f20, $f0 /* 35CC58 E00521D8 00000000 */ nop /* 35CC5C E00521DC 3C01E005 */ lui $at, (0xE0052A80 >> 16) /* 35CC60 E00521E0 D4222A80 */ ldc1 $f2, (0xE0052A80 & 0xFFFF)($at) /* 35CC64 E00521E4 46000021 */ cvt.d.s $f0, $f0 /* 35CC68 E00521E8 46220002 */ mul.d $f0, $f0, $f2 /* 35CC6C E00521EC 00000000 */ nop /* 35CC70 E00521F0 0000902D */ daddu $s2, $zero, $zero /* 35CC74 E00521F4 26110028 */ addiu $s1, $s0, 0x28 /* 35CC78 E00521F8 0240A82D */ daddu $s5, $s2, $zero /* 35CC7C E00521FC 0240A02D */ daddu $s4, $s2, $zero /* 35CC80 E0052200 4600A521 */ cvt.d.s $f20, $f20 /* 35CC84 E0052204 3C014000 */ lui $at, (0x40000000 >> 16) /* 35CC88 E0052208 4481F800 */ mtc1 $at, $f31 /* 35CC8C E005220C 4480F000 */ mtc1 $zero, $f30 /* 35CC90 E0052210 4620A500 */ add.d $f20, $f20, $f0 /* 35CC94 E0052214 3C013FF8 */ lui $at, (0x3FF80000 >> 16) /* 35CC98 E0052218 4481E800 */ mtc1 $at, $f29 /* 35CC9C E005221C 4480E000 */ mtc1 $zero, $f28 /* 35CCA0 E0052220 46201686 */ mov.d $f26, $f2 /* 35CCA4 E0052224 4620A620 */ cvt.s.d $f24, $f20 .LE0052228: /* 35CCA8 E0052228 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 35CCAC E005222C 4481A000 */ mtc1 $at, $f20 /* 35CCB0 E0052230 4492B000 */ mtc1 $s2, $f22 /* 35CCB4 E0052234 00000000 */ nop /* 35CCB8 E0052238 4680B5A0 */ cvt.s.w $f22, $f22 /* 35CCBC E005223C 4614B502 */ mul.s $f20, $f22, $f20 /* 35CCC0 E0052240 00000000 */ nop /* 35CCC4 E0052244 3C0141A8 */ lui $at, (0x41A80000 >> 16) /* 35CCC8 E0052248 44810000 */ mtc1 $at, $f0 /* 35CCCC E005224C 3C014188 */ lui $at, (0x41880000 >> 16) /* 35CCD0 E0052250 44811000 */ mtc1 $at, $f2 /* 35CCD4 E0052254 4600A503 */ div.s $f20, $f20, $f0 /* 35CCD8 E0052258 4602A500 */ add.s $f20, $f20, $f2 /* 35CCDC E005225C 0C080140 */ jal shim_sin_deg /* 35CCE0 E0052260 4600A306 */ mov.s $f12, $f20 /* 35CCE4 E0052264 4600C002 */ mul.s $f0, $f24, $f0 /* 35CCE8 E0052268 00000000 */ nop /* 35CCEC E005226C 4600A306 */ mov.s $f12, $f20 /* 35CCF0 E0052270 0C080144 */ jal shim_cos_deg /* 35CCF4 E0052274 E6600000 */ swc1 $f0, 0x0($s3) /* 35CCF8 E0052278 4600C087 */ neg.s $f2, $f24 /* 35CCFC E005227C 46001082 */ mul.s $f2, $f2, $f0 /* 35CD00 E0052280 00000000 */ nop /* 35CD04 E0052284 44946000 */ mtc1 $s4, $f12 /* 35CD08 E0052288 00000000 */ nop /* 35CD0C E005228C 46806320 */ cvt.s.w $f12, $f12 /* 35CD10 E0052290 0C080140 */ jal shim_sin_deg /* 35CD14 E0052294 E6220000 */ swc1 $f2, 0x0($s1) /* 35CD18 E0052298 46000021 */ cvt.d.s $f0, $f0 /* 35CD1C E005229C 463A0002 */ mul.d $f0, $f0, $f26 /* 35CD20 E00522A0 00000000 */ nop /* 35CD24 E00522A4 463E0000 */ add.d $f0, $f0, $f30 /* 35CD28 E00522A8 4496A000 */ mtc1 $s6, $f20 /* 35CD2C E00522AC 00000000 */ nop /* 35CD30 E00522B0 4680A520 */ cvt.s.w $f20, $f20 /* 35CD34 E00522B4 4600A521 */ cvt.d.s $f20, $f20 /* 35CD38 E00522B8 4620A002 */ mul.d $f0, $f20, $f0 /* 35CD3C E00522BC 00000000 */ nop /* 35CD40 E00522C0 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 35CD44 E00522C4 44811000 */ mtc1 $at, $f2 /* 35CD48 E00522C8 00000000 */ nop /* 35CD4C E00522CC 4602B580 */ add.s $f22, $f22, $f2 /* 35CD50 E00522D0 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 35CD54 E00522D4 44811000 */ mtc1 $at, $f2 /* 35CD58 E00522D8 00000000 */ nop /* 35CD5C E00522DC 4602B082 */ mul.s $f2, $f22, $f2 /* 35CD60 E00522E0 00000000 */ nop /* 35CD64 E00522E4 460010A1 */ cvt.d.s $f2, $f2 /* 35CD68 E00522E8 46220000 */ add.d $f0, $f0, $f2 /* 35CD6C E00522EC 0C080140 */ jal shim_sin_deg /* 35CD70 E00522F0 46200320 */ cvt.s.d $f12, $f0 /* 35CD74 E00522F4 46000021 */ cvt.d.s $f0, $f0 /* 35CD78 E00522F8 463C0002 */ mul.d $f0, $f0, $f28 /* 35CD7C E00522FC 00000000 */ nop /* 35CD80 E0052300 C6620000 */ lwc1 $f2, 0x0($s3) /* 35CD84 E0052304 460010A1 */ cvt.d.s $f2, $f2 /* 35CD88 E0052308 46201080 */ add.d $f2, $f2, $f0 /* 35CD8C E005230C 44956000 */ mtc1 $s5, $f12 /* 35CD90 E0052310 00000000 */ nop /* 35CD94 E0052314 46806320 */ cvt.s.w $f12, $f12 /* 35CD98 E0052318 462010A0 */ cvt.s.d $f2, $f2 /* 35CD9C E005231C 0C080144 */ jal shim_cos_deg /* 35CDA0 E0052320 E6620000 */ swc1 $f2, 0x0($s3) /* 35CDA4 E0052324 46000021 */ cvt.d.s $f0, $f0 /* 35CDA8 E0052328 463A0002 */ mul.d $f0, $f0, $f26 /* 35CDAC E005232C 00000000 */ nop /* 35CDB0 E0052330 463E0000 */ add.d $f0, $f0, $f30 /* 35CDB4 E0052334 4620A502 */ mul.d $f20, $f20, $f0 /* 35CDB8 E0052338 00000000 */ nop /* 35CDBC E005233C 3C014248 */ lui $at, (0x42480000 >> 16) /* 35CDC0 E0052340 44810000 */ mtc1 $at, $f0 /* 35CDC4 E0052344 00000000 */ nop /* 35CDC8 E0052348 4600B582 */ mul.s $f22, $f22, $f0 /* 35CDCC E005234C 00000000 */ nop /* 35CDD0 E0052350 4600B5A1 */ cvt.d.s $f22, $f22 /* 35CDD4 E0052354 4636A500 */ add.d $f20, $f20, $f22 /* 35CDD8 E0052358 0C080144 */ jal shim_cos_deg /* 35CDDC E005235C 4620A320 */ cvt.s.d $f12, $f20 /* 35CDE0 E0052360 46000021 */ cvt.d.s $f0, $f0 /* 35CDE4 E0052364 463C0002 */ mul.d $f0, $f0, $f28 /* 35CDE8 E0052368 00000000 */ nop /* 35CDEC E005236C 26520001 */ addiu $s2, $s2, 0x1 /* 35CDF0 E0052370 26940035 */ addiu $s4, $s4, 0x35 /* 35CDF4 E0052374 C6220000 */ lwc1 $f2, 0x0($s1) /* 35CDF8 E0052378 26B50024 */ addiu $s5, $s5, 0x24 /* 35CDFC E005237C 460010A1 */ cvt.d.s $f2, $f2 /* 35CE00 E0052380 46201080 */ add.d $f2, $f2, $f0 /* 35CE04 E0052384 26730008 */ addiu $s3, $s3, 0x8 /* 35CE08 E0052388 2A420014 */ slti $v0, $s2, 0x14 /* 35CE0C E005238C 462010A0 */ cvt.s.d $f2, $f2 /* 35CE10 E0052390 E6220000 */ swc1 $f2, 0x0($s1) /* 35CE14 E0052394 1440FFA4 */ bnez $v0, .LE0052228 /* 35CE18 E0052398 26310008 */ addiu $s1, $s1, 0x8 /* 35CE1C E005239C 2AE20064 */ slti $v0, $s7, 0x64 /* 35CE20 E00523A0 10400006 */ beqz $v0, .LE00523BC /* 35CE24 E00523A4 AE0000C4 */ sw $zero, 0xC4($s0) /* 35CE28 E00523A8 C60000C8 */ lwc1 $f0, 0xC8($s0) /* 35CE2C E00523AC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 35CE30 E00523B0 44811000 */ mtc1 $at, $f2 /* 35CE34 E00523B4 080148F5 */ j .LE00523D4 /* 35CE38 E00523B8 46020000 */ add.s $f0, $f0, $f2 .LE00523BC: /* 35CE3C E00523BC 3C01E005 */ lui $at, (0xE0052A88 >> 16) /* 35CE40 E00523C0 D4222A88 */ ldc1 $f2, (0xE0052A88 & 0xFFFF)($at) /* 35CE44 E00523C4 4600C021 */ cvt.d.s $f0, $f24 /* 35CE48 E00523C8 46220002 */ mul.d $f0, $f0, $f2 /* 35CE4C E00523CC 00000000 */ nop /* 35CE50 E00523D0 46200020 */ cvt.s.d $f0, $f0 .LE00523D4: /* 35CE54 E00523D4 E60000C8 */ swc1 $f0, 0xC8($s0) .LE00523D8: /* 35CE58 E00523D8 8FBF0030 */ lw $ra, 0x30($sp) /* 35CE5C E00523DC 8FB7002C */ lw $s7, 0x2C($sp) /* 35CE60 E00523E0 8FB60028 */ lw $s6, 0x28($sp) /* 35CE64 E00523E4 8FB50024 */ lw $s5, 0x24($sp) /* 35CE68 E00523E8 8FB40020 */ lw $s4, 0x20($sp) /* 35CE6C E00523EC 8FB3001C */ lw $s3, 0x1C($sp) /* 35CE70 E00523F0 8FB20018 */ lw $s2, 0x18($sp) /* 35CE74 E00523F4 8FB10014 */ lw $s1, 0x14($sp) /* 35CE78 E00523F8 8FB00010 */ lw $s0, 0x10($sp) /* 35CE7C E00523FC D7BE0060 */ ldc1 $f30, 0x60($sp) /* 35CE80 E0052400 D7BC0058 */ ldc1 $f28, 0x58($sp) /* 35CE84 E0052404 D7BA0050 */ ldc1 $f26, 0x50($sp) /* 35CE88 E0052408 D7B80048 */ ldc1 $f24, 0x48($sp) /* 35CE8C E005240C D7B60040 */ ldc1 $f22, 0x40($sp) /* 35CE90 E0052410 D7B40038 */ ldc1 $f20, 0x38($sp) /* 35CE94 E0052414 03E00008 */ jr $ra /* 35CE98 E0052418 27BD0068 */ addiu $sp, $sp, 0x68 ### DECOMPILED C INSTRUCTIONS: void sleep_bubble_update(EffectInstance* effect) { SleepBubbleFXData* part = effect->data.sleepBubble; f32* xPtr = &part->points->x; f32* yPtr; s32 xAngle, yAngle, i, timeLeft, unk_20; f32 angle, temp1, temp2; if (part->timeLeft < 100) { part->timeLeft--; } part->unk_20++; if (part->unk_20 > 324000) { part->unk_20 = 256; } if (part->timeLeft < 0) { shim_remove_effect(effect); return; } unk_20 = part->unk_20; timeLeft = part->timeLeft; temp1 = part->unk_18 + (part->unk_14 - part->unk_18) * 0.1f; part->unk_18 = temp1; temp2 = temp1 + (temp1 * shim_sin_deg(unk_20 * 3)) * 0.1; i = 0; yPtr = &part->points->y; xAngle = yAngle = i; for (i = 0; i < ARRAY_COUNT(part->points); i++) { angle = i * 360.0f / 21.0f + 17.0f; *xPtr = temp2 * shim_sin_deg(angle); *yPtr = -temp2 * shim_cos_deg(angle); *xPtr += shim_sin_deg((f32)unk_20 * (shim_sin_deg(xAngle) * 0.1 + 2.0) + (i + 5.0f) * 30.0f) * 1.5; *yPtr += shim_cos_deg((f32)unk_20 * (shim_cos_deg(yAngle) * 0.1 + 2.0) + (i + 5.0f) * 50.0f) * 1.5; xAngle += 53; yAngle += 36; xPtr += 2; yPtr += 2; } part->unk_C4 = 0.0f; if (timeLeft < 100) { part->unk_C8 += 1.0f; } else { part->unk_C8 = temp2 * 1.2; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel show_first_strike_message /* 1D05C 80041C5C 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 1D060 80041C60 3C05800B */ lui $a1, %hi(gCurrentEncounter) /* 1D064 80041C64 24A50F10 */ addiu $a1, $a1, %lo(gCurrentEncounter) /* 1D068 80041C68 AFBF0054 */ sw $ra, 0x54($sp) /* 1D06C 80041C6C AFB00050 */ sw $s0, 0x50($sp) /* 1D070 80041C70 8CA20094 */ lw $v0, 0x94($a1) /* 1D074 80041C74 14400005 */ bnez $v0, .L80041C8C /* 1D078 80041C78 2402FF38 */ addiu $v0, $zero, -0xC8 /* 1D07C 80041C7C 3C01800A */ lui $at, %hi(gFirstStrikeMessagePos) /* 1D080 80041C80 A422A668 */ sh $v0, %lo(gFirstStrikeMessagePos)($at) /* 1D084 80041C84 080107C0 */ j .L80041F00 /* 1D088 80041C88 00000000 */ nop .L80041C8C: /* 1D08C 80041C8C 3C02800A */ lui $v0, %hi(gFirstStrikeMessagePos) /* 1D090 80041C90 2442A668 */ addiu $v0, $v0, %lo(gFirstStrikeMessagePos) /* 1D094 80041C94 94430000 */ lhu $v1, 0x0($v0) /* 1D098 80041C98 24630028 */ addiu $v1, $v1, 0x28 /* 1D09C 80041C9C 00032400 */ sll $a0, $v1, 16 /* 1D0A0 80041CA0 00048403 */ sra $s0, $a0, 16 /* 1D0A4 80041CA4 1A000005 */ blez $s0, .L80041CBC /* 1D0A8 80041CA8 A4430000 */ sh $v1, 0x0($v0) /* 1D0AC 80041CAC 2A020640 */ slti $v0, $s0, 0x640 /* 1D0B0 80041CB0 10400002 */ beqz $v0, .L80041CBC /* 1D0B4 80041CB4 2610F9C0 */ addiu $s0, $s0, -0x640 /* 1D0B8 80041CB8 0000802D */ daddu $s0, $zero, $zero .L80041CBC: /* 1D0BC 80041CBC 80A30004 */ lb $v1, 0x4($a1) /* 1D0C0 80041CC0 24020001 */ addiu $v0, $zero, 0x1 /* 1D0C4 80041CC4 10620005 */ beq $v1, $v0, .L80041CDC /* 1D0C8 80041CC8 24020002 */ addiu $v0, $zero, 0x2 /* 1D0CC 80041CCC 1062005D */ beq $v1, $v0, .L80041E44 /* 1D0D0 80041CD0 00000000 */ nop /* 1D0D4 80041CD4 080107C0 */ j .L80041F00 /* 1D0D8 80041CD8 00000000 */ nop .L80041CDC: /* 1D0DC 80041CDC 80A30005 */ lb $v1, 0x5($a1) /* 1D0E0 80041CE0 24020004 */ addiu $v0, $zero, 0x4 /* 1D0E4 80041CE4 1062000C */ beq $v1, $v0, .L80041D18 /* 1D0E8 80041CE8 28620005 */ slti $v0, $v1, 0x5 /* 1D0EC 80041CEC 10400005 */ beqz $v0, .L80041D04 /* 1D0F0 80041CF0 24020002 */ addiu $v0, $zero, 0x2 /* 1D0F4 80041CF4 10620009 */ beq $v1, $v0, .L80041D1C /* 1D0F8 80041CF8 3C04001D */ lui $a0, (0x1D00AC >> 16) /* 1D0FC 80041CFC 080107C0 */ j .L80041F00 /* 1D100 80041D00 00000000 */ nop .L80041D04: /* 1D104 80041D04 24020006 */ addiu $v0, $zero, 0x6 /* 1D108 80041D08 10620029 */ beq $v1, $v0, .L80041DB0 /* 1D10C 80041D0C 3C04001D */ lui $a0, (0x1D00AD >> 16) /* 1D110 80041D10 080107C0 */ j .L80041F00 /* 1D114 80041D14 00000000 */ nop .L80041D18: /* 1D118 80041D18 3C04001D */ lui $a0, (0x1D00AC >> 16) .L80041D1C: /* 1D11C 80041D1C 348400AC */ ori $a0, $a0, (0x1D00AC & 0xFFFF) /* 1D120 80041D20 0C04991D */ jal get_msg_width /* 1D124 80041D24 0000282D */ daddu $a1, $zero, $zero /* 1D128 80041D28 24480018 */ addiu $t0, $v0, 0x18 /* 1D12C 80041D2C 260300A0 */ addiu $v1, $s0, 0xA0 /* 1D130 80041D30 000817C2 */ srl $v0, $t0, 31 /* 1D134 80041D34 01021021 */ addu $v0, $t0, $v0 /* 1D138 80041D38 00021043 */ sra $v0, $v0, 1 /* 1D13C 80041D3C 00628023 */ subu $s0, $v1, $v0 /* 1D140 80041D40 0000202D */ daddu $a0, $zero, $zero /* 1D144 80041D44 24050014 */ addiu $a1, $zero, 0x14 /* 1D148 80041D48 0200302D */ daddu $a2, $s0, $zero /* 1D14C 80041D4C 24070045 */ addiu $a3, $zero, 0x45 /* 1D150 80041D50 2402001C */ addiu $v0, $zero, 0x1C /* 1D154 80041D54 AFA20018 */ sw $v0, 0x18($sp) /* 1D158 80041D58 240200FF */ addiu $v0, $zero, 0xFF /* 1D15C 80041D5C AFA2001C */ sw $v0, 0x1C($sp) /* 1D160 80041D60 24020140 */ addiu $v0, $zero, 0x140 /* 1D164 80041D64 AFA20044 */ sw $v0, 0x44($sp) /* 1D168 80041D68 240200F0 */ addiu $v0, $zero, 0xF0 /* 1D16C 80041D6C AFA00010 */ sw $zero, 0x10($sp) /* 1D170 80041D70 AFA80014 */ sw $t0, 0x14($sp) /* 1D174 80041D74 AFA00020 */ sw $zero, 0x20($sp) /* 1D178 80041D78 AFA00024 */ sw $zero, 0x24($sp) /* 1D17C 80041D7C AFA00028 */ sw $zero, 0x28($sp) /* 1D180 80041D80 AFA0002C */ sw $zero, 0x2C($sp) /* 1D184 80041D84 AFA00030 */ sw $zero, 0x30($sp) /* 1D188 80041D88 AFA00034 */ sw $zero, 0x34($sp) /* 1D18C 80041D8C AFA00038 */ sw $zero, 0x38($sp) /* 1D190 80041D90 AFA0003C */ sw $zero, 0x3C($sp) /* 1D194 80041D94 AFA00040 */ sw $zero, 0x40($sp) /* 1D198 80041D98 AFA20048 */ sw $v0, 0x48($sp) /* 1D19C 80041D9C 0C03D4B8 */ jal draw_box /* 1D1A0 80041DA0 AFA0004C */ sw $zero, 0x4C($sp) /* 1D1A4 80041DA4 3C04001D */ lui $a0, (0x1D00AD >> 16) /* 1D1A8 80041DA8 080107B9 */ j .L80041EE4 /* 1D1AC 80041DAC 348400AC */ ori $a0, $a0, (0x1D00AC & 0xFFFF) .L80041DB0: /* 1D1B0 80041DB0 348400AD */ ori $a0, $a0, (0x1D00AD & 0xFFFF) /* 1D1B4 80041DB4 0C04991D */ jal get_msg_width /* 1D1B8 80041DB8 0000282D */ daddu $a1, $zero, $zero /* 1D1BC 80041DBC 24480018 */ addiu $t0, $v0, 0x18 /* 1D1C0 80041DC0 260300A0 */ addiu $v1, $s0, 0xA0 /* 1D1C4 80041DC4 000817C2 */ srl $v0, $t0, 31 /* 1D1C8 80041DC8 01021021 */ addu $v0, $t0, $v0 /* 1D1CC 80041DCC 00021043 */ sra $v0, $v0, 1 /* 1D1D0 80041DD0 00628023 */ subu $s0, $v1, $v0 /* 1D1D4 80041DD4 0000202D */ daddu $a0, $zero, $zero /* 1D1D8 80041DD8 24050014 */ addiu $a1, $zero, 0x14 /* 1D1DC 80041DDC 0200302D */ daddu $a2, $s0, $zero /* 1D1E0 80041DE0 24070045 */ addiu $a3, $zero, 0x45 /* 1D1E4 80041DE4 2402001C */ addiu $v0, $zero, 0x1C /* 1D1E8 80041DE8 AFA20018 */ sw $v0, 0x18($sp) /* 1D1EC 80041DEC 240200FF */ addiu $v0, $zero, 0xFF /* 1D1F0 80041DF0 AFA2001C */ sw $v0, 0x1C($sp) /* 1D1F4 80041DF4 24020140 */ addiu $v0, $zero, 0x140 /* 1D1F8 80041DF8 AFA20044 */ sw $v0, 0x44($sp) /* 1D1FC 80041DFC 240200F0 */ addiu $v0, $zero, 0xF0 /* 1D200 80041E00 AFA00010 */ sw $zero, 0x10($sp) /* 1D204 80041E04 AFA80014 */ sw $t0, 0x14($sp) /* 1D208 80041E08 AFA00020 */ sw $zero, 0x20($sp) /* 1D20C 80041E0C AFA00024 */ sw $zero, 0x24($sp) /* 1D210 80041E10 AFA00028 */ sw $zero, 0x28($sp) /* 1D214 80041E14 AFA0002C */ sw $zero, 0x2C($sp) /* 1D218 80041E18 AFA00030 */ sw $zero, 0x30($sp) /* 1D21C 80041E1C AFA00034 */ sw $zero, 0x34($sp) /* 1D220 80041E20 AFA00038 */ sw $zero, 0x38($sp) /* 1D224 80041E24 AFA0003C */ sw $zero, 0x3C($sp) /* 1D228 80041E28 AFA00040 */ sw $zero, 0x40($sp) /* 1D22C 80041E2C AFA20048 */ sw $v0, 0x48($sp) /* 1D230 80041E30 0C03D4B8 */ jal draw_box /* 1D234 80041E34 AFA0004C */ sw $zero, 0x4C($sp) /* 1D238 80041E38 3C04001D */ lui $a0, (0x1D00AD >> 16) /* 1D23C 80041E3C 080107B9 */ j .L80041EE4 /* 1D240 80041E40 348400AD */ ori $a0, $a0, (0x1D00AD & 0xFFFF) .L80041E44: /* 1D244 80041E44 0C03A752 */ jal is_ability_active /* 1D248 80041E48 24040011 */ addiu $a0, $zero, 0x11 /* 1D24C 80041E4C 1440002C */ bnez $v0, .L80041F00 /* 1D250 80041E50 3C04001D */ lui $a0, (0x1D00AE >> 16) /* 1D254 80041E54 348400AE */ ori $a0, $a0, (0x1D00AE & 0xFFFF) /* 1D258 80041E58 0C04991D */ jal get_msg_width /* 1D25C 80041E5C 0000282D */ daddu $a1, $zero, $zero /* 1D260 80041E60 24480018 */ addiu $t0, $v0, 0x18 /* 1D264 80041E64 260300A0 */ addiu $v1, $s0, 0xA0 /* 1D268 80041E68 000817C2 */ srl $v0, $t0, 31 /* 1D26C 80041E6C 01021021 */ addu $v0, $t0, $v0 /* 1D270 80041E70 00021043 */ sra $v0, $v0, 1 /* 1D274 80041E74 00628023 */ subu $s0, $v1, $v0 /* 1D278 80041E78 0000202D */ daddu $a0, $zero, $zero /* 1D27C 80041E7C 24050004 */ addiu $a1, $zero, 0x4 /* 1D280 80041E80 0200302D */ daddu $a2, $s0, $zero /* 1D284 80041E84 24070045 */ addiu $a3, $zero, 0x45 /* 1D288 80041E88 2402001C */ addiu $v0, $zero, 0x1C /* 1D28C 80041E8C AFA20018 */ sw $v0, 0x18($sp) /* 1D290 80041E90 240200FF */ addiu $v0, $zero, 0xFF /* 1D294 80041E94 AFA2001C */ sw $v0, 0x1C($sp) /* 1D298 80041E98 24020140 */ addiu $v0, $zero, 0x140 /* 1D29C 80041E9C AFA20044 */ sw $v0, 0x44($sp) /* 1D2A0 80041EA0 240200F0 */ addiu $v0, $zero, 0xF0 /* 1D2A4 80041EA4 AFA00010 */ sw $zero, 0x10($sp) /* 1D2A8 80041EA8 AFA80014 */ sw $t0, 0x14($sp) /* 1D2AC 80041EAC AFA00020 */ sw $zero, 0x20($sp) /* 1D2B0 80041EB0 AFA00024 */ sw $zero, 0x24($sp) /* 1D2B4 80041EB4 AFA00028 */ sw $zero, 0x28($sp) /* 1D2B8 80041EB8 AFA0002C */ sw $zero, 0x2C($sp) /* 1D2BC 80041EBC AFA00030 */ sw $zero, 0x30($sp) /* 1D2C0 80041EC0 AFA00034 */ sw $zero, 0x34($sp) /* 1D2C4 80041EC4 AFA00038 */ sw $zero, 0x38($sp) /* 1D2C8 80041EC8 AFA0003C */ sw $zero, 0x3C($sp) /* 1D2CC 80041ECC AFA00040 */ sw $zero, 0x40($sp) /* 1D2D0 80041ED0 AFA20048 */ sw $v0, 0x48($sp) /* 1D2D4 80041ED4 0C03D4B8 */ jal draw_box /* 1D2D8 80041ED8 AFA0004C */ sw $zero, 0x4C($sp) /* 1D2DC 80041EDC 3C04001D */ lui $a0, (0x1D00AE >> 16) /* 1D2E0 80041EE0 348400AE */ ori $a0, $a0, (0x1D00AE & 0xFFFF) .L80041EE4: /* 1D2E4 80041EE4 2605000B */ addiu $a1, $s0, 0xB /* 1D2E8 80041EE8 2406004B */ addiu $a2, $zero, 0x4B /* 1D2EC 80041EEC 240700FF */ addiu $a3, $zero, 0xFF /* 1D2F0 80041EF0 2402000A */ addiu $v0, $zero, 0xA /* 1D2F4 80041EF4 AFA20010 */ sw $v0, 0x10($sp) /* 1D2F8 80041EF8 0C04993B */ jal draw_msg /* 1D2FC 80041EFC AFA00014 */ sw $zero, 0x14($sp) .L80041F00: /* 1D300 80041F00 8FBF0054 */ lw $ra, 0x54($sp) /* 1D304 80041F04 8FB00050 */ lw $s0, 0x50($sp) /* 1D308 80041F08 03E00008 */ jr $ra /* 1D30C 80041F0C 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void show_first_strike_message(void) { EncounterStatus* currentEncounter = &gCurrentEncounter; s32 posX; s32 width; s32 xOffset; s32 screenWidthHalf; if (currentEncounter->unk_94 == 0) { gFirstStrikeMessagePos = -200; return; } gFirstStrikeMessagePos += 40; xOffset = gFirstStrikeMessagePos; if (xOffset > 0) { if (xOffset < 1600) { xOffset = 0; } else { xOffset -= 1600; } } screenWidthHalf = SCREEN_WIDTH / 2; switch (currentEncounter->firstStrikeType) { case FIRST_STRIKE_PLAYER: switch (currentEncounter->hitType) { case 2: case 4: width = get_msg_width(MSG_Menus_PlayerFirstStrike, 0) + 24; posX = (xOffset + screenWidthHalf) - (width / 2); draw_box(0, WINDOW_STYLE_20, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); draw_msg(MSG_Menus_PlayerFirstStrike, posX + 11, 75, 0xFF, MSG_PAL_STANDARD, 0); break; case 6: width = get_msg_width(MSG_Menus_PartnerFirstStrike, 0) + 24; posX = (xOffset + screenWidthHalf) - (width / 2); draw_box(0, WINDOW_STYLE_20, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); draw_msg(MSG_Menus_PartnerFirstStrike, posX + 11, 75, 0xFF, MSG_PAL_STANDARD, 0); break; } break; case FIRST_STRIKE_ENEMY: if (!is_ability_active(ABILITY_CHILL_OUT)) { width = get_msg_width(MSG_Menus_EnemyFirstStrike, 0) + 24; posX = (xOffset + screenWidthHalf) - (width / 2); draw_box(0, WINDOW_STYLE_4, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); draw_msg(MSG_Menus_EnemyFirstStrike, posX + 11, 75, 0xFF, MSG_PAL_STANDARD, 0); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel breaking_junk_main /* 403400 E0118000 27BDFF90 */ addiu $sp, $sp, -0x70 /* 403404 E0118004 F7B80050 */ sdc1 $f24, 0x50($sp) /* 403408 E0118008 4485C000 */ mtc1 $a1, $f24 /* 40340C E011800C F7BA0058 */ sdc1 $f26, 0x58($sp) /* 403410 E0118010 4486D000 */ mtc1 $a2, $f26 /* 403414 E0118014 F7BC0060 */ sdc1 $f28, 0x60($sp) /* 403418 E0118018 4487E000 */ mtc1 $a3, $f28 /* 40341C E011801C AFB1002C */ sw $s1, 0x2C($sp) /* 403420 E0118020 0080882D */ daddu $s1, $a0, $zero /* 403424 E0118024 F7BE0068 */ sdc1 $f30, 0x68($sp) /* 403428 E0118028 C7BE0080 */ lwc1 $f30, 0x80($sp) /* 40342C E011802C 27A40010 */ addiu $a0, $sp, 0x10 /* 403430 E0118030 AFB00028 */ sw $s0, 0x28($sp) /* 403434 E0118034 8FB00084 */ lw $s0, 0x84($sp) /* 403438 E0118038 3C02E012 */ lui $v0, %hi(breaking_junk_init) /* 40343C E011803C 244282EC */ addiu $v0, $v0, %lo(breaking_junk_init) /* 403440 E0118040 AFA20018 */ sw $v0, 0x18($sp) /* 403444 E0118044 3C02E012 */ lui $v0, %hi(breaking_junk_update) /* 403448 E0118048 244282F4 */ addiu $v0, $v0, %lo(breaking_junk_update) /* 40344C E011804C AFA2001C */ sw $v0, 0x1C($sp) /* 403450 E0118050 3C02E012 */ lui $v0, %hi(breaking_junk_render) /* 403454 E0118054 24428454 */ addiu $v0, $v0, %lo(breaking_junk_render) /* 403458 E0118058 AFA20020 */ sw $v0, 0x20($sp) /* 40345C E011805C 2402007E */ addiu $v0, $zero, 0x7E /* 403460 E0118060 AFBF0038 */ sw $ra, 0x38($sp) /* 403464 E0118064 AFB30034 */ sw $s3, 0x34($sp) /* 403468 E0118068 AFB20030 */ sw $s2, 0x30($sp) /* 40346C E011806C F7B60048 */ sdc1 $f22, 0x48($sp) /* 403470 E0118070 F7B40040 */ sdc1 $f20, 0x40($sp) /* 403474 E0118074 AFA00010 */ sw $zero, 0x10($sp) /* 403478 E0118078 AFA00024 */ sw $zero, 0x24($sp) /* 40347C E011807C 0C080124 */ jal shim_create_effect_instance /* 403480 E0118080 AFA20014 */ sw $v0, 0x14($sp) /* 403484 E0118084 24040168 */ addiu $a0, $zero, 0x168 /* 403488 E0118088 24030006 */ addiu $v1, $zero, 0x6 /* 40348C E011808C 0040982D */ daddu $s3, $v0, $zero /* 403490 E0118090 0C08012C */ jal shim_general_heap_malloc /* 403494 E0118094 AE630008 */ sw $v1, 0x8($s3) /* 403498 E0118098 0040182D */ daddu $v1, $v0, $zero /* 40349C E011809C 14600003 */ bnez $v1, .LE01180AC /* 4034A0 E01180A0 AE62000C */ sw $v0, 0xC($s3) .LE01180A4: /* 4034A4 E01180A4 08046029 */ j .LE01180A4 /* 4034A8 E01180A8 00000000 */ nop .LE01180AC: /* 4034AC E01180AC AC710000 */ sw $s1, 0x0($v1) /* 4034B0 E01180B0 1E000004 */ bgtz $s0, .LE01180C4 /* 4034B4 E01180B4 AC600020 */ sw $zero, 0x20($v1) /* 4034B8 E01180B8 240203E8 */ addiu $v0, $zero, 0x3E8 /* 4034BC E01180BC 08046032 */ j .LE01180C8 /* 4034C0 E01180C0 AC62001C */ sw $v0, 0x1C($v1) .LE01180C4: /* 4034C4 E01180C4 AC70001C */ sw $s0, 0x1C($v1) .LE01180C8: /* 4034C8 E01180C8 240200FF */ addiu $v0, $zero, 0xFF /* 4034CC E01180CC A4620032 */ sh $v0, 0x32($v1) /* 4034D0 E01180D0 8E620008 */ lw $v0, 0x8($s3) /* 4034D4 E01180D4 18400077 */ blez $v0, .LE01182B4 /* 4034D8 E01180D8 0000882D */ daddu $s1, $zero, $zero /* 4034DC E01180DC 241200FF */ addiu $s2, $zero, 0xFF /* 4034E0 E01180E0 24700028 */ addiu $s0, $v1, 0x28 /* 4034E4 E01180E4 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 4034E8 E01180E8 4481B800 */ mtc1 $at, $f23 /* 4034EC E01180EC 4480B000 */ mtc1 $zero, $f22 /* 4034F0 E01180F0 3C01E012 */ lui $at, (0xE0120000 >> 16) /* 4034F4 E01180F4 D43487D0 */ ldc1 $f20, -0x7830($at) .LE01180F8: /* 4034F8 E01180F8 2404000A */ addiu $a0, $zero, 0xA /* 4034FC E01180FC E618FFDC */ swc1 $f24, -0x24($s0) /* 403500 E0118100 E61AFFE0 */ swc1 $f26, -0x20($s0) /* 403504 E0118104 0C080138 */ jal shim_rand_int /* 403508 E0118108 E61CFFE4 */ swc1 $f28, -0x1C($s0) /* 40350C E011810C 2442FFFB */ addiu $v0, $v0, -0x5 /* 403510 E0118110 44820000 */ mtc1 $v0, $f0 /* 403514 E0118114 00000000 */ nop /* 403518 E0118118 46800021 */ cvt.d.w $f0, $f0 /* 40351C E011811C 46360002 */ mul.d $f0, $f0, $f22 /* 403520 E0118120 00000000 */ nop /* 403524 E0118124 24040005 */ addiu $a0, $zero, 0x5 /* 403528 E0118128 46200020 */ cvt.s.d $f0, $f0 /* 40352C E011812C 0C080138 */ jal shim_rand_int /* 403530 E0118130 E600FFE8 */ swc1 $f0, -0x18($s0) /* 403534 E0118134 24420001 */ addiu $v0, $v0, 0x1 /* 403538 E0118138 3C01E012 */ lui $at, (0xE0120000 >> 16) /* 40353C E011813C D42287D8 */ ldc1 $f2, -0x7828($at) /* 403540 E0118140 44820000 */ mtc1 $v0, $f0 /* 403544 E0118144 00000000 */ nop /* 403548 E0118148 46800021 */ cvt.d.w $f0, $f0 /* 40354C E011814C 46220002 */ mul.d $f0, $f0, $f2 /* 403550 E0118150 00000000 */ nop /* 403554 E0118154 2404000A */ addiu $a0, $zero, 0xA /* 403558 E0118158 46200020 */ cvt.s.d $f0, $f0 /* 40355C E011815C 0C080138 */ jal shim_rand_int /* 403560 E0118160 E600FFEC */ swc1 $f0, -0x14($s0) /* 403564 E0118164 2442FFFB */ addiu $v0, $v0, -0x5 /* 403568 E0118168 44820000 */ mtc1 $v0, $f0 /* 40356C E011816C 00000000 */ nop /* 403570 E0118170 46800021 */ cvt.d.w $f0, $f0 /* 403574 E0118174 46360002 */ mul.d $f0, $f0, $f22 /* 403578 E0118178 00000000 */ nop /* 40357C E011817C 240400FF */ addiu $a0, $zero, 0xFF /* 403580 E0118180 E61EFFFC */ swc1 $f30, -0x4($s0) /* 403584 E0118184 46200020 */ cvt.s.d $f0, $f0 /* 403588 E0118188 0C080138 */ jal shim_rand_int /* 40358C E011818C E600FFF0 */ swc1 $f0, -0x10($s0) /* 403590 E0118190 A602000C */ sh $v0, 0xC($s0) /* 403594 E0118194 8604000C */ lh $a0, 0xC($s0) /* 403598 E0118198 A6020004 */ sh $v0, 0x4($s0) /* 40359C E011819C 0C080138 */ jal shim_rand_int /* 4035A0 E01181A0 02442023 */ subu $a0, $s2, $a0 /* 4035A4 E01181A4 9603000C */ lhu $v1, 0xC($s0) /* 4035A8 E01181A8 A602000E */ sh $v0, 0xE($s0) /* 4035AC E01181AC A6020006 */ sh $v0, 0x6($s0) /* 4035B0 E01181B0 02421023 */ subu $v0, $s2, $v0 /* 4035B4 E01181B4 00431023 */ subu $v0, $v0, $v1 /* 4035B8 E01181B8 A6020010 */ sh $v0, 0x10($s0) /* 4035BC E01181BC A6020008 */ sh $v0, 0x8($s0) /* 4035C0 E01181C0 96020004 */ lhu $v0, 0x4($s0) /* 4035C4 E01181C4 96030006 */ lhu $v1, 0x6($s0) /* 4035C8 E01181C8 244200A8 */ addiu $v0, $v0, 0xA8 /* 4035CC E01181CC A6020004 */ sh $v0, 0x4($s0) /* 4035D0 E01181D0 96020008 */ lhu $v0, 0x8($s0) /* 4035D4 E01181D4 246300A8 */ addiu $v1, $v1, 0xA8 /* 4035D8 E01181D8 A6030006 */ sh $v1, 0x6($s0) /* 4035DC E01181DC 86030004 */ lh $v1, 0x4($s0) /* 4035E0 E01181E0 244200A8 */ addiu $v0, $v0, 0xA8 /* 4035E4 E01181E4 28630100 */ slti $v1, $v1, 0x100 /* 4035E8 E01181E8 14600002 */ bnez $v1, .LE01181F4 /* 4035EC E01181EC A6020008 */ sh $v0, 0x8($s0) /* 4035F0 E01181F0 A6120004 */ sh $s2, 0x4($s0) .LE01181F4: /* 4035F4 E01181F4 86020006 */ lh $v0, 0x6($s0) /* 4035F8 E01181F8 28420100 */ slti $v0, $v0, 0x100 /* 4035FC E01181FC 50400001 */ beql $v0, $zero, .LE0118204 /* 403600 E0118200 A6120006 */ sh $s2, 0x6($s0) .LE0118204: /* 403604 E0118204 86020008 */ lh $v0, 0x8($s0) /* 403608 E0118208 28420100 */ slti $v0, $v0, 0x100 /* 40360C E011820C 50400001 */ beql $v0, $zero, .LE0118214 /* 403610 E0118210 A6120008 */ sh $s2, 0x8($s0) .LE0118214: /* 403614 E0118214 8602000C */ lh $v0, 0xC($s0) /* 403618 E0118218 44822000 */ mtc1 $v0, $f4 /* 40361C E011821C 00000000 */ nop /* 403620 E0118220 46802121 */ cvt.d.w $f4, $f4 /* 403624 E0118224 46342102 */ mul.d $f4, $f4, $f20 /* 403628 E0118228 00000000 */ nop /* 40362C E011822C 8602000E */ lh $v0, 0xE($s0) /* 403630 E0118230 44821000 */ mtc1 $v0, $f2 /* 403634 E0118234 00000000 */ nop /* 403638 E0118238 468010A1 */ cvt.d.w $f2, $f2 /* 40363C E011823C 46341082 */ mul.d $f2, $f2, $f20 /* 403640 E0118240 00000000 */ nop /* 403644 E0118244 86020010 */ lh $v0, 0x10($s0) /* 403648 E0118248 44820000 */ mtc1 $v0, $f0 /* 40364C E011824C 00000000 */ nop /* 403650 E0118250 46800021 */ cvt.d.w $f0, $f0 /* 403654 E0118254 46340002 */ mul.d $f0, $f0, $f20 /* 403658 E0118258 00000000 */ nop /* 40365C E011825C 24040167 */ addiu $a0, $zero, 0x167 /* 403660 E0118260 26310001 */ addiu $s1, $s1, 0x1 /* 403664 E0118264 4620218D */ trunc.w.d $f6, $f4 /* 403668 E0118268 44023000 */ mfc1 $v0, $f6 /* 40366C E011826C 00000000 */ nop /* 403670 E0118270 A602000C */ sh $v0, 0xC($s0) /* 403674 E0118274 4620118D */ trunc.w.d $f6, $f2 /* 403678 E0118278 44023000 */ mfc1 $v0, $f6 /* 40367C E011827C 00000000 */ nop /* 403680 E0118280 A602000E */ sh $v0, 0xE($s0) /* 403684 E0118284 4620018D */ trunc.w.d $f6, $f0 /* 403688 E0118288 44023000 */ mfc1 $v0, $f6 /* 40368C E011828C 0C080138 */ jal shim_rand_int /* 403690 E0118290 A6020010 */ sh $v0, 0x10($s0) /* 403694 E0118294 44820000 */ mtc1 $v0, $f0 /* 403698 E0118298 00000000 */ nop /* 40369C E011829C 46800020 */ cvt.s.w $f0, $f0 /* 4036A0 E01182A0 E6000000 */ swc1 $f0, 0x0($s0) /* 4036A4 E01182A4 8E620008 */ lw $v0, 0x8($s3) /* 4036A8 E01182A8 0222102A */ slt $v0, $s1, $v0 /* 4036AC E01182AC 1440FF92 */ bnez $v0, .LE01180F8 /* 4036B0 E01182B0 2610003C */ addiu $s0, $s0, 0x3C .LE01182B4: /* 4036B4 E01182B4 0260102D */ daddu $v0, $s3, $zero /* 4036B8 E01182B8 8FBF0038 */ lw $ra, 0x38($sp) /* 4036BC E01182BC 8FB30034 */ lw $s3, 0x34($sp) /* 4036C0 E01182C0 8FB20030 */ lw $s2, 0x30($sp) /* 4036C4 E01182C4 8FB1002C */ lw $s1, 0x2C($sp) /* 4036C8 E01182C8 8FB00028 */ lw $s0, 0x28($sp) /* 4036CC E01182CC D7BE0068 */ ldc1 $f30, 0x68($sp) /* 4036D0 E01182D0 D7BC0060 */ ldc1 $f28, 0x60($sp) /* 4036D4 E01182D4 D7BA0058 */ ldc1 $f26, 0x58($sp) /* 4036D8 E01182D8 D7B80050 */ ldc1 $f24, 0x50($sp) /* 4036DC E01182DC D7B60048 */ ldc1 $f22, 0x48($sp) /* 4036E0 E01182E0 D7B40040 */ ldc1 $f20, 0x40($sp) /* 4036E4 E01182E4 03E00008 */ jr $ra /* 4036E8 E01182E8 27BD0070 */ addiu $sp, $sp, 0x70 ### DECOMPILED C INSTRUCTIONS: EffectInstance* breaking_junk_main(s32 arg0, f32 x, f32 y, f32 z, f32 scale, s32 time) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; BreakingJunkFXData* data; s32 numParts = 6; u32 g; s32 i; bp.unk_00 = 0; bp.init = breaking_junk_init; bp.update = breaking_junk_update; bp.renderWorld = breaking_junk_render; bp.renderUI = NULL; bp.effectID = EFFECT_BREAKING_JUNK; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; data = effect->data.breakingJunk = shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(effect->data.breakingJunk != NULL); data->unk_00 = arg0; data->lifeTime = 0; if (time <= 0) { data->timeLeft = 1000; } else { data->timeLeft = time; } data->primA = 255; for (i = 0; i < effect->numParts; i++, data++) { data->pos.x = x; data->pos.y = y; data->pos.z = z; data->vel.x = (shim_rand_int(10) - 5) * 0.5; data->vel.y = (shim_rand_int(5) + 1) * 0.8; data->vel.z = (shim_rand_int(10) - 5) * 0.5; data->scale = scale; data->primR = data->envR = shim_rand_int(255); g = shim_rand_int(255 - data->envR); data->primG = data->envG = g; data->primB = data->envB = (255 - g) - data->envR; data->primR += 168; data->primG += 168; data->primB += 168; if (data->primR > 255) { data->primR = 255; } if (data->primG > 255) { data->primG = 255; } if (data->primB > 255) { data->primB = 255; } data->envR = data->envR * 0.6; data->envG = data->envG * 0.6; data->envB = data->envB * 0.6; data->rot = shim_rand_int(359); } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel step_game_loop /* 1B40 80026740 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 1B44 80026744 AFBF0018 */ sw $ra, 0x18($sp) /* 1B48 80026748 AFB10014 */ sw $s1, 0x14($sp) /* 1B4C 8002674C 0C00A21D */ jal update_input /* 1B50 80026750 AFB00010 */ sw $s0, 0x10($sp) /* 1B54 80026754 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 1B58 80026758 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 1B5C 8002675C 3C040CDF */ lui $a0, (0xCDFE5FF >> 16) /* 1B60 80026760 94620134 */ lhu $v0, 0x134($v1) /* 1B64 80026764 3C108011 */ lui $s0, %hi(gPlayerData) /* 1B68 80026768 2610F290 */ addiu $s0, $s0, %lo(gPlayerData) /* 1B6C 8002676C 24420001 */ addiu $v0, $v0, 0x1 /* 1B70 80026770 A4620134 */ sh $v0, 0x134($v1) /* 1B74 80026774 8E0202BC */ lw $v0, 0x2BC($s0) /* 1B78 80026778 3484E5FF */ ori $a0, $a0, (0xCDFE5FF & 0xFFFF) /* 1B7C 8002677C 24420002 */ addiu $v0, $v0, 0x2 /* 1B80 80026780 AE0202BC */ sw $v0, 0x2BC($s0) /* 1B84 80026784 0082102B */ sltu $v0, $a0, $v0 /* 1B88 80026788 54400001 */ bnel $v0, $zero, .L80026790 /* 1B8C 8002678C AE0402BC */ sw $a0, 0x2BC($s0) .L80026790: /* 1B90 80026790 0C00A3E3 */ jal update_max_rumble_duration /* 1B94 80026794 00000000 */ nop /* 1B98 80026798 3C048007 */ lui $a0, %hi(gGameStepDelayCount) /* 1B9C 8002679C 24844021 */ addiu $a0, $a0, %lo(gGameStepDelayCount) /* 1BA0 800267A0 80820000 */ lb $v0, 0x0($a0) /* 1BA4 800267A4 90830000 */ lbu $v1, 0x0($a0) /* 1BA8 800267A8 10400008 */ beqz $v0, .L800267CC /* 1BAC 800267AC 2462FFFF */ addiu $v0, $v1, -0x1 /* 1BB0 800267B0 A0820000 */ sb $v0, 0x0($a0) /* 1BB4 800267B4 00021600 */ sll $v0, $v0, 24 /* 1BB8 800267B8 14400087 */ bnez $v0, .L800269D8 /* 1BBC 800267BC 00000000 */ nop /* 1BC0 800267C0 3C028007 */ lui $v0, %hi(gGameStepDelayAmount) /* 1BC4 800267C4 90424020 */ lbu $v0, %lo(gGameStepDelayAmount)($v0) /* 1BC8 800267C8 A0820000 */ sb $v0, 0x0($a0) .L800267CC: /* 1BCC 800267CC 0C046EBA */ jal func_8011BAE8 /* 1BD0 800267D0 00000000 */ nop /* 1BD4 800267D4 0C00E15F */ jal npc_iter_no_op /* 1BD8 800267D8 00000000 */ nop /* 1BDC 800267DC 0C048D01 */ jal update_workers /* 1BE0 800267E0 00000000 */ nop /* 1BE4 800267E4 0C051618 */ jal update_triggers /* 1BE8 800267E8 00000000 */ nop /* 1BEC 800267EC 0C0B0F5D */ jal update_scripts /* 1BF0 800267F0 00000000 */ nop /* 1BF4 800267F4 0C048DF6 */ jal update_messages /* 1BF8 800267F8 00000000 */ nop /* 1BFC 800267FC 0C050584 */ jal update_hud_elements /* 1C00 80026800 00000000 */ nop /* 1C04 80026804 0C044B9E */ jal step_current_game_mode /* 1C08 80026808 00000000 */ nop /* 1C0C 8002680C 0C043DB4 */ jal update_entities /* 1C10 80026810 00000000 */ nop /* 1C14 80026814 0C04E066 */ jal func_80138198 /* 1C18 80026818 00000000 */ nop /* 1C1C 8002681C 0C052952 */ jal bgm_update_music_settings /* 1C20 80026820 00000000 */ nop /* 1C24 80026824 0C051C99 */ jal update_ambient_sounds /* 1C28 80026828 00000000 */ nop /* 1C2C 8002682C 0C0525CD */ jal sfx_update_env_sound_params /* 1C30 80026830 00000000 */ nop /* 1C34 80026834 0C051D05 */ jal update_windows /* 1C38 80026838 00000000 */ nop /* 1C3C 8002683C 0C00AE9E */ jal update_curtains /* 1C40 80026840 00000000 */ nop /* 1C44 80026844 3C10800A */ lui $s0, %hi(gOverrideFlags) /* 1C48 80026848 2610A650 */ addiu $s0, $s0, %lo(gOverrideFlags) /* 1C4C 8002684C 8E040000 */ lw $a0, 0x0($s0) /* 1C50 80026850 30820020 */ andi $v0, $a0, 0x20 /* 1C54 80026854 10400035 */ beqz $v0, .L8002692C /* 1C58 80026858 00000000 */ nop /* 1C5C 8002685C 3C118007 */ lui $s1, %hi(D_800741A2) /* 1C60 80026860 263141A2 */ addiu $s1, $s1, %lo(D_800741A2) /* 1C64 80026864 86230000 */ lh $v1, 0x0($s1) /* 1C68 80026868 10600005 */ beqz $v1, .L80026880 /* 1C6C 8002686C 24020001 */ addiu $v0, $zero, 0x1 /* 1C70 80026870 1062001C */ beq $v1, $v0, .L800268E4 /* 1C74 80026874 34840008 */ ori $a0, $a0, 0x8 /* 1C78 80026878 08009A4F */ j .L8002693C /* 1C7C 8002687C 00000000 */ nop .L80026880: /* 1C80 80026880 34820200 */ ori $v0, $a0, 0x200 /* 1C84 80026884 0C03805E */ jal disable_player_input /* 1C88 80026888 AE020000 */ sw $v0, 0x0($s0) /* 1C8C 8002688C 3C048007 */ lui $a0, %hi(D_800741A0) /* 1C90 80026890 248441A0 */ addiu $a0, $a0, %lo(D_800741A0) /* 1C94 80026894 240500FF */ addiu $a1, $zero, 0xFF /* 1C98 80026898 84820000 */ lh $v0, 0x0($a0) /* 1C9C 8002689C 94830000 */ lhu $v1, 0x0($a0) /* 1CA0 800268A0 14450008 */ bne $v0, $a1, .L800268C4 /* 1CA4 800268A4 2462000A */ addiu $v0, $v1, 0xA /* 1CA8 800268A8 24020001 */ addiu $v0, $zero, 0x1 /* 1CAC 800268AC A6220000 */ sh $v0, 0x0($s1) /* 1CB0 800268B0 24020003 */ addiu $v0, $zero, 0x3 /* 1CB4 800268B4 3C01800A */ lui $at, %hi(D_8009A690) /* 1CB8 800268B8 A422A690 */ sh $v0, %lo(D_8009A690)($at) /* 1CBC 800268BC 08009A4F */ j .L8002693C /* 1CC0 800268C0 00000000 */ nop .L800268C4: /* 1CC4 800268C4 A4820000 */ sh $v0, 0x0($a0) /* 1CC8 800268C8 00021400 */ sll $v0, $v0, 16 /* 1CCC 800268CC 00021403 */ sra $v0, $v0, 16 /* 1CD0 800268D0 28420100 */ slti $v0, $v0, 0x100 /* 1CD4 800268D4 50400019 */ beql $v0, $zero, .L8002693C /* 1CD8 800268D8 A4850000 */ sh $a1, 0x0($a0) /* 1CDC 800268DC 08009A4F */ j .L8002693C /* 1CE0 800268E0 00000000 */ nop .L800268E4: /* 1CE4 800268E4 3C02800A */ lui $v0, %hi(D_8009A690) /* 1CE8 800268E8 2442A690 */ addiu $v0, $v0, %lo(D_8009A690) /* 1CEC 800268EC 94430000 */ lhu $v1, 0x0($v0) /* 1CF0 800268F0 AE040000 */ sw $a0, 0x0($s0) /* 1CF4 800268F4 2463FFFF */ addiu $v1, $v1, -0x1 /* 1CF8 800268F8 A4430000 */ sh $v1, 0x0($v0) /* 1CFC 800268FC 00031C00 */ sll $v1, $v1, 16 /* 1D00 80026900 1460000E */ bnez $v1, .L8002693C /* 1D04 80026904 00000000 */ nop /* 1D08 80026908 0C05260E */ jal sfx_stop_env_sounds /* 1D0C 8002690C 00000000 */ nop /* 1D10 80026910 0C00CD3C */ jal set_game_mode /* 1D14 80026914 0000202D */ daddu $a0, $zero, $zero /* 1D18 80026918 8E020000 */ lw $v0, 0x0($s0) /* 1D1C 8002691C 2403FFDF */ addiu $v1, $zero, -0x21 /* 1D20 80026920 00431024 */ and $v0, $v0, $v1 /* 1D24 80026924 08009A4F */ j .L8002693C /* 1D28 80026928 AE020000 */ sw $v0, 0x0($s0) .L8002692C: /* 1D2C 8002692C 3C018007 */ lui $at, %hi(D_800741A0) /* 1D30 80026930 A42041A0 */ sh $zero, %lo(D_800741A0)($at) /* 1D34 80026934 3C018007 */ lui $at, %hi(D_800741A2) /* 1D38 80026938 A42041A2 */ sh $zero, %lo(D_800741A2)($at) .L8002693C: /* 1D3C 8002693C 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 1D40 80026940 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 1D44 80026944 8C830000 */ lw $v1, 0x0($a0) /* 1D48 80026948 30620100 */ andi $v0, $v1, 0x100 /* 1D4C 8002694C 14400003 */ bnez $v0, .L8002695C /* 1D50 80026950 34621000 */ ori $v0, $v1, 0x1000 /* 1D54 80026954 2402EFFF */ addiu $v0, $zero, -0x1001 /* 1D58 80026958 00621024 */ and $v0, $v1, $v0 .L8002695C: /* 1D5C 8002695C AC820000 */ sw $v0, 0x0($a0) /* 1D60 80026960 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 1D64 80026964 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 1D68 80026968 8C830000 */ lw $v1, 0x0($a0) /* 1D6C 8002696C 30620200 */ andi $v0, $v1, 0x200 /* 1D70 80026970 14400003 */ bnez $v0, .L80026980 /* 1D74 80026974 34622000 */ ori $v0, $v1, 0x2000 /* 1D78 80026978 2402DFFF */ addiu $v0, $zero, -0x2001 /* 1D7C 8002697C 00621024 */ and $v0, $v1, $v0 .L80026980: /* 1D80 80026980 AC820000 */ sw $v0, 0x0($a0) /* 1D84 80026984 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 1D88 80026988 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 1D8C 8002698C 8C830000 */ lw $v1, 0x0($a0) /* 1D90 80026990 30620400 */ andi $v0, $v1, 0x400 /* 1D94 80026994 14400003 */ bnez $v0, .L800269A4 /* 1D98 80026998 34624000 */ ori $v0, $v1, 0x4000 /* 1D9C 8002699C 2402BFFF */ addiu $v0, $zero, -0x4001 /* 1DA0 800269A0 00621024 */ and $v0, $v1, $v0 .L800269A4: /* 1DA4 800269A4 AC820000 */ sw $v0, 0x0($a0) /* 1DA8 800269A8 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 1DAC 800269AC 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 1DB0 800269B0 8C830000 */ lw $v1, 0x0($a0) /* 1DB4 800269B4 30620800 */ andi $v0, $v1, 0x800 /* 1DB8 800269B8 14400004 */ bnez $v0, .L800269CC /* 1DBC 800269BC 34628000 */ ori $v0, $v1, 0x8000 /* 1DC0 800269C0 3C02FFFF */ lui $v0, (0xFFFF7FFF >> 16) /* 1DC4 800269C4 34427FFF */ ori $v0, $v0, (0xFFFF7FFF & 0xFFFF) /* 1DC8 800269C8 00621024 */ and $v0, $v1, $v0 .L800269CC: /* 1DCC 800269CC AC820000 */ sw $v0, 0x0($a0) /* 1DD0 800269D0 0C00A67F */ jal rand_int /* 1DD4 800269D4 24040001 */ addiu $a0, $zero, 0x1 .L800269D8: /* 1DD8 800269D8 8FBF0018 */ lw $ra, 0x18($sp) /* 1DDC 800269DC 8FB10014 */ lw $s1, 0x14($sp) /* 1DE0 800269E0 8FB00010 */ lw $s0, 0x10($sp) /* 1DE4 800269E4 03E00008 */ jr $ra /* 1DE8 800269E8 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void step_game_loop(void) { PlayerData* playerData = &gPlayerData; const int MAX_GAME_TIME = 1000*60*60*60 - 1; // 1000 hours minus one frame at 60 fps #if !VERSION_JP update_input(); #endif gGameStatusPtr->frameCounter++; playerData->frameCounter += 2; if (playerData->frameCounter > MAX_GAME_TIME) { playerData->frameCounter = MAX_GAME_TIME; } #if VERSION_JP update_input(); #endif update_max_rumble_duration(); if (gGameStepDelayCount != 0) { gGameStepDelayCount-- ; if (gGameStepDelayCount == 0) { gGameStepDelayCount = gGameStepDelayAmount; } else { return; } } func_8011BAE8(); npc_iter_no_op(); update_workers(); update_triggers(); update_scripts(); update_messages(); update_hud_elements(); step_current_game_mode(); update_entities(); func_80138198(); bgm_update_music_settings(); update_ambient_sounds(); sfx_update_env_sound_params(); update_windows(); update_curtains(); if (gOverrideFlags & GLOBAL_OVERRIDES_ENABLE_TRANSITION_STENCIL) { switch (D_800741A2) { case 0: gOverrideFlags |= GLOBAL_OVERRIDES_200; disable_player_input(); if (D_800741A0 == 255) { D_800741A2 = 1; D_8009A690 = 3; } else { D_800741A0 += 10; if (D_800741A0 > 255) { D_800741A0 = 255; } } break; case 1: gOverrideFlags |= GLOBAL_OVERRIDES_8; D_8009A690--; if (D_8009A690 == 0) { sfx_stop_env_sounds(); set_game_mode(GAME_MODE_STARTUP); gOverrideFlags &= ~GLOBAL_OVERRIDES_ENABLE_TRANSITION_STENCIL; } break; } } else { D_800741A0 = 0; D_800741A2 = 0; } if (gOverrideFlags & GLOBAL_OVERRIDES_DISABLE_BATTLES) { gOverrideFlags |= GLOBAL_OVERRIDES_1000; } else { gOverrideFlags &= ~GLOBAL_OVERRIDES_1000; } if (gOverrideFlags & GLOBAL_OVERRIDES_200) { gOverrideFlags |= GLOBAL_OVERRIDES_2000; } else { gOverrideFlags &= ~GLOBAL_OVERRIDES_2000; } if (gOverrideFlags & GLOBAL_OVERRIDES_400) { gOverrideFlags |= GLOBAL_OVERRIDES_4000; } else { gOverrideFlags &= ~GLOBAL_OVERRIDES_4000; } if (gOverrideFlags & GLOBAL_OVERRIDES_800) { gOverrideFlags |= GLOBAL_OVERRIDES_8000; } else { gOverrideFlags &= ~GLOBAL_OVERRIDES_8000; } rand_int(1); }
### RAW ASSEMBLY INSTRUCTIONS: glabel merlin_house_stars_appendGfx /* 3A58F4 E00A63A4 27BDFF50 */ addiu $sp, $sp, -0xB0 /* 3A58F8 E00A63A8 0080182D */ daddu $v1, $a0, $zero /* 3A58FC E00A63AC 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 3A5900 E00A63B0 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 3A5904 E00A63B4 AFB10094 */ sw $s1, 0x94($sp) /* 3A5908 E00A63B8 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 3A590C E00A63BC 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 3A5910 E00A63C0 27A40010 */ addiu $a0, $sp, 0x10 /* 3A5914 E00A63C4 AFB600A8 */ sw $s6, 0xA8($sp) /* 3A5918 E00A63C8 3C16E700 */ lui $s6, (0xE7000000 >> 16) /* 3A591C E00A63CC AFBF00AC */ sw $ra, 0xAC($sp) /* 3A5920 E00A63D0 AFB500A4 */ sw $s5, 0xA4($sp) /* 3A5924 E00A63D4 AFB400A0 */ sw $s4, 0xA0($sp) /* 3A5928 E00A63D8 AFB3009C */ sw $s3, 0x9C($sp) /* 3A592C E00A63DC AFB20098 */ sw $s2, 0x98($sp) /* 3A5930 E00A63E0 AFB00090 */ sw $s0, 0x90($sp) /* 3A5934 E00A63E4 8E280000 */ lw $t0, 0x0($s1) /* 3A5938 E00A63E8 8C72000C */ lw $s2, 0xC($v1) /* 3A593C E00A63EC 0100102D */ daddu $v0, $t0, $zero /* 3A5940 E00A63F0 8E540018 */ lw $s4, 0x18($s2) /* 3A5944 E00A63F4 25080008 */ addiu $t0, $t0, 0x8 /* 3A5948 E00A63F8 AC560000 */ sw $s6, 0x0($v0) /* 3A594C E00A63FC AC400004 */ sw $zero, 0x4($v0) /* 3A5950 E00A6400 AD050000 */ sw $a1, 0x0($t0) /* 3A5954 E00A6404 8C620010 */ lw $v0, 0x10($v1) /* 3A5958 E00A6408 3C150001 */ lui $s5, (0x11630 >> 16) /* 3A595C E00A640C AE280000 */ sw $t0, 0x0($s1) /* 3A5960 E00A6410 8C42001C */ lw $v0, 0x1C($v0) /* 3A5964 E00A6414 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3A5968 E00A6418 00431021 */ addu $v0, $v0, $v1 /* 3A596C E00A641C AD020004 */ sw $v0, 0x4($t0) /* 3A5970 E00A6420 8E45000C */ lw $a1, 0xC($s2) /* 3A5974 E00A6424 8E460010 */ lw $a2, 0x10($s2) /* 3A5978 E00A6428 8E470014 */ lw $a3, 0x14($s2) /* 3A597C E00A642C 25080008 */ addiu $t0, $t0, 0x8 /* 3A5980 E00A6430 0C080108 */ jal shim_guTranslateF /* 3A5984 E00A6434 AE280000 */ sw $t0, 0x0($s1) /* 3A5988 E00A6438 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 3A598C E00A643C 3C013F75 */ lui $at, (0x3F75C28F >> 16) /* 3A5990 E00A6440 3421C28F */ ori $at, $at, (0x3F75C28F & 0xFFFF) /* 3A5994 E00A6444 44810000 */ mtc1 $at, $f0 /* 3A5998 E00A6448 27B00050 */ addiu $s0, $sp, 0x50 /* 3A599C E00A644C 44050000 */ mfc1 $a1, $f0 /* 3A59A0 E00A6450 0200202D */ daddu $a0, $s0, $zero /* 3A59A4 E00A6454 00A0302D */ daddu $a2, $a1, $zero /* 3A59A8 E00A6458 0C080110 */ jal shim_guScaleF /* 3A59AC E00A645C 00A0382D */ daddu $a3, $a1, $zero /* 3A59B0 E00A6460 0200202D */ daddu $a0, $s0, $zero /* 3A59B4 E00A6464 27A50010 */ addiu $a1, $sp, 0x10 /* 3A59B8 E00A6468 0C080114 */ jal shim_guMtxCatF /* 3A59BC E00A646C 00A0302D */ daddu $a2, $a1, $zero /* 3A59C0 E00A6470 27A40010 */ addiu $a0, $sp, 0x10 /* 3A59C4 E00A6474 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3A59C8 E00A6478 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3A59CC E00A647C 3C13800A */ lui $s3, %hi(gDisplayContext) /* 3A59D0 E00A6480 2673A674 */ addiu $s3, $s3, %lo(gDisplayContext) /* 3A59D4 E00A6484 96050000 */ lhu $a1, 0x0($s0) /* 3A59D8 E00A6488 8E620000 */ lw $v0, 0x0($s3) /* 3A59DC E00A648C 00052980 */ sll $a1, $a1, 6 /* 3A59E0 E00A6490 00B52821 */ addu $a1, $a1, $s5 /* 3A59E4 E00A6494 0C080118 */ jal shim_guMtxF2L /* 3A59E8 E00A6498 00452821 */ addu $a1, $v0, $a1 /* 3A59EC E00A649C 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3A59F0 E00A64A0 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3A59F4 E00A64A4 3C07FCFF */ lui $a3, (0xFCFFA7FF >> 16) /* 3A59F8 E00A64A8 34E7A7FF */ ori $a3, $a3, (0xFCFFA7FF & 0xFFFF) /* 3A59FC E00A64AC 3C06FF17 */ lui $a2, (0xFF17723F >> 16) /* 3A5A00 E00A64B0 34C6723F */ ori $a2, $a2, (0xFF17723F & 0xFFFF) /* 3A5A04 E00A64B4 3C08D838 */ lui $t0, (0xD8380002 >> 16) /* 3A5A08 E00A64B8 35080002 */ ori $t0, $t0, (0xD8380002 & 0xFFFF) /* 3A5A0C E00A64BC 329400FF */ andi $s4, $s4, 0xFF /* 3A5A10 E00A64C0 8E250000 */ lw $a1, 0x0($s1) /* 3A5A14 E00A64C4 96020000 */ lhu $v0, 0x0($s0) /* 3A5A18 E00A64C8 3C014080 */ lui $at, (0x40800000 >> 16) /* 3A5A1C E00A64CC 44812000 */ mtc1 $at, $f4 /* 3A5A20 E00A64D0 00A0202D */ daddu $a0, $a1, $zero /* 3A5A24 E00A64D4 24A50008 */ addiu $a1, $a1, 0x8 /* 3A5A28 E00A64D8 AE250000 */ sw $a1, 0x0($s1) /* 3A5A2C E00A64DC AC830000 */ sw $v1, 0x0($a0) /* 3A5A30 E00A64E0 24430001 */ addiu $v1, $v0, 0x1 /* 3A5A34 E00A64E4 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3A5A38 E00A64E8 00021180 */ sll $v0, $v0, 6 /* 3A5A3C E00A64EC A6030000 */ sh $v1, 0x0($s0) /* 3A5A40 E00A64F0 8E630000 */ lw $v1, 0x0($s3) /* 3A5A44 E00A64F4 00551021 */ addu $v0, $v0, $s5 /* 3A5A48 E00A64F8 00621821 */ addu $v1, $v1, $v0 /* 3A5A4C E00A64FC 24A20008 */ addiu $v0, $a1, 0x8 /* 3A5A50 E00A6500 AC830004 */ sw $v1, 0x4($a0) /* 3A5A54 E00A6504 AE220000 */ sw $v0, 0x0($s1) /* 3A5A58 E00A6508 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3A5A5C E00A650C ACA20000 */ sw $v0, 0x0($a1) /* 3A5A60 E00A6510 2402007F */ addiu $v0, $zero, 0x7F /* 3A5A64 E00A6514 ACA20004 */ sw $v0, 0x4($a1) /* 3A5A68 E00A6518 24A20010 */ addiu $v0, $a1, 0x10 /* 3A5A6C E00A651C AE220000 */ sw $v0, 0x0($s1) /* 3A5A70 E00A6520 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3A5A74 E00A6524 ACA60014 */ sw $a2, 0x14($a1) /* 3A5A78 E00A6528 3C06DE00 */ lui $a2, (0xDE000000 >> 16) /* 3A5A7C E00A652C ACA20008 */ sw $v0, 0x8($a1) /* 3A5A80 E00A6530 3C020900 */ lui $v0, %hi(D_09001000_40E290) /* 3A5A84 E00A6534 24421000 */ addiu $v0, $v0, %lo(D_09001000_40E290) /* 3A5A88 E00A6538 ACB4000C */ sw $s4, 0xC($a1) /* 3A5A8C E00A653C ACA70010 */ sw $a3, 0x10($a1) /* 3A5A90 E00A6540 ACA60018 */ sw $a2, 0x18($a1) /* 3A5A94 E00A6544 ACA2001C */ sw $v0, 0x1C($a1) /* 3A5A98 E00A6548 C642001C */ lwc1 $f2, 0x1C($s2) /* 3A5A9C E00A654C 24A20018 */ addiu $v0, $a1, 0x18 /* 3A5AA0 E00A6550 AE220000 */ sw $v0, 0x0($s1) /* 3A5AA4 E00A6554 24A20020 */ addiu $v0, $a1, 0x20 /* 3A5AA8 E00A6558 46041082 */ mul.s $f2, $f2, $f4 /* 3A5AAC E00A655C 00000000 */ nop /* 3A5AB0 E00A6560 AE220000 */ sw $v0, 0x0($s1) /* 3A5AB4 E00A6564 C6400020 */ lwc1 $f0, 0x20($s2) /* 3A5AB8 E00A6568 24A20028 */ addiu $v0, $a1, 0x28 /* 3A5ABC E00A656C AE220000 */ sw $v0, 0x0($s1) /* 3A5AC0 E00A6570 46040002 */ mul.s $f0, $f0, $f4 /* 3A5AC4 E00A6574 00000000 */ nop /* 3A5AC8 E00A6578 24A20030 */ addiu $v0, $a1, 0x30 /* 3A5ACC E00A657C 3C04F200 */ lui $a0, (0xF2000000 >> 16) /* 3A5AD0 E00A6580 AE220000 */ sw $v0, 0x0($s1) /* 3A5AD4 E00A6584 4600118D */ trunc.w.s $f6, $f2 /* 3A5AD8 E00A6588 44073000 */ mfc1 $a3, $f6 /* 3A5ADC E00A658C 4600018D */ trunc.w.s $f6, $f0 /* 3A5AE0 E00A6590 44093000 */ mfc1 $t1, $f6 /* 3A5AE4 E00A6594 30E30FFF */ andi $v1, $a3, 0xFFF /* 3A5AE8 E00A6598 00031B00 */ sll $v1, $v1, 12 /* 3A5AEC E00A659C 31220FFF */ andi $v0, $t1, 0xFFF /* 3A5AF0 E00A65A0 00441025 */ or $v0, $v0, $a0 /* 3A5AF4 E00A65A4 00621825 */ or $v1, $v1, $v0 /* 3A5AF8 E00A65A8 24E200FC */ addiu $v0, $a3, 0xFC /* 3A5AFC E00A65AC 30420FFF */ andi $v0, $v0, 0xFFF /* 3A5B00 E00A65B0 00021300 */ sll $v0, $v0, 12 /* 3A5B04 E00A65B4 ACA30020 */ sw $v1, 0x20($a1) /* 3A5B08 E00A65B8 252300FC */ addiu $v1, $t1, 0xFC /* 3A5B0C E00A65BC 30630FFF */ andi $v1, $v1, 0xFFF /* 3A5B10 E00A65C0 00431025 */ or $v0, $v0, $v1 /* 3A5B14 E00A65C4 ACA20024 */ sw $v0, 0x24($a1) /* 3A5B18 E00A65C8 C6420024 */ lwc1 $f2, 0x24($s2) /* 3A5B1C E00A65CC 24A20038 */ addiu $v0, $a1, 0x38 /* 3A5B20 E00A65D0 46041082 */ mul.s $f2, $f2, $f4 /* 3A5B24 E00A65D4 00000000 */ nop /* 3A5B28 E00A65D8 AE220000 */ sw $v0, 0x0($s1) /* 3A5B2C E00A65DC C6400028 */ lwc1 $f0, 0x28($s2) /* 3A5B30 E00A65E0 24A20040 */ addiu $v0, $a1, 0x40 /* 3A5B34 E00A65E4 AE220000 */ sw $v0, 0x0($s1) /* 3A5B38 E00A65E8 46040002 */ mul.s $f0, $f0, $f4 /* 3A5B3C E00A65EC 00000000 */ nop /* 3A5B40 E00A65F0 3C020900 */ lui $v0, %hi(D_09001418_40E6A8) /* 3A5B44 E00A65F4 24421418 */ addiu $v0, $v0, %lo(D_09001418_40E6A8) /* 3A5B48 E00A65F8 ACA60030 */ sw $a2, 0x30($a1) /* 3A5B4C E00A65FC ACA20034 */ sw $v0, 0x34($a1) /* 3A5B50 E00A6600 4600118D */ trunc.w.s $f6, $f2 /* 3A5B54 E00A6604 44073000 */ mfc1 $a3, $f6 /* 3A5B58 E00A6608 4600018D */ trunc.w.s $f6, $f0 /* 3A5B5C E00A660C 44093000 */ mfc1 $t1, $f6 /* 3A5B60 E00A6610 30E30FFF */ andi $v1, $a3, 0xFFF /* 3A5B64 E00A6614 00031B00 */ sll $v1, $v1, 12 /* 3A5B68 E00A6618 31220FFF */ andi $v0, $t1, 0xFFF /* 3A5B6C E00A661C 00441025 */ or $v0, $v0, $a0 /* 3A5B70 E00A6620 00621825 */ or $v1, $v1, $v0 /* 3A5B74 E00A6624 24E200FC */ addiu $v0, $a3, 0xFC /* 3A5B78 E00A6628 30420FFF */ andi $v0, $v0, 0xFFF /* 3A5B7C E00A662C 00021300 */ sll $v0, $v0, 12 /* 3A5B80 E00A6630 ACA30028 */ sw $v1, 0x28($a1) /* 3A5B84 E00A6634 252300FC */ addiu $v1, $t1, 0xFC /* 3A5B88 E00A6638 30630FFF */ andi $v1, $v1, 0xFFF /* 3A5B8C E00A663C 3C040100 */ lui $a0, (0x1000000 >> 16) /* 3A5B90 E00A6640 00641825 */ or $v1, $v1, $a0 /* 3A5B94 E00A6644 00431025 */ or $v0, $v0, $v1 /* 3A5B98 E00A6648 ACA2002C */ sw $v0, 0x2C($a1) /* 3A5B9C E00A664C 24020040 */ addiu $v0, $zero, 0x40 /* 3A5BA0 E00A6650 ACA80038 */ sw $t0, 0x38($a1) /* 3A5BA4 E00A6654 ACA2003C */ sw $v0, 0x3C($a1) /* 3A5BA8 E00A6658 24A20048 */ addiu $v0, $a1, 0x48 /* 3A5BAC E00A665C AE220000 */ sw $v0, 0x0($s1) /* 3A5BB0 E00A6660 ACB60040 */ sw $s6, 0x40($a1) /* 3A5BB4 E00A6664 ACA00044 */ sw $zero, 0x44($a1) /* 3A5BB8 E00A6668 8FBF00AC */ lw $ra, 0xAC($sp) /* 3A5BBC E00A666C 8FB600A8 */ lw $s6, 0xA8($sp) /* 3A5BC0 E00A6670 8FB500A4 */ lw $s5, 0xA4($sp) /* 3A5BC4 E00A6674 8FB400A0 */ lw $s4, 0xA0($sp) /* 3A5BC8 E00A6678 8FB3009C */ lw $s3, 0x9C($sp) /* 3A5BCC E00A667C 8FB20098 */ lw $s2, 0x98($sp) /* 3A5BD0 E00A6680 8FB10094 */ lw $s1, 0x94($sp) /* 3A5BD4 E00A6684 8FB00090 */ lw $s0, 0x90($sp) /* 3A5BD8 E00A6688 03E00008 */ jr $ra /* 3A5BDC E00A668C 27BD00B0 */ addiu $sp, $sp, 0xB0 ### DECOMPILED C INSTRUCTIONS: void merlin_house_stars_appendGfx(void* effect) { MerlinHouseStarsFXData* data = ((EffectInstance*)effect)->data.merlinHouseStars; s32 unk_18 = data->unk_18; Matrix4f sp10; Matrix4f sp50; s32 uls; s32 ult; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp10, data->unk_0C, data->unk_10, data->unk_14); shim_guScaleF(sp50, 0.96f, 0.96f, 0.96f); shim_guMtxCatF(sp50, sp10, sp10); shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 127); gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, unk_18); gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 1, TEXEL1, 0, PRIMITIVE, TEXEL0, 0, 0, 0, COMBINED, COMBINED, 0, ENVIRONMENT, 0); gSPDisplayList(gMainGfxPos++, D_09001000_3A6BE0); uls = data->unk_1C * 4.0f; ult = data->unk_20 * 4.0f; gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 252, ult + 252); uls = data->unk_24 * 4.0f; ult = data->unk_28 * 4.0f; gDPSetTileSize(gMainGfxPos++, 1, uls, ult, uls + 252, ult + 252); gSPDisplayList(gMainGfxPos++, D_09001418_3A6FF8); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel big_snowflakes_appendGfx /* 3635B0 E0060450 27BDFEF0 */ addiu $sp, $sp, -0x110 /* 3635B4 E0060454 3C02DB06 */ lui $v0, (0xDB060024 >> 16) /* 3635B8 E0060458 34420024 */ ori $v0, $v0, (0xDB060024 & 0xFFFF) /* 3635BC E006045C AFB400E8 */ sw $s4, 0xE8($sp) /* 3635C0 E0060460 3C14800A */ lui $s4, %hi(gMainGfxPos) /* 3635C4 E0060464 2694A66C */ addiu $s4, $s4, %lo(gMainGfxPos) /* 3635C8 E0060468 AFBF00FC */ sw $ra, 0xFC($sp) /* 3635CC E006046C AFBE00F8 */ sw $fp, 0xF8($sp) /* 3635D0 E0060470 AFB700F4 */ sw $s7, 0xF4($sp) /* 3635D4 E0060474 AFB600F0 */ sw $s6, 0xF0($sp) /* 3635D8 E0060478 AFB500EC */ sw $s5, 0xEC($sp) /* 3635DC E006047C AFB300E4 */ sw $s3, 0xE4($sp) /* 3635E0 E0060480 AFB200E0 */ sw $s2, 0xE0($sp) /* 3635E4 E0060484 AFB100DC */ sw $s1, 0xDC($sp) /* 3635E8 E0060488 AFB000D8 */ sw $s0, 0xD8($sp) /* 3635EC E006048C F7B60108 */ sdc1 $f22, 0x108($sp) /* 3635F0 E0060490 F7B40100 */ sdc1 $f20, 0x100($sp) /* 3635F4 E0060494 AFA40110 */ sw $a0, 0x110($sp) /* 3635F8 E0060498 8E850000 */ lw $a1, 0x0($s4) /* 3635FC E006049C 8C90000C */ lw $s0, 0xC($a0) /* 363600 E00604A0 3C06E006 */ lui $a2, (0xE0060738 >> 16) /* 363604 E00604A4 8CC60738 */ lw $a2, (0xE0060738 & 0xFFFF)($a2) /* 363608 E00604A8 00A0202D */ daddu $a0, $a1, $zero /* 36360C E00604AC 24A50008 */ addiu $a1, $a1, 0x8 /* 363610 E00604B0 AE850000 */ sw $a1, 0x0($s4) /* 363614 E00604B4 AC820000 */ sw $v0, 0x0($a0) /* 363618 E00604B8 24A20008 */ addiu $v0, $a1, 0x8 /* 36361C E00604BC AE820000 */ sw $v0, 0x0($s4) /* 363620 E00604C0 8FA80110 */ lw $t0, 0x110($sp) /* 363624 E00604C4 3C071464 */ lui $a3, (0x14641400 >> 16) /* 363628 E00604C8 8D030010 */ lw $v1, 0x10($t0) /* 36362C E00604CC 24A20010 */ addiu $v0, $a1, 0x10 /* 363630 E00604D0 AE820000 */ sw $v0, 0x0($s4) /* 363634 E00604D4 8C62001C */ lw $v0, 0x1C($v1) /* 363638 E00604D8 3C038000 */ lui $v1, (0x80000000 >> 16) /* 36363C E00604DC 00431021 */ addu $v0, $v0, $v1 /* 363640 E00604E0 AC820004 */ sw $v0, 0x4($a0) /* 363644 E00604E4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 363648 E00604E8 ACA20000 */ sw $v0, 0x0($a1) /* 36364C E00604EC 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 363650 E00604F0 ACA60004 */ sw $a2, 0x4($a1) /* 363654 E00604F4 ACA20008 */ sw $v0, 0x8($a1) /* 363658 E00604F8 92020027 */ lbu $v0, 0x27($s0) /* 36365C E00604FC 34E71400 */ ori $a3, $a3, (0x14641400 & 0xFFFF) /* 363660 E0060500 00471025 */ or $v0, $v0, $a3 /* 363664 E0060504 ACA2000C */ sw $v0, 0xC($a1) /* 363668 E0060508 8E050004 */ lw $a1, 0x4($s0) /* 36366C E006050C 8E060008 */ lw $a2, 0x8($s0) /* 363670 E0060510 8E07000C */ lw $a3, 0xC($s0) /* 363674 E0060514 0C080108 */ jal shim_guTranslateF /* 363678 E0060518 27A40018 */ addiu $a0, $sp, 0x18 /* 36367C E006051C 27B10058 */ addiu $s1, $sp, 0x58 /* 363680 E0060520 4480A000 */ mtc1 $zero, $f20 /* 363684 E0060524 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 363688 E0060528 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 36368C E006052C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 363690 E0060530 4481B000 */ mtc1 $at, $f22 /* 363694 E0060534 00031080 */ sll $v0, $v1, 2 /* 363698 E0060538 00431021 */ addu $v0, $v0, $v1 /* 36369C E006053C 00021080 */ sll $v0, $v0, 2 /* 3636A0 E0060540 00431023 */ subu $v0, $v0, $v1 /* 3636A4 E0060544 000218C0 */ sll $v1, $v0, 3 /* 3636A8 E0060548 00431021 */ addu $v0, $v0, $v1 /* 3636AC E006054C 000210C0 */ sll $v0, $v0, 3 /* 3636B0 E0060550 4406A000 */ mfc1 $a2, $f20 /* 3636B4 E0060554 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3636B8 E0060558 00220821 */ addu $at, $at, $v0 /* 3636BC E006055C C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 3636C0 E0060560 4407B000 */ mfc1 $a3, $f22 /* 3636C4 E0060564 46000007 */ neg.s $f0, $f0 /* 3636C8 E0060568 44050000 */ mfc1 $a1, $f0 /* 3636CC E006056C 0220202D */ daddu $a0, $s1, $zero /* 3636D0 E0060570 0C080104 */ jal shim_guRotateF /* 3636D4 E0060574 E7B40010 */ swc1 $f20, 0x10($sp) /* 3636D8 E0060578 0220202D */ daddu $a0, $s1, $zero /* 3636DC E006057C 27A50018 */ addiu $a1, $sp, 0x18 /* 3636E0 E0060580 0C080114 */ jal shim_guMtxCatF /* 3636E4 E0060584 27A60098 */ addiu $a2, $sp, 0x98 /* 3636E8 E0060588 8FA80110 */ lw $t0, 0x110($sp) /* 3636EC E006058C 24130001 */ addiu $s3, $zero, 0x1 /* 3636F0 E0060590 8D020008 */ lw $v0, 0x8($t0) /* 3636F4 E0060594 0262102A */ slt $v0, $s3, $v0 /* 3636F8 E0060598 10400056 */ beqz $v0, .LE00606F4 /* 3636FC E006059C 26100030 */ addiu $s0, $s0, 0x30 /* 363700 E00605A0 0220902D */ daddu $s2, $s1, $zero /* 363704 E00605A4 3C1E800A */ lui $fp, %hi(gDisplayContext) /* 363708 E00605A8 27DEA674 */ addiu $fp, $fp, %lo(gDisplayContext) /* 36370C E00605AC 3C178007 */ lui $s7, %hi(gMatrixListPos) /* 363710 E00605B0 26F741F0 */ addiu $s7, $s7, %lo(gMatrixListPos) /* 363714 E00605B4 3C160001 */ lui $s6, (0x11630 >> 16) /* 363718 E00605B8 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 36371C E00605BC 26110020 */ addiu $s1, $s0, 0x20 .LE00605C0: /* 363720 E00605C0 32700001 */ andi $s0, $s3, 0x1 /* 363724 E00605C4 00101080 */ sll $v0, $s0, 2 /* 363728 E00605C8 3C08E006 */ lui $t0, %hi(D_E0060730) /* 36372C E00605CC 25080730 */ addiu $t0, $t0, %lo(D_E0060730) /* 363730 E00605D0 00481021 */ addu $v0, $v0, $t0 /* 363734 E00605D4 8E25FFE4 */ lw $a1, -0x1C($s1) /* 363738 E00605D8 8E26FFE8 */ lw $a2, -0x18($s1) /* 36373C E00605DC 8E27FFEC */ lw $a3, -0x14($s1) /* 363740 E00605E0 8C550000 */ lw $s5, 0x0($v0) /* 363744 E00605E4 0C080108 */ jal shim_guTranslateF /* 363748 E00605E8 0240202D */ daddu $a0, $s2, $zero /* 36374C E00605EC 0240202D */ daddu $a0, $s2, $zero /* 363750 E00605F0 27A50098 */ addiu $a1, $sp, 0x98 /* 363754 E00605F4 0C080114 */ jal shim_guMtxCatF /* 363758 E00605F8 27A60018 */ addiu $a2, $sp, 0x18 /* 36375C E00605FC 56000016 */ bnel $s0, $zero, .LE0060658 /* 363760 E0060600 27A40018 */ addiu $a0, $sp, 0x18 /* 363764 E0060604 E7B60010 */ swc1 $f22, 0x10($sp) /* 363768 E0060608 8E25FFF8 */ lw $a1, -0x8($s1) /* 36376C E006060C 4406A000 */ mfc1 $a2, $f20 /* 363770 E0060610 4407A000 */ mfc1 $a3, $f20 /* 363774 E0060614 0C080104 */ jal shim_guRotateF /* 363778 E0060618 0240202D */ daddu $a0, $s2, $zero /* 36377C E006061C 0240202D */ daddu $a0, $s2, $zero /* 363780 E0060620 27A50018 */ addiu $a1, $sp, 0x18 /* 363784 E0060624 0C080114 */ jal shim_guMtxCatF /* 363788 E0060628 00A0302D */ daddu $a2, $a1, $zero /* 36378C E006062C E7B40010 */ swc1 $f20, 0x10($sp) /* 363790 E0060630 8E250000 */ lw $a1, 0x0($s1) /* 363794 E0060634 4406A000 */ mfc1 $a2, $f20 /* 363798 E0060638 4407B000 */ mfc1 $a3, $f22 /* 36379C E006063C 0C080104 */ jal shim_guRotateF /* 3637A0 E0060640 0240202D */ daddu $a0, $s2, $zero /* 3637A4 E0060644 0240202D */ daddu $a0, $s2, $zero /* 3637A8 E0060648 27A50018 */ addiu $a1, $sp, 0x18 /* 3637AC E006064C 0C080114 */ jal shim_guMtxCatF /* 3637B0 E0060650 00A0302D */ daddu $a2, $a1, $zero /* 3637B4 E0060654 27A40018 */ addiu $a0, $sp, 0x18 .LE0060658: /* 3637B8 E0060658 26730001 */ addiu $s3, $s3, 0x1 /* 3637BC E006065C 96E50000 */ lhu $a1, 0x0($s7) /* 3637C0 E0060660 8FC20000 */ lw $v0, 0x0($fp) /* 3637C4 E0060664 00052980 */ sll $a1, $a1, 6 /* 3637C8 E0060668 00B62821 */ addu $a1, $a1, $s6 /* 3637CC E006066C 0C080118 */ jal shim_guMtxF2L /* 3637D0 E0060670 00452821 */ addu $a1, $v0, $a1 /* 3637D4 E0060674 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 3637D8 E0060678 8E840000 */ lw $a0, 0x0($s4) /* 3637DC E006067C 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 3637E0 E0060680 0080282D */ daddu $a1, $a0, $zero /* 3637E4 E0060684 24840008 */ addiu $a0, $a0, 0x8 /* 3637E8 E0060688 AE840000 */ sw $a0, 0x0($s4) /* 3637EC E006068C 96E20000 */ lhu $v0, 0x0($s7) /* 3637F0 E0060690 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3637F4 E0060694 ACA30000 */ sw $v1, 0x0($a1) /* 3637F8 E0060698 24430001 */ addiu $v1, $v0, 0x1 /* 3637FC E006069C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 363800 E00606A0 00021180 */ sll $v0, $v0, 6 /* 363804 E00606A4 A6E30000 */ sh $v1, 0x0($s7) /* 363808 E00606A8 8FC30000 */ lw $v1, 0x0($fp) /* 36380C E00606AC 00561021 */ addu $v0, $v0, $s6 /* 363810 E00606B0 00621821 */ addu $v1, $v1, $v0 /* 363814 E00606B4 24820008 */ addiu $v0, $a0, 0x8 /* 363818 E00606B8 ACA30004 */ sw $v1, 0x4($a1) /* 36381C E00606BC AE820000 */ sw $v0, 0x0($s4) /* 363820 E00606C0 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 363824 E00606C4 AC820000 */ sw $v0, 0x0($a0) /* 363828 E00606C8 24020040 */ addiu $v0, $zero, 0x40 /* 36382C E00606CC AC950004 */ sw $s5, 0x4($a0) /* 363830 E00606D0 AC860008 */ sw $a2, 0x8($a0) /* 363834 E00606D4 AC82000C */ sw $v0, 0xC($a0) /* 363838 E00606D8 8FA80110 */ lw $t0, 0x110($sp) /* 36383C E00606DC 26310030 */ addiu $s1, $s1, 0x30 /* 363840 E00606E0 8D020008 */ lw $v0, 0x8($t0) /* 363844 E00606E4 24840010 */ addiu $a0, $a0, 0x10 /* 363848 E00606E8 0262102A */ slt $v0, $s3, $v0 /* 36384C E00606EC 1440FFB4 */ bnez $v0, .LE00605C0 /* 363850 E00606F0 AE840000 */ sw $a0, 0x0($s4) .LE00606F4: /* 363854 E00606F4 8FBF00FC */ lw $ra, 0xFC($sp) /* 363858 E00606F8 8FBE00F8 */ lw $fp, 0xF8($sp) /* 36385C E00606FC 8FB700F4 */ lw $s7, 0xF4($sp) /* 363860 E0060700 8FB600F0 */ lw $s6, 0xF0($sp) /* 363864 E0060704 8FB500EC */ lw $s5, 0xEC($sp) /* 363868 E0060708 8FB400E8 */ lw $s4, 0xE8($sp) /* 36386C E006070C 8FB300E4 */ lw $s3, 0xE4($sp) /* 363870 E0060710 8FB200E0 */ lw $s2, 0xE0($sp) /* 363874 E0060714 8FB100DC */ lw $s1, 0xDC($sp) /* 363878 E0060718 8FB000D8 */ lw $s0, 0xD8($sp) /* 36387C E006071C D7B60108 */ ldc1 $f22, 0x108($sp) /* 363880 E0060720 D7B40100 */ ldc1 $f20, 0x100($sp) /* 363884 E0060724 03E00008 */ jr $ra /* 363888 E0060728 27BD0110 */ addiu $sp, $sp, 0x110 /* 36388C E006072C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void big_snowflakes_appendGfx(void* effect) { BigSnowflakesFXData* data = ((EffectInstance*)effect)->data.bigSnowflakes; Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; Gfx* dlist = D_E0060738[0]; s32 i; gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, dlist); gDPSetPrimColor(gMainGfxPos++, 0, 0, 20, 100, 20, data->unk_24); shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp98); data++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) { Gfx* dlist2 = D_E0060730[i & 1]; // should be able to be i % 2 (ARRAY_COUNT(D_E0060730)) shim_guTranslateF(sp58, data->unk_04, data->unk_08, data->unk_0C); shim_guMtxCatF(sp58, sp98, sp18); if (!(i & 1)) { shim_guRotateF(sp58, data->unk_18, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, data->unk_20, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); } shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, dlist2); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel npc_imgfx_update /* 187BC 8003D3BC 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 187C0 8003D3C0 AFB10024 */ sw $s1, 0x24($sp) /* 187C4 8003D3C4 0080882D */ daddu $s1, $a0, $zero /* 187C8 8003D3C8 0000282D */ daddu $a1, $zero, $zero /* 187CC 8003D3CC AFBF003C */ sw $ra, 0x3C($sp) /* 187D0 8003D3D0 AFB60038 */ sw $s6, 0x38($sp) /* 187D4 8003D3D4 AFB50034 */ sw $s5, 0x34($sp) /* 187D8 8003D3D8 AFB40030 */ sw $s4, 0x30($sp) /* 187DC 8003D3DC AFB3002C */ sw $s3, 0x2C($sp) /* 187E0 8003D3E0 AFB20028 */ sw $s2, 0x28($sp) /* 187E4 8003D3E4 AFB00020 */ sw $s0, 0x20($sp) /* 187E8 8003D3E8 86340098 */ lh $s4, 0x98($s1) /* 187EC 8003D3EC 8630009A */ lh $s0, 0x9A($s1) /* 187F0 8003D3F0 8635009C */ lh $s5, 0x9C($s1) /* 187F4 8003D3F4 8632009E */ lh $s2, 0x9E($s1) /* 187F8 8003D3F8 863600A0 */ lh $s6, 0xA0($s1) /* 187FC 8003D3FC 963300A2 */ lhu $s3, 0xA2($s1) /* 18800 8003D400 00A0302D */ daddu $a2, $a1, $zero /* 18804 8003D404 AFA00010 */ sw $zero, 0x10($sp) /* 18808 8003D408 AFA00014 */ sw $zero, 0x14($sp) /* 1880C 8003D40C AFA00018 */ sw $zero, 0x18($sp) /* 18810 8003D410 8E240024 */ lw $a0, 0x24($s1) /* 18814 8003D414 0C0B7A25 */ jal set_npc_imgfx_all /* 18818 8003D418 00A0382D */ daddu $a3, $a1, $zero /* 1881C 8003D41C 2E820011 */ sltiu $v0, $s4, 0x11 /* 18820 8003D420 10400076 */ beqz $v0, .L8003D5FC /* 18824 8003D424 00141080 */ sll $v0, $s4, 2 /* 18828 8003D428 3C01800A */ lui $at, %hi(jtbl_80098548) /* 1882C 8003D42C 00220821 */ addu $at, $at, $v0 /* 18830 8003D430 8C228548 */ lw $v0, %lo(jtbl_80098548)($at) /* 18834 8003D434 00400008 */ jr $v0 /* 18838 8003D438 00000000 */ nop glabel .L8003D43C /* 1883C 8003D43C 0000282D */ daddu $a1, $zero, $zero /* 18840 8003D440 00A0302D */ daddu $a2, $a1, $zero /* 18844 8003D444 2402000D */ addiu $v0, $zero, 0xD /* 18848 8003D448 A22200AA */ sb $v0, 0xAA($s1) /* 1884C 8003D44C AFA00010 */ sw $zero, 0x10($sp) /* 18850 8003D450 AFA00014 */ sw $zero, 0x14($sp) /* 18854 8003D454 AFB30018 */ sw $s3, 0x18($sp) /* 18858 8003D458 8E240024 */ lw $a0, 0x24($s1) /* 1885C 8003D45C 0800F57D */ j .L8003D5F4 /* 18860 8003D460 00A0382D */ daddu $a3, $a1, $zero glabel .L8003D464 /* 18864 8003D464 2402000D */ addiu $v0, $zero, 0xD /* 18868 8003D468 A22200AA */ sb $v0, 0xAA($s1) glabel .L8003D46C /* 1886C 8003D46C 0280282D */ daddu $a1, $s4, $zero /* 18870 8003D470 0000302D */ daddu $a2, $zero, $zero /* 18874 8003D474 AFA00010 */ sw $zero, 0x10($sp) /* 18878 8003D478 AFA00014 */ sw $zero, 0x14($sp) /* 1887C 8003D47C AFB30018 */ sw $s3, 0x18($sp) /* 18880 8003D480 8E240024 */ lw $a0, 0x24($s1) /* 18884 8003D484 0800F57D */ j .L8003D5F4 /* 18888 8003D488 00C0382D */ daddu $a3, $a2, $zero glabel .L8003D48C /* 1888C 8003D48C 24050004 */ addiu $a1, $zero, 0x4 /* 18890 8003D490 0200302D */ daddu $a2, $s0, $zero /* 18894 8003D494 2402000D */ addiu $v0, $zero, 0xD /* 18898 8003D498 A22200AA */ sb $v0, 0xAA($s1) /* 1889C 8003D49C AFB20010 */ sw $s2, 0x10($sp) /* 188A0 8003D4A0 0800F57A */ j .L8003D5E8 /* 188A4 8003D4A4 AFA00014 */ sw $zero, 0x14($sp) glabel .L8003D4A8 /* 188A8 8003D4A8 24050006 */ addiu $a1, $zero, 0x6 /* 188AC 8003D4AC 0200302D */ daddu $a2, $s0, $zero /* 188B0 8003D4B0 2402000D */ addiu $v0, $zero, 0xD /* 188B4 8003D4B4 A22200AA */ sb $v0, 0xAA($s1) /* 188B8 8003D4B8 240200FF */ addiu $v0, $zero, 0xFF /* 188BC 8003D4BC AFB20010 */ sw $s2, 0x10($sp) /* 188C0 8003D4C0 0800F57A */ j .L8003D5E8 /* 188C4 8003D4C4 AFA20014 */ sw $v0, 0x14($sp) glabel .L8003D4C8 /* 188C8 8003D4C8 24050007 */ addiu $a1, $zero, 0x7 /* 188CC 8003D4CC 240600FF */ addiu $a2, $zero, 0xFF /* 188D0 8003D4D0 24020016 */ addiu $v0, $zero, 0x16 /* 188D4 8003D4D4 A22200AA */ sb $v0, 0xAA($s1) /* 188D8 8003D4D8 00C0102D */ daddu $v0, $a2, $zero /* 188DC 8003D4DC AFA20010 */ sw $v0, 0x10($sp) /* 188E0 8003D4E0 AFB00014 */ sw $s0, 0x14($sp) /* 188E4 8003D4E4 AFB30018 */ sw $s3, 0x18($sp) /* 188E8 8003D4E8 8E240024 */ lw $a0, 0x24($s1) /* 188EC 8003D4EC 0800F57D */ j .L8003D5F4 /* 188F0 8003D4F0 00C0382D */ daddu $a3, $a2, $zero glabel .L8003D4F4 /* 188F4 8003D4F4 24050008 */ addiu $a1, $zero, 0x8 /* 188F8 8003D4F8 0200302D */ daddu $a2, $s0, $zero /* 188FC 8003D4FC 24020016 */ addiu $v0, $zero, 0x16 /* 18900 8003D500 A22200AA */ sb $v0, 0xAA($s1) /* 18904 8003D504 AFB20010 */ sw $s2, 0x10($sp) /* 18908 8003D508 0800F57A */ j .L8003D5E8 /* 1890C 8003D50C AFB60014 */ sw $s6, 0x14($sp) glabel .L8003D510 /* 18910 8003D510 24050009 */ addiu $a1, $zero, 0x9 /* 18914 8003D514 0200302D */ daddu $a2, $s0, $zero /* 18918 8003D518 2402000D */ addiu $v0, $zero, 0xD /* 1891C 8003D51C A22200AA */ sb $v0, 0xAA($s1) /* 18920 8003D520 240200FF */ addiu $v0, $zero, 0xFF /* 18924 8003D524 AFB20010 */ sw $s2, 0x10($sp) /* 18928 8003D528 0800F57A */ j .L8003D5E8 /* 1892C 8003D52C AFA20014 */ sw $v0, 0x14($sp) glabel .L8003D530 /* 18930 8003D530 2405000A */ addiu $a1, $zero, 0xA /* 18934 8003D534 0200302D */ daddu $a2, $s0, $zero /* 18938 8003D538 24020016 */ addiu $v0, $zero, 0x16 /* 1893C 8003D53C A22200AA */ sb $v0, 0xAA($s1) /* 18940 8003D540 AFB20010 */ sw $s2, 0x10($sp) /* 18944 8003D544 0800F57A */ j .L8003D5E8 /* 18948 8003D548 AFB60014 */ sw $s6, 0x14($sp) glabel .L8003D54C /* 1894C 8003D54C 24050005 */ addiu $a1, $zero, 0x5 /* 18950 8003D550 0200302D */ daddu $a2, $s0, $zero /* 18954 8003D554 2402000D */ addiu $v0, $zero, 0xD /* 18958 8003D558 A22200AA */ sb $v0, 0xAA($s1) /* 1895C 8003D55C AFB20010 */ sw $s2, 0x10($sp) /* 18960 8003D560 0800F57A */ j .L8003D5E8 /* 18964 8003D564 AFA00014 */ sw $zero, 0x14($sp) glabel .L8003D568 /* 18968 8003D568 2405000D */ addiu $a1, $zero, 0xD /* 1896C 8003D56C 0200302D */ daddu $a2, $s0, $zero /* 18970 8003D570 24020016 */ addiu $v0, $zero, 0x16 /* 18974 8003D574 A22200AA */ sb $v0, 0xAA($s1) /* 18978 8003D578 AFB20010 */ sw $s2, 0x10($sp) /* 1897C 8003D57C 0800F57A */ j .L8003D5E8 /* 18980 8003D580 AFB60014 */ sw $s6, 0x14($sp) glabel .L8003D584 /* 18984 8003D584 2405000E */ addiu $a1, $zero, 0xE /* 18988 8003D588 0200302D */ daddu $a2, $s0, $zero /* 1898C 8003D58C 2402000D */ addiu $v0, $zero, 0xD /* 18990 8003D590 A22200AA */ sb $v0, 0xAA($s1) /* 18994 8003D594 240200FF */ addiu $v0, $zero, 0xFF /* 18998 8003D598 AFB20010 */ sw $s2, 0x10($sp) /* 1899C 8003D59C 0800F57A */ j .L8003D5E8 /* 189A0 8003D5A0 AFA20014 */ sw $v0, 0x14($sp) glabel .L8003D5A4 /* 189A4 8003D5A4 2405000F */ addiu $a1, $zero, 0xF /* 189A8 8003D5A8 0200302D */ daddu $a2, $s0, $zero /* 189AC 8003D5AC 2402000D */ addiu $v0, $zero, 0xD /* 189B0 8003D5B0 A22200AA */ sb $v0, 0xAA($s1) /* 189B4 8003D5B4 240200FF */ addiu $v0, $zero, 0xFF /* 189B8 8003D5B8 AFA00010 */ sw $zero, 0x10($sp) /* 189BC 8003D5BC AFA20014 */ sw $v0, 0x14($sp) /* 189C0 8003D5C0 AFB30018 */ sw $s3, 0x18($sp) /* 189C4 8003D5C4 8E240024 */ lw $a0, 0x24($s1) /* 189C8 8003D5C8 0800F57D */ j .L8003D5F4 /* 189CC 8003D5CC 0040382D */ daddu $a3, $v0, $zero glabel .L8003D5D0 /* 189D0 8003D5D0 2405000F */ addiu $a1, $zero, 0xF /* 189D4 8003D5D4 0200302D */ daddu $a2, $s0, $zero /* 189D8 8003D5D8 24020016 */ addiu $v0, $zero, 0x16 /* 189DC 8003D5DC A22200AA */ sb $v0, 0xAA($s1) /* 189E0 8003D5E0 AFA00010 */ sw $zero, 0x10($sp) /* 189E4 8003D5E4 AFB50014 */ sw $s5, 0x14($sp) .L8003D5E8: /* 189E8 8003D5E8 AFB30018 */ sw $s3, 0x18($sp) /* 189EC 8003D5EC 8E240024 */ lw $a0, 0x24($s1) /* 189F0 8003D5F0 02A0382D */ daddu $a3, $s5, $zero .L8003D5F4: /* 189F4 8003D5F4 0C0B7A25 */ jal set_npc_imgfx_all /* 189F8 8003D5F8 00000000 */ nop glabel .L8003D5FC /* 189FC 8003D5FC 8FBF003C */ lw $ra, 0x3C($sp) /* 18A00 8003D600 8FB60038 */ lw $s6, 0x38($sp) /* 18A04 8003D604 8FB50034 */ lw $s5, 0x34($sp) /* 18A08 8003D608 8FB40030 */ lw $s4, 0x30($sp) /* 18A0C 8003D60C 8FB3002C */ lw $s3, 0x2C($sp) /* 18A10 8003D610 8FB20028 */ lw $s2, 0x28($sp) /* 18A14 8003D614 8FB10024 */ lw $s1, 0x24($sp) /* 18A18 8003D618 8FB00020 */ lw $s0, 0x20($sp) /* 18A1C 8003D61C 03E00008 */ jr $ra /* 18A20 8003D620 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void npc_imgfx_update(Npc* npc) { s32 imgfxType = npc->imgfxType; s32 imgfxArg1 = npc->imgfxArg1; s32 imgfxArg2 = npc->imgfxArg2; s32 imgfxArg3 = npc->imgfxArg3; s32 imgfxArg4 = npc->imgfxArg4; s32 imgfxFlags = npc->imgfxFlags; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_CLEAR, 0, 0, 0, 0, 0); switch (imgfxType) { case IMGFX_CLEAR: npc->renderMode = RENDER_MODE_ALPHATEST; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_CLEAR, 0, 0, 0, 0, imgfxFlags); break; case IMGFX_UNK_2: case IMGFX_RESET: npc->renderMode = RENDER_MODE_ALPHATEST; // fallthrough case IMGFX_UNK_1: set_npc_imgfx_all(npc->spriteInstanceID, imgfxType, 0, 0, 0, 0, imgfxFlags); break; case IMGFX_SET_WAVY: npc->renderMode = RENDER_MODE_ALPHATEST; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_WAVY, imgfxArg1, imgfxArg2, imgfxArg3, 0, imgfxFlags); break; case IMGFX_SET_COLOR: npc->renderMode = RENDER_MODE_ALPHATEST; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_COLOR, imgfxArg1, imgfxArg2, imgfxArg3, 255, imgfxFlags); break; case IMGFX_SET_ALPHA: npc->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_ALPHA, 255, 255, 255, imgfxArg1, imgfxFlags); break; case IMGFX_SET_TINT: npc->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_TINT, imgfxArg1, imgfxArg2, imgfxArg3, imgfxArg4, imgfxFlags); break; case IMGFX_SET_WHITE_FADE: npc->renderMode = RENDER_MODE_ALPHATEST; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_WHITE_FADE, imgfxArg1, imgfxArg2, imgfxArg3, 255, imgfxFlags); break; case IMGFX_SET_CREDITS_FADE: npc->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_CREDITS_FADE, imgfxArg1, imgfxArg2, imgfxArg3, imgfxArg4, imgfxFlags); break; case IMGFX_SET_ANIM: npc->renderMode = RENDER_MODE_ALPHATEST; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_ANIM, imgfxArg1, imgfxArg2, imgfxArg3, 0, imgfxFlags); break; case IMGFX_HOLOGRAM: npc->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_HOLOGRAM, imgfxArg1, imgfxArg2, imgfxArg3, imgfxArg4, imgfxFlags); break; case IMGFX_FILL_COLOR: npc->renderMode = RENDER_MODE_ALPHATEST; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_FILL_COLOR, imgfxArg1, imgfxArg2, imgfxArg3, 255, imgfxFlags); break; case IMGFX_OVERLAY: npc->renderMode = RENDER_MODE_ALPHATEST; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_OVERLAY, imgfxArg1, 255, 0, 255, imgfxFlags); break; case IMGFX_OVERLAY_XLU: npc->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2; set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_OVERLAY, imgfxArg1, imgfxArg2, 0, imgfxArg2, imgfxFlags); break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E00D8334 /* 3D6AF4 E00D8334 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 3D6AF8 E00D8338 00A0C02D */ daddu $t8, $a1, $zero /* 3D6AFC E00D833C 3C03FFFF */ lui $v1, (0xFFFF0000 >> 16) /* 3D6B00 E00D8340 AFBF0030 */ sw $ra, 0x30($sp) /* 3D6B04 E00D8344 AFB7002C */ sw $s7, 0x2C($sp) /* 3D6B08 E00D8348 AFB60028 */ sw $s6, 0x28($sp) /* 3D6B0C E00D834C AFB50024 */ sw $s5, 0x24($sp) /* 3D6B10 E00D8350 AFB40020 */ sw $s4, 0x20($sp) /* 3D6B14 E00D8354 AFB3001C */ sw $s3, 0x1C($sp) /* 3D6B18 E00D8358 AFB20018 */ sw $s2, 0x18($sp) /* 3D6B1C E00D835C AFB10014 */ sw $s1, 0x14($sp) /* 3D6B20 E00D8360 AFB00010 */ sw $s0, 0x10($sp) /* 3D6B24 E00D8364 F7B60040 */ sdc1 $f22, 0x40($sp) /* 3D6B28 E00D8368 F7B40038 */ sdc1 $f20, 0x38($sp) /* 3D6B2C E00D836C AFA70054 */ sw $a3, 0x54($sp) /* 3D6B30 E00D8370 90820034 */ lbu $v0, 0x34($a0) /* 3D6B34 E00D8374 3C01437F */ lui $at, (0x437F0000 >> 16) /* 3D6B38 E00D8378 44811000 */ mtc1 $at, $f2 /* 3D6B3C E00D837C 44820000 */ mtc1 $v0, $f0 /* 3D6B40 E00D8380 00000000 */ nop /* 3D6B44 E00D8384 46800020 */ cvt.s.w $f0, $f0 /* 3D6B48 E00D8388 90820035 */ lbu $v0, 0x35($a0) /* 3D6B4C E00D838C 46020103 */ div.s $f4, $f0, $f2 /* 3D6B50 E00D8390 44820000 */ mtc1 $v0, $f0 /* 3D6B54 E00D8394 00000000 */ nop /* 3D6B58 E00D8398 46800020 */ cvt.s.w $f0, $f0 /* 3D6B5C E00D839C 8C820034 */ lw $v0, 0x34($a0) /* 3D6B60 E00D83A0 00431024 */ and $v0, $v0, $v1 /* 3D6B64 E00D83A4 10400095 */ beqz $v0, .LE00D85FC /* 3D6B68 E00D83A8 46020583 */ div.s $f22, $f0, $f2 /* 3D6B6C E00D83AC 3C09E300 */ lui $t1, (0xE3000A01 >> 16) /* 3D6B70 E00D83B0 35290A01 */ ori $t1, $t1, (0xE3000A01 & 0xFFFF) /* 3D6B74 E00D83B4 3C0AE300 */ lui $t2, (0xE3000C00 >> 16) /* 3D6B78 E00D83B8 354A0C00 */ ori $t2, $t2, (0xE3000C00 & 0xFFFF) /* 3D6B7C E00D83BC 3C0BE300 */ lui $t3, (0xE3000D01 >> 16) /* 3D6B80 E00D83C0 356B0D01 */ ori $t3, $t3, (0xE3000D01 & 0xFFFF) /* 3D6B84 E00D83C4 3C0CE300 */ lui $t4, (0xE3000F00 >> 16) /* 3D6B88 E00D83C8 358C0F00 */ ori $t4, $t4, (0xE3000F00 & 0xFFFF) /* 3D6B8C E00D83CC 3C0DE300 */ lui $t5, (0xE3001001 >> 16) /* 3D6B90 E00D83D0 35AD1001 */ ori $t5, $t5, (0xE3001001 & 0xFFFF) /* 3D6B94 E00D83D4 3C0EE300 */ lui $t6, (0xE3001201 >> 16) /* 3D6B98 E00D83D8 35CE1201 */ ori $t6, $t6, (0xE3001201 & 0xFFFF) /* 3D6B9C E00D83DC 3C0FE300 */ lui $t7, (0xE3001402 >> 16) /* 3D6BA0 E00D83E0 35EF1402 */ ori $t7, $t7, (0xE3001402 & 0xFFFF) /* 3D6BA4 E00D83E4 3C15E200 */ lui $s5, (0xE200001C >> 16) /* 3D6BA8 E00D83E8 36B5001C */ ori $s5, $s5, (0xE200001C & 0xFFFF) /* 3D6BAC E00D83EC 3C100050 */ lui $s0, (0x504340 >> 16) /* 3D6BB0 E00D83F0 36104340 */ ori $s0, $s0, (0x504340 & 0xFFFF) /* 3D6BB4 E00D83F4 3C16FCFF */ lui $s6, (0xFCFFFFFF >> 16) /* 3D6BB8 E00D83F8 36D6FFFF */ ori $s6, $s6, (0xFCFFFFFF & 0xFFFF) /* 3D6BBC E00D83FC 3C11FFFD */ lui $s1, (0xFFFDF6FB >> 16) /* 3D6BC0 E00D8400 3631F6FB */ ori $s1, $s1, (0xFFFDF6FB & 0xFFFF) /* 3D6BC4 E00D8404 3C171830 */ lui $s7, (0x183060FF >> 16) /* 3D6BC8 E00D8408 36F760FF */ ori $s7, $s7, (0x183060FF & 0xFFFF) /* 3D6BCC E00D840C 27140004 */ addiu $s4, $t8, 0x4 /* 3D6BD0 E00D8410 0280202D */ daddu $a0, $s4, $zero /* 3D6BD4 E00D8414 24D30004 */ addiu $s3, $a2, 0x4 /* 3D6BD8 E00D8418 0260282D */ daddu $a1, $s3, $zero /* 3D6BDC E00D841C 3C08800A */ lui $t0, %hi(gMainGfxPos) /* 3D6BE0 E00D8420 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* 3D6BE4 E00D8424 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3D6BE8 E00D8428 44940000 */ mtc1 $s4, $f0 /* 3D6BEC E00D842C 00000000 */ nop /* 3D6BF0 E00D8430 46800020 */ cvt.s.w $f0, $f0 /* 3D6BF4 E00D8434 8FB20058 */ lw $s2, 0x58($sp) /* 3D6BF8 E00D8438 8D030000 */ lw $v1, 0x0($t0) /* 3D6BFC E00D843C 00D29021 */ addu $s2, $a2, $s2 /* 3D6C00 E00D8440 2652FFFC */ addiu $s2, $s2, -0x4 /* 3D6C04 E00D8444 0240382D */ daddu $a3, $s2, $zero /* 3D6C08 E00D8448 0060302D */ daddu $a2, $v1, $zero /* 3D6C0C E00D844C 24630008 */ addiu $v1, $v1, 0x8 /* 3D6C10 E00D8450 AD030000 */ sw $v1, 0x0($t0) /* 3D6C14 E00D8454 ACC20000 */ sw $v0, 0x0($a2) /* 3D6C18 E00D8458 24620008 */ addiu $v0, $v1, 0x8 /* 3D6C1C E00D845C ACC00004 */ sw $zero, 0x4($a2) /* 3D6C20 E00D8460 AD020000 */ sw $v0, 0x0($t0) /* 3D6C24 E00D8464 3C02D700 */ lui $v0, (0xD7000000 >> 16) /* 3D6C28 E00D8468 AC620000 */ sw $v0, 0x0($v1) /* 3D6C2C E00D846C 2402FFFF */ addiu $v0, $zero, -0x1 /* 3D6C30 E00D8470 AC620004 */ sw $v0, 0x4($v1) /* 3D6C34 E00D8474 24620010 */ addiu $v0, $v1, 0x10 /* 3D6C38 E00D8478 AD020000 */ sw $v0, 0x0($t0) /* 3D6C3C E00D847C 24620018 */ addiu $v0, $v1, 0x18 /* 3D6C40 E00D8480 AC690008 */ sw $t1, 0x8($v1) /* 3D6C44 E00D8484 AC60000C */ sw $zero, 0xC($v1) /* 3D6C48 E00D8488 AD020000 */ sw $v0, 0x0($t0) /* 3D6C4C E00D848C 24620020 */ addiu $v0, $v1, 0x20 /* 3D6C50 E00D8490 AC6A0010 */ sw $t2, 0x10($v1) /* 3D6C54 E00D8494 AC600014 */ sw $zero, 0x14($v1) /* 3D6C58 E00D8498 AD020000 */ sw $v0, 0x0($t0) /* 3D6C5C E00D849C 24620028 */ addiu $v0, $v1, 0x28 /* 3D6C60 E00D84A0 AC6B0018 */ sw $t3, 0x18($v1) /* 3D6C64 E00D84A4 AC60001C */ sw $zero, 0x1C($v1) /* 3D6C68 E00D84A8 AD020000 */ sw $v0, 0x0($t0) /* 3D6C6C E00D84AC 24620030 */ addiu $v0, $v1, 0x30 /* 3D6C70 E00D84B0 AC6C0020 */ sw $t4, 0x20($v1) /* 3D6C74 E00D84B4 AC600024 */ sw $zero, 0x24($v1) /* 3D6C78 E00D84B8 AD020000 */ sw $v0, 0x0($t0) /* 3D6C7C E00D84BC 24620038 */ addiu $v0, $v1, 0x38 /* 3D6C80 E00D84C0 AC6D0028 */ sw $t5, 0x28($v1) /* 3D6C84 E00D84C4 AC60002C */ sw $zero, 0x2C($v1) /* 3D6C88 E00D84C8 AD020000 */ sw $v0, 0x0($t0) /* 3D6C8C E00D84CC 24023000 */ addiu $v0, $zero, 0x3000 /* 3D6C90 E00D84D0 AC620034 */ sw $v0, 0x34($v1) /* 3D6C94 E00D84D4 24620040 */ addiu $v0, $v1, 0x40 /* 3D6C98 E00D84D8 AC6E0030 */ sw $t6, 0x30($v1) /* 3D6C9C E00D84DC AD020000 */ sw $v0, 0x0($t0) /* 3D6CA0 E00D84E0 24020C00 */ addiu $v0, $zero, 0xC00 /* 3D6CA4 E00D84E4 AC62003C */ sw $v0, 0x3C($v1) /* 3D6CA8 E00D84E8 24620048 */ addiu $v0, $v1, 0x48 /* 3D6CAC E00D84EC AC6F0038 */ sw $t7, 0x38($v1) /* 3D6CB0 E00D84F0 AD020000 */ sw $v0, 0x0($t0) /* 3D6CB4 E00D84F4 24620050 */ addiu $v0, $v1, 0x50 /* 3D6CB8 E00D84F8 AC750040 */ sw $s5, 0x40($v1) /* 3D6CBC E00D84FC AC700044 */ sw $s0, 0x44($v1) /* 3D6CC0 E00D8500 AD020000 */ sw $v0, 0x0($t0) /* 3D6CC4 E00D8504 AC760048 */ sw $s6, 0x48($v1) /* 3D6CC8 E00D8508 AC71004C */ sw $s1, 0x4C($v1) /* 3D6CCC E00D850C 8FB90054 */ lw $t9, 0x54($sp) /* 3D6CD0 E00D8510 02538023 */ subu $s0, $s2, $s3 /* 3D6CD4 E00D8514 03198821 */ addu $s1, $t8, $t9 /* 3D6CD8 E00D8518 2631FFFC */ addiu $s1, $s1, -0x4 /* 3D6CDC E00D851C 02341023 */ subu $v0, $s1, $s4 /* 3D6CE0 E00D8520 000237C2 */ srl $a2, $v0, 31 /* 3D6CE4 E00D8524 00461021 */ addu $v0, $v0, $a2 /* 3D6CE8 E00D8528 00021043 */ sra $v0, $v0, 1 /* 3D6CEC E00D852C 4482A000 */ mtc1 $v0, $f20 /* 3D6CF0 E00D8530 00000000 */ nop /* 3D6CF4 E00D8534 4680A520 */ cvt.s.w $f20, $f20 /* 3D6CF8 E00D8538 24620058 */ addiu $v0, $v1, 0x58 /* 3D6CFC E00D853C 4604A502 */ mul.s $f20, $f20, $f4 /* 3D6D00 E00D8540 00000000 */ nop /* 3D6D04 E00D8544 AD020000 */ sw $v0, 0x0($t0) /* 3D6D08 E00D8548 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3D6D0C E00D854C AC620050 */ sw $v0, 0x50($v1) /* 3D6D10 E00D8550 001017C2 */ srl $v0, $s0, 31 /* 3D6D14 E00D8554 02028021 */ addu $s0, $s0, $v0 /* 3D6D18 E00D8558 46140000 */ add.s $f0, $f0, $f20 /* 3D6D1C E00D855C 00108043 */ sra $s0, $s0, 1 /* 3D6D20 E00D8560 4600018D */ trunc.w.s $f6, $f0 /* 3D6D24 E00D8564 44063000 */ mfc1 $a2, $f6 /* 3D6D28 E00D8568 0C0360A2 */ jal func_E00D8288 /* 3D6D2C E00D856C AC770054 */ sw $s7, 0x54($v1) /* 3D6D30 E00D8570 0260282D */ daddu $a1, $s3, $zero /* 3D6D34 E00D8574 44910000 */ mtc1 $s1, $f0 /* 3D6D38 E00D8578 00000000 */ nop /* 3D6D3C E00D857C 46800020 */ cvt.s.w $f0, $f0 /* 3D6D40 E00D8580 46140001 */ sub.s $f0, $f0, $f20 /* 3D6D44 E00D8584 0220302D */ daddu $a2, $s1, $zero /* 3D6D48 E00D8588 4600018D */ trunc.w.s $f6, $f0 /* 3D6D4C E00D858C 44043000 */ mfc1 $a0, $f6 /* 3D6D50 E00D8590 0C0360A2 */ jal func_E00D8288 /* 3D6D54 E00D8594 0240382D */ daddu $a3, $s2, $zero /* 3D6D58 E00D8598 4490A000 */ mtc1 $s0, $f20 /* 3D6D5C E00D859C 00000000 */ nop /* 3D6D60 E00D85A0 4680A520 */ cvt.s.w $f20, $f20 /* 3D6D64 E00D85A4 4616A502 */ mul.s $f20, $f20, $f22 /* 3D6D68 E00D85A8 00000000 */ nop /* 3D6D6C E00D85AC 0280202D */ daddu $a0, $s4, $zero /* 3D6D70 E00D85B0 44930000 */ mtc1 $s3, $f0 /* 3D6D74 E00D85B4 00000000 */ nop /* 3D6D78 E00D85B8 46800020 */ cvt.s.w $f0, $f0 /* 3D6D7C E00D85BC 46140000 */ add.s $f0, $f0, $f20 /* 3D6D80 E00D85C0 0260282D */ daddu $a1, $s3, $zero /* 3D6D84 E00D85C4 4600018D */ trunc.w.s $f6, $f0 /* 3D6D88 E00D85C8 44073000 */ mfc1 $a3, $f6 /* 3D6D8C E00D85CC 0C0360A2 */ jal func_E00D8288 /* 3D6D90 E00D85D0 0220302D */ daddu $a2, $s1, $zero /* 3D6D94 E00D85D4 0280202D */ daddu $a0, $s4, $zero /* 3D6D98 E00D85D8 44920000 */ mtc1 $s2, $f0 /* 3D6D9C E00D85DC 00000000 */ nop /* 3D6DA0 E00D85E0 46800020 */ cvt.s.w $f0, $f0 /* 3D6DA4 E00D85E4 46140001 */ sub.s $f0, $f0, $f20 /* 3D6DA8 E00D85E8 0220302D */ daddu $a2, $s1, $zero /* 3D6DAC E00D85EC 4600018D */ trunc.w.s $f6, $f0 /* 3D6DB0 E00D85F0 44053000 */ mfc1 $a1, $f6 /* 3D6DB4 E00D85F4 0C0360A2 */ jal func_E00D8288 /* 3D6DB8 E00D85F8 0240382D */ daddu $a3, $s2, $zero .LE00D85FC: /* 3D6DBC E00D85FC 8FBF0030 */ lw $ra, 0x30($sp) /* 3D6DC0 E00D8600 8FB7002C */ lw $s7, 0x2C($sp) /* 3D6DC4 E00D8604 8FB60028 */ lw $s6, 0x28($sp) /* 3D6DC8 E00D8608 8FB50024 */ lw $s5, 0x24($sp) /* 3D6DCC E00D860C 8FB40020 */ lw $s4, 0x20($sp) /* 3D6DD0 E00D8610 8FB3001C */ lw $s3, 0x1C($sp) /* 3D6DD4 E00D8614 8FB20018 */ lw $s2, 0x18($sp) /* 3D6DD8 E00D8618 8FB10014 */ lw $s1, 0x14($sp) /* 3D6DDC E00D861C 8FB00010 */ lw $s0, 0x10($sp) /* 3D6DE0 E00D8620 D7B60040 */ ldc1 $f22, 0x40($sp) /* 3D6DE4 E00D8624 D7B40038 */ ldc1 $f20, 0x38($sp) /* 3D6DE8 E00D8628 03E00008 */ jr $ra /* 3D6DEC E00D862C 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void func_E00D8334(TattleWindowFXData* data, s32 left, s32 top, s32 right, s32 bottom) { f32 t1 = data->unk_34 / 255.0f; f32 t2 = data->unk_35 / 255.0f; s32 xMid, yMid; s32 l, t, r, b; if (data->unk_34 > 0 || data->unk_35 > 0) { gDPPipeSync(gMainGfxPos++); gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF); gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE); gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE); gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP); gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE); gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE); gDPSetTextureFilter(gMainGfxPos++, G_TF_AVERAGE); gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT); gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); gDPSetPrimColor(gMainGfxPos++, 0, 0, 24, 48, 96, 255); l = left + 4; r = (left + right) - 4; t = top + 4; b = (top + bottom) - 4; xMid = (r - l) / 2; yMid = (b - t) / 2; func_E00D8288(l, t, l + (xMid * t1), b); func_E00D8288(r - (xMid * t1), t, r, b); func_E00D8288(l, t, r, t + (yMid * t2)); func_E00D8288(l, b - (yMid * t2), r, b); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel spr_draw_player_sprite /* 100D30 802DDC40 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 100D34 802DDC44 308A00FF */ andi $t2, $a0, 0xFF /* 100D38 802DDC48 000A1040 */ sll $v0, $t2, 1 /* 100D3C 802DDC4C 004A1021 */ addu $v0, $v0, $t2 /* 100D40 802DDC50 00021080 */ sll $v0, $v0, 2 /* 100D44 802DDC54 2403FFFF */ addiu $v1, $zero, -0x1 /* 100D48 802DDC58 AFBF0040 */ sw $ra, 0x40($sp) /* 100D4C 802DDC5C AFB7003C */ sw $s7, 0x3C($sp) /* 100D50 802DDC60 AFB60038 */ sw $s6, 0x38($sp) /* 100D54 802DDC64 AFB50034 */ sw $s5, 0x34($sp) /* 100D58 802DDC68 AFB40030 */ sw $s4, 0x30($sp) /* 100D5C 802DDC6C AFB3002C */ sw $s3, 0x2C($sp) /* 100D60 802DDC70 AFB20028 */ sw $s2, 0x28($sp) /* 100D64 802DDC74 AFB10024 */ sw $s1, 0x24($sp) /* 100D68 802DDC78 AFB00020 */ sw $s0, 0x20($sp) /* 100D6C 802DDC7C F7B40048 */ sdc1 $f20, 0x48($sp) /* 100D70 802DDC80 3C09802E */ lui $t1, %hi(D_802DF58C) /* 100D74 802DDC84 01224821 */ addu $t1, $t1, $v0 /* 100D78 802DDC88 8D29F58C */ lw $t1, %lo(D_802DF58C)($t1) /* 100D7C 802DDC8C 8FB70060 */ lw $s7, 0x60($sp) /* 100D80 802DDC90 11230080 */ beq $t1, $v1, .L802DDE94 /* 100D84 802DDC94 0000102D */ daddu $v0, $zero, $zero /* 100D88 802DDC98 00091403 */ sra $v0, $t1, 16 /* 100D8C 802DDC9C 304200FF */ andi $v0, $v0, 0xFF /* 100D90 802DDCA0 2443FFFF */ addiu $v1, $v0, -0x1 /* 100D94 802DDCA4 00031080 */ sll $v0, $v1, 2 /* 100D98 802DDCA8 3C08802E */ lui $t0, %hi(spr_playerSprites) /* 100D9C 802DDCAC 01024021 */ addu $t0, $t0, $v0 /* 100DA0 802DDCB0 8D08F548 */ lw $t0, %lo(spr_playerSprites)($t0) /* 100DA4 802DDCB4 3C01802E */ lui $at, %hi(D_802DF57C) /* 100DA8 802DDCB8 AC23F57C */ sw $v1, %lo(D_802DF57C)($at) /* 100DAC 802DDCBC 11000053 */ beqz $t0, .L802DDE0C /* 100DB0 802DDCC0 312200FF */ andi $v0, $t1, 0xFF /* 100DB4 802DDCC4 8D140000 */ lw $s4, 0x0($t0) /* 100DB8 802DDCC8 25080004 */ addiu $t0, $t0, 0x4 /* 100DBC 802DDCCC 00021080 */ sll $v0, $v0, 2 /* 100DC0 802DDCD0 01021021 */ addu $v0, $t0, $v0 /* 100DC4 802DDCD4 8C52000C */ lw $s2, 0xC($v0) /* 100DC8 802DDCD8 3C020100 */ lui $v0, (0x1000000 >> 16) /* 100DCC 802DDCDC 01221024 */ and $v0, $t1, $v0 /* 100DD0 802DDCE0 8D160000 */ lw $s6, 0x0($t0) /* 100DD4 802DDCE4 10400013 */ beqz $v0, .L802DDD34 /* 100DD8 802DDCE8 24020005 */ addiu $v0, $zero, 0x5 /* 100DDC 802DDCEC 10620009 */ beq $v1, $v0, .L802DDD14 /* 100DE0 802DDCF0 28620006 */ slti $v0, $v1, 0x6 /* 100DE4 802DDCF4 10400005 */ beqz $v0, .L802DDD0C /* 100DE8 802DDCF8 24020009 */ addiu $v0, $zero, 0x9 /* 100DEC 802DDCFC 10600005 */ beqz $v1, .L802DDD14 /* 100DF0 802DDD00 3C024000 */ lui $v0, (0x40000000 >> 16) /* 100DF4 802DDD04 080B774F */ j .L802DDD3C /* 100DF8 802DDD08 00821024 */ and $v0, $a0, $v0 .L802DDD0C: /* 100DFC 802DDD0C 1462000A */ bne $v1, $v0, .L802DDD38 /* 100E00 802DDD10 3C024000 */ lui $v0, (0x40000000 >> 16) .L802DDD14: /* 100E04 802DDD14 24630001 */ addiu $v1, $v1, 0x1 /* 100E08 802DDD18 00031080 */ sll $v0, $v1, 2 /* 100E0C 802DDD1C 3C14802E */ lui $s4, %hi(spr_playerSprites) /* 100E10 802DDD20 0282A021 */ addu $s4, $s4, $v0 /* 100E14 802DDD24 8E94F548 */ lw $s4, %lo(spr_playerSprites)($s4) /* 100E18 802DDD28 3C01802E */ lui $at, %hi(D_802DF57C) /* 100E1C 802DDD2C AC23F57C */ sw $v1, %lo(D_802DF57C)($at) /* 100E20 802DDD30 8E940000 */ lw $s4, 0x0($s4) .L802DDD34: /* 100E24 802DDD34 3C024000 */ lui $v0, (0x40000000 >> 16) .L802DDD38: /* 100E28 802DDD38 00821024 */ and $v0, $a0, $v0 .L802DDD3C: /* 100E2C 802DDD3C 14400019 */ bnez $v0, .L802DDDA4 /* 100E30 802DDD40 24A2FFA5 */ addiu $v0, $a1, -0x5B /* 100E34 802DDD44 3C03800A */ lui $v1, %hi(gCurrentCamID) /* 100E38 802DDD48 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) /* 100E3C 802DDD4C 00031080 */ sll $v0, $v1, 2 /* 100E40 802DDD50 00431021 */ addu $v0, $v0, $v1 /* 100E44 802DDD54 00021080 */ sll $v0, $v0, 2 /* 100E48 802DDD58 00431023 */ subu $v0, $v0, $v1 /* 100E4C 802DDD5C 000218C0 */ sll $v1, $v0, 3 /* 100E50 802DDD60 00431021 */ addu $v0, $v0, $v1 /* 100E54 802DDD64 000210C0 */ sll $v0, $v0, 3 /* 100E58 802DDD68 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 100E5C 802DDD6C 00220821 */ addu $at, $at, $v0 /* 100E60 802DDD70 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 100E64 802DDD74 46000007 */ neg.s $f0, $f0 /* 100E68 802DDD78 4600008D */ trunc.w.s $f2, $f0 /* 100E6C 802DDD7C 44021000 */ mfc1 $v0, $f2 /* 100E70 802DDD80 00000000 */ nop /* 100E74 802DDD84 00A22821 */ addu $a1, $a1, $v0 /* 100E78 802DDD88 28A20169 */ slti $v0, $a1, 0x169 /* 100E7C 802DDD8C 50400001 */ beql $v0, $zero, .L802DDD94 /* 100E80 802DDD90 24A5FE98 */ addiu $a1, $a1, -0x168 .L802DDD94: /* 100E84 802DDD94 28A2FE98 */ slti $v0, $a1, -0x168 /* 100E88 802DDD98 54400001 */ bnel $v0, $zero, .L802DDDA0 /* 100E8C 802DDD9C 24A50168 */ addiu $a1, $a1, 0x168 .L802DDDA0: /* 100E90 802DDDA0 24A2FFA5 */ addiu $v0, $a1, -0x5B .L802DDDA4: /* 100E94 802DDDA4 2C4200B4 */ sltiu $v0, $v0, 0xB4 /* 100E98 802DDDA8 14400004 */ bnez $v0, .L802DDDBC /* 100E9C 802DDDAC 24A2010E */ addiu $v0, $a1, 0x10E /* 100EA0 802DDDB0 2C4200B4 */ sltiu $v0, $v0, 0xB4 /* 100EA4 802DDDB4 10400005 */ beqz $v0, .L802DDDCC /* 100EA8 802DDDB8 3C021000 */ lui $v0, (0x10000000 >> 16) .L802DDDBC: /* 100EAC 802DDDBC 3C01BFC0 */ lui $at, (0xBFC00000 >> 16) /* 100EB0 802DDDC0 4481A000 */ mtc1 $at, $f20 /* 100EB4 802DDDC4 080B7775 */ j .L802DDDD4 /* 100EB8 802DDDC8 3C021000 */ lui $v0, (0x10000000 >> 16) .L802DDDCC: /* 100EBC 802DDDCC 3C013FC0 */ lui $at, (0x3FC00000 >> 16) /* 100EC0 802DDDD0 4481A000 */ mtc1 $at, $f20 .L802DDDD4: /* 100EC4 802DDDD4 00821024 */ and $v0, $a0, $v0 /* 100EC8 802DDDD8 10400004 */ beqz $v0, .L802DDDEC /* 100ECC 802DDDDC 00000000 */ nop /* 100ED0 802DDDE0 44800000 */ mtc1 $zero, $f0 /* 100ED4 802DDDE4 00000000 */ nop /* 100ED8 802DDDE8 46140501 */ sub.s $f20, $f0, $f20 .L802DDDEC: /* 100EDC 802DDDEC 3C02802E */ lui $v0, %hi(D_802DFEA0) /* 100EE0 802DDDF0 2442FEA0 */ addiu $v0, $v0, %lo(D_802DFEA0) /* 100EE4 802DDDF4 AC400000 */ sw $zero, 0x0($v0) /* 100EE8 802DDDF8 AC450004 */ sw $a1, 0x4($v0) /* 100EEC 802DDDFC 04810005 */ bgez $a0, .L802DDE14 /* 100EF0 802DDE00 AC400008 */ sw $zero, 0x8($v0) /* 100EF4 802DDE04 14C00004 */ bnez $a2, .L802DDE18 /* 100EF8 802DDE08 30D300FF */ andi $s3, $a2, 0xFF .L802DDE0C: /* 100EFC 802DDE0C 080B77A5 */ j .L802DDE94 /* 100F00 802DDE10 0000102D */ daddu $v0, $zero, $zero .L802DDE14: /* 100F04 802DDE14 241300FF */ addiu $s3, $zero, 0xFF .L802DDE18: /* 100F08 802DDE18 000A1040 */ sll $v0, $t2, 1 /* 100F0C 802DDE1C 004A1021 */ addu $v0, $v0, $t2 /* 100F10 802DDE20 00021080 */ sll $v0, $v0, 2 /* 100F14 802DDE24 3C10802E */ lui $s0, %hi(spr_playerCurrentAnimInfo) /* 100F18 802DDE28 02028021 */ addu $s0, $s0, $v0 /* 100F1C 802DDE2C 8E10F588 */ lw $s0, %lo(spr_playerCurrentAnimInfo)($s0) /* 100F20 802DDE30 3C022000 */ lui $v0, (0x20000000 >> 16) /* 100F24 802DDE34 00821024 */ and $v0, $a0, $v0 /* 100F28 802DDE38 54400001 */ bnel $v0, $zero, .L802DDE40 /* 100F2C 802DDE3C 00E0B02D */ daddu $s6, $a3, $zero .L802DDE40: /* 100F30 802DDE40 8E030000 */ lw $v1, 0x0($s0) /* 100F34 802DDE44 2402FFFF */ addiu $v0, $zero, -0x1 /* 100F38 802DDE48 10620011 */ beq $v1, $v0, .L802DDE90 /* 100F3C 802DDE4C 3C150800 */ lui $s5, (0x8000000 >> 16) /* 100F40 802DDE50 0040882D */ daddu $s1, $v0, $zero .L802DDE54: /* 100F44 802DDE54 8E050000 */ lw $a1, 0x0($s0) /* 100F48 802DDE58 02752025 */ or $a0, $s3, $s5 /* 100F4C 802DDE5C AFB60010 */ sw $s6, 0x10($sp) /* 100F50 802DDE60 E7B40014 */ swc1 $f20, 0x14($sp) /* 100F54 802DDE64 AFB70018 */ sw $s7, 0x18($sp) /* 100F58 802DDE68 8E460000 */ lw $a2, 0x0($s2) /* 100F5C 802DDE6C 0C0B73B7 */ jal spr_draw_component /* 100F60 802DDE70 0280382D */ daddu $a3, $s4, $zero /* 100F64 802DDE74 8E420000 */ lw $v0, 0x0($s2) /* 100F68 802DDE78 10510002 */ beq $v0, $s1, .L802DDE84 /* 100F6C 802DDE7C 26100004 */ addiu $s0, $s0, 0x4 /* 100F70 802DDE80 26520004 */ addiu $s2, $s2, 0x4 .L802DDE84: /* 100F74 802DDE84 8E020000 */ lw $v0, 0x0($s0) /* 100F78 802DDE88 1451FFF2 */ bne $v0, $s1, .L802DDE54 /* 100F7C 802DDE8C 00000000 */ nop .L802DDE90: /* 100F80 802DDE90 24020001 */ addiu $v0, $zero, 0x1 .L802DDE94: /* 100F84 802DDE94 8FBF0040 */ lw $ra, 0x40($sp) /* 100F88 802DDE98 8FB7003C */ lw $s7, 0x3C($sp) /* 100F8C 802DDE9C 8FB60038 */ lw $s6, 0x38($sp) /* 100F90 802DDEA0 8FB50034 */ lw $s5, 0x34($sp) /* 100F94 802DDEA4 8FB40030 */ lw $s4, 0x30($sp) /* 100F98 802DDEA8 8FB3002C */ lw $s3, 0x2C($sp) /* 100F9C 802DDEAC 8FB20028 */ lw $s2, 0x28($sp) /* 100FA0 802DDEB0 8FB10024 */ lw $s1, 0x24($sp) /* 100FA4 802DDEB4 8FB00020 */ lw $s0, 0x20($sp) /* 100FA8 802DDEB8 D7B40048 */ ldc1 $f20, 0x48($sp) /* 100FAC 802DDEBC 03E00008 */ jr $ra /* 100FB0 802DDEC0 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: s32 spr_draw_player_sprite(s32 spriteInstanceID, s32 yaw, s32 alphaIn, PAL_PTR* paletteList, Matrix4f mtx) { s32 instanceIdx = spriteInstanceID & 0xFF; s32 animID = spr_playerCurrentAnimInfo[instanceIdx].animID; SpriteRasterCacheEntry** rasters; PAL_PTR* palettes; SpriteAnimComponent** animComponents; SpriteComponent** components; f32 zscale; u32 alpha; u32* spriteData; s32 spriteId; s32 spriteIdBackFacing; if (animID == ANIM_LIST_END) { return FALSE; } D_802DF57C = spriteId = ((animID >> 0x10) & 0xFF) - 1; spriteData = (u32*)spr_playerSprites[spriteId]; if (spriteData == NULL) { return FALSE; } // TODO: fake match or not? rasters = (SpriteRasterCacheEntry**)*spriteData++; palettes = (PAL_PTR*)*spriteData++; spriteData++; spriteData++; animComponents = (SpriteAnimComponent**)spriteData[animID & 0xFF]; if (animID & SPRITE_ID_BACK_FACING) { switch (spriteId) { case 0: case 5: case 9: spriteIdBackFacing = spriteId + 1; // TODO find better match rasters = (SpriteRasterCacheEntry**)spr_playerSprites[spriteIdBackFacing]; D_802DF57C = spriteIdBackFacing; rasters = (SpriteRasterCacheEntry**)*rasters; break; } } if (!(spriteInstanceID & DRAW_SPRITE_OVERRIDE_YAW)) { yaw += (s32)-gCameras[gCurrentCamID].currentYaw; if (yaw > 360) { yaw -= 360; } if (yaw < -360) { yaw += 360; } } if (yaw > 90 && yaw <= 270 || yaw >= -270 && yaw < -90) { zscale = -1.5f; } else { zscale = 1.5f; } if (spriteInstanceID & DRAW_SPRITE_UPSIDE_DOWN) { zscale = 0.0f - zscale; } D_802DFEA0[0] = 0; D_802DFEA0[1] = yaw; D_802DFEA0[2] = 0; if (spriteInstanceID & DRAW_SPRITE_OVERRIDE_ALPHA) { alpha = alphaIn & 0xFF; if (alphaIn == 0) { return FALSE; } } else { alpha = 255; } components = spr_playerCurrentAnimInfo[instanceIdx].componentList; if (spriteInstanceID & DRAW_SPRITE_OVERRIDE_PALETTES) { palettes = paletteList; } while (*components != PTR_LIST_END) { spr_draw_component(alpha | DRAW_SPRITE_USE_PLAYER_RASTERS, *components++, *animComponents, rasters, palettes, zscale, mtx); if (*animComponents != PTR_LIST_END) { animComponents++; } } return TRUE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel npc_do_other_npc_collision /* 1440C 8003900C 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 14410 80039010 AFB1001C */ sw $s1, 0x1C($sp) /* 14414 80039014 0080882D */ daddu $s1, $a0, $zero /* 14418 80039018 AFBF0028 */ sw $ra, 0x28($sp) /* 1441C 8003901C AFB30024 */ sw $s3, 0x24($sp) /* 14420 80039020 AFB20020 */ sw $s2, 0x20($sp) /* 14424 80039024 AFB00018 */ sw $s0, 0x18($sp) /* 14428 80039028 F7BE0058 */ sdc1 $f30, 0x58($sp) /* 1442C 8003902C F7BC0050 */ sdc1 $f28, 0x50($sp) /* 14430 80039030 F7BA0048 */ sdc1 $f26, 0x48($sp) /* 14434 80039034 F7B80040 */ sdc1 $f24, 0x40($sp) /* 14438 80039038 F7B60038 */ sdc1 $f22, 0x38($sp) /* 1443C 8003903C F7B40030 */ sdc1 $f20, 0x30($sp) /* 14440 80039040 8E230000 */ lw $v1, 0x0($s1) /* 14444 80039044 30620100 */ andi $v0, $v1, 0x100 /* 14448 80039048 14400096 */ bnez $v0, .L800392A4 /* 1444C 8003904C 3C02FDFF */ lui $v0, (0xFDFFFFFF >> 16) /* 14450 80039050 3442FFFF */ ori $v0, $v0, (0xFDFFFFFF & 0xFFFF) /* 14454 80039054 0000902D */ daddu $s2, $zero, $zero /* 14458 80039058 3C130400 */ lui $s3, (0x4000000 >> 16) /* 1445C 8003905C C63E0038 */ lwc1 $f30, 0x38($s1) /* 14460 80039060 C626003C */ lwc1 $f6, 0x3C($s1) /* 14464 80039064 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 14468 80039068 44811000 */ mtc1 $at, $f2 /* 1446C 8003906C 00621024 */ and $v0, $v1, $v0 /* 14470 80039070 E7A60010 */ swc1 $f6, 0x10($sp) /* 14474 80039074 AE220000 */ sw $v0, 0x0($s1) /* 14478 80039078 862200A6 */ lh $v0, 0xA6($s1) /* 1447C 8003907C C63C0040 */ lwc1 $f28, 0x40($s1) /* 14480 80039080 44820000 */ mtc1 $v0, $f0 /* 14484 80039084 00000000 */ nop /* 14488 80039088 46800020 */ cvt.s.w $f0, $f0 /* 1448C 8003908C 46020002 */ mul.s $f0, $f0, $f2 /* 14490 80039090 00000000 */ nop /* 14494 80039094 E7A00014 */ swc1 $f0, 0x14($sp) .L80039098: /* 14498 80039098 0C00E2B7 */ jal get_npc_by_index /* 1449C 8003909C 0240202D */ daddu $a0, $s2, $zero /* 144A0 800390A0 0040802D */ daddu $s0, $v0, $zero /* 144A4 800390A4 5200007A */ beql $s0, $zero, .L80039290 /* 144A8 800390A8 26520001 */ addiu $s2, $s2, 0x1 /* 144AC 800390AC 52300078 */ beql $s1, $s0, .L80039290 /* 144B0 800390B0 26520001 */ addiu $s2, $s2, 0x1 /* 144B4 800390B4 8E030000 */ lw $v1, 0x0($s0) /* 144B8 800390B8 50600075 */ beql $v1, $zero, .L80039290 /* 144BC 800390BC 26520001 */ addiu $s2, $s2, 0x1 /* 144C0 800390C0 3C028000 */ lui $v0, (0x80000100 >> 16) /* 144C4 800390C4 34420100 */ ori $v0, $v0, (0x80000100 & 0xFFFF) /* 144C8 800390C8 00621024 */ and $v0, $v1, $v0 /* 144CC 800390CC 54400070 */ bnel $v0, $zero, .L80039290 /* 144D0 800390D0 26520001 */ addiu $s2, $s2, 0x1 /* 144D4 800390D4 860200A8 */ lh $v0, 0xA8($s0) /* 144D8 800390D8 C602003C */ lwc1 $f2, 0x3C($s0) /* 144DC 800390DC 44820000 */ mtc1 $v0, $f0 /* 144E0 800390E0 00000000 */ nop /* 144E4 800390E4 46800020 */ cvt.s.w $f0, $f0 /* 144E8 800390E8 46001000 */ add.s $f0, $f2, $f0 /* 144EC 800390EC C7A60010 */ lwc1 $f6, 0x10($sp) /* 144F0 800390F0 4606003C */ c.lt.s $f0, $f6 /* 144F4 800390F4 00000000 */ nop /* 144F8 800390F8 45030065 */ bc1tl .L80039290 /* 144FC 800390FC 26520001 */ addiu $s2, $s2, 0x1 /* 14500 80039100 862200A8 */ lh $v0, 0xA8($s1) /* 14504 80039104 44820000 */ mtc1 $v0, $f0 /* 14508 80039108 00000000 */ nop /* 1450C 8003910C 46800020 */ cvt.s.w $f0, $f0 /* 14510 80039110 46003000 */ add.s $f0, $f6, $f0 /* 14514 80039114 4602003C */ c.lt.s $f0, $f2 /* 14518 80039118 00000000 */ nop /* 1451C 8003911C 4503005C */ bc1tl .L80039290 /* 14520 80039120 26520001 */ addiu $s2, $s2, 0x1 /* 14524 80039124 C6140038 */ lwc1 $f20, 0x38($s0) /* 14528 80039128 461EA581 */ sub.s $f22, $f20, $f30 /* 1452C 8003912C 4616B082 */ mul.s $f2, $f22, $f22 /* 14530 80039130 00000000 */ nop /* 14534 80039134 C61A0040 */ lwc1 $f26, 0x40($s0) /* 14538 80039138 461CD101 */ sub.s $f4, $f26, $f28 /* 1453C 8003913C 46042002 */ mul.s $f0, $f4, $f4 /* 14540 80039140 00000000 */ nop /* 14544 80039144 860200A6 */ lh $v0, 0xA6($s0) /* 14548 80039148 46001300 */ add.s $f12, $f2, $f0 /* 1454C 8003914C 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 14550 80039150 44811000 */ mtc1 $at, $f2 /* 14554 80039154 44820000 */ mtc1 $v0, $f0 /* 14558 80039158 00000000 */ nop /* 1455C 8003915C 46800020 */ cvt.s.w $f0, $f0 /* 14560 80039160 46020582 */ mul.s $f22, $f0, $f2 /* 14564 80039164 00000000 */ nop /* 14568 80039168 46006104 */ sqrt.s $f4, $f12 /* 1456C 8003916C 46042032 */ c.eq.s $f4, $f4 /* 14570 80039170 00000000 */ nop /* 14574 80039174 45010004 */ bc1t .L80039188 /* 14578 80039178 00000000 */ nop /* 1457C 8003917C 0C0187BC */ jal sqrtf /* 14580 80039180 00000000 */ nop /* 14584 80039184 46000106 */ mov.s $f4, $f0 .L80039188: /* 14588 80039188 C7A60014 */ lwc1 $f6, 0x14($sp) /* 1458C 8003918C 46163000 */ add.s $f0, $f6, $f22 /* 14590 80039190 46002606 */ mov.s $f24, $f4 /* 14594 80039194 4618003E */ c.le.s $f0, $f24 /* 14598 80039198 00000000 */ nop /* 1459C 8003919C 4503003C */ bc1tl .L80039290 /* 145A0 800391A0 26520001 */ addiu $s2, $s2, 0x1 /* 145A4 800391A4 8E220000 */ lw $v0, 0x0($s1) /* 145A8 800391A8 00531024 */ and $v0, $v0, $s3 /* 145AC 800391AC 10400005 */ beqz $v0, .L800391C4 /* 145B0 800391B0 0000182D */ daddu $v1, $zero, $zero /* 145B4 800391B4 3C028011 */ lui $v0, %hi(gPartnerStatus) /* 145B8 800391B8 8042EBB0 */ lb $v0, %lo(gPartnerStatus)($v0) /* 145BC 800391BC 0800E479 */ j .L800391E4 /* 145C0 800391C0 2C430001 */ sltiu $v1, $v0, 0x1 .L800391C4: /* 145C4 800391C4 8E020000 */ lw $v0, 0x0($s0) /* 145C8 800391C8 00531024 */ and $v0, $v0, $s3 /* 145CC 800391CC 50400005 */ beql $v0, $zero, .L800391E4 /* 145D0 800391D0 24030001 */ addiu $v1, $zero, 0x1 /* 145D4 800391D4 3C028011 */ lui $v0, %hi(gPartnerStatus) /* 145D8 800391D8 8042EBB0 */ lb $v0, %lo(gPartnerStatus)($v0) /* 145DC 800391DC 50400001 */ beql $v0, $zero, .L800391E4 /* 145E0 800391E0 24030001 */ addiu $v1, $zero, 0x1 .L800391E4: /* 145E4 800391E4 10600025 */ beqz $v1, .L8003927C /* 145E8 800391E8 00000000 */ nop /* 145EC 800391EC 4600A306 */ mov.s $f12, $f20 /* 145F0 800391F0 4406F000 */ mfc1 $a2, $f30 /* 145F4 800391F4 4407E000 */ mfc1 $a3, $f28 /* 145F8 800391F8 0C00A720 */ jal atan2 /* 145FC 800391FC 4600D386 */ mov.s $f14, $f26 /* 14600 80039200 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 14604 80039204 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 14608 80039208 44811000 */ mtc1 $at, $f2 /* 1460C 8003920C 00000000 */ nop /* 14610 80039210 46020502 */ mul.s $f20, $f0, $f2 /* 14614 80039214 00000000 */ nop /* 14618 80039218 C7A60014 */ lwc1 $f6, 0x14($sp) /* 1461C 8003921C 46163000 */ add.s $f0, $f6, $f22 /* 14620 80039220 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 14624 80039224 44811000 */ mtc1 $at, $f2 /* 14628 80039228 46180601 */ sub.s $f24, $f0, $f24 /* 1462C 8003922C 4602A503 */ div.s $f20, $f20, $f2 /* 14630 80039230 0C00A85B */ jal sin_rad /* 14634 80039234 4600A306 */ mov.s $f12, $f20 /* 14638 80039238 4600C582 */ mul.s $f22, $f24, $f0 /* 1463C 8003923C 00000000 */ nop /* 14640 80039240 0C00A874 */ jal cos_rad /* 14644 80039244 4600A306 */ mov.s $f12, $f20 /* 14648 80039248 4600C087 */ neg.s $f2, $f24 /* 1464C 8003924C 46001102 */ mul.s $f4, $f2, $f0 /* 14650 80039250 00000000 */ nop /* 14654 80039254 3C013DCC */ lui $at, (0x3DCCCCCD >> 16) /* 14658 80039258 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF) /* 1465C 8003925C 44813000 */ mtc1 $at, $f6 /* 14660 80039260 00000000 */ nop /* 14664 80039264 4606B002 */ mul.s $f0, $f22, $f6 /* 14668 80039268 00000000 */ nop /* 1466C 8003926C 46062082 */ mul.s $f2, $f4, $f6 /* 14670 80039270 00000000 */ nop /* 14674 80039274 4600F780 */ add.s $f30, $f30, $f0 /* 14678 80039278 4602E700 */ add.s $f28, $f28, $f2 .L8003927C: /* 1467C 8003927C 8E220000 */ lw $v0, 0x0($s1) /* 14680 80039280 3C030200 */ lui $v1, (0x2000000 >> 16) /* 14684 80039284 00431025 */ or $v0, $v0, $v1 /* 14688 80039288 AE220000 */ sw $v0, 0x0($s1) /* 1468C 8003928C 26520001 */ addiu $s2, $s2, 0x1 .L80039290: /* 14690 80039290 2A420040 */ slti $v0, $s2, 0x40 /* 14694 80039294 1440FF80 */ bnez $v0, .L80039098 /* 14698 80039298 00000000 */ nop /* 1469C 8003929C E63E0038 */ swc1 $f30, 0x38($s1) /* 146A0 800392A0 E63C0040 */ swc1 $f28, 0x40($s1) .L800392A4: /* 146A4 800392A4 8FBF0028 */ lw $ra, 0x28($sp) /* 146A8 800392A8 8FB30024 */ lw $s3, 0x24($sp) /* 146AC 800392AC 8FB20020 */ lw $s2, 0x20($sp) /* 146B0 800392B0 8FB1001C */ lw $s1, 0x1C($sp) /* 146B4 800392B4 8FB00018 */ lw $s0, 0x18($sp) /* 146B8 800392B8 D7BE0058 */ ldc1 $f30, 0x58($sp) /* 146BC 800392BC D7BC0050 */ ldc1 $f28, 0x50($sp) /* 146C0 800392C0 D7BA0048 */ ldc1 $f26, 0x48($sp) /* 146C4 800392C4 D7B80040 */ ldc1 $f24, 0x40($sp) /* 146C8 800392C8 D7B60038 */ ldc1 $f22, 0x38($sp) /* 146CC 800392CC D7B40030 */ ldc1 $f20, 0x30($sp) /* 146D0 800392D0 03E00008 */ jr $ra /* 146D4 800392D4 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: void npc_do_other_npc_collision(Npc* npc) { Npc* otherNpc; f32 angle; f32 thisX, thisY, thisZ; f32 thisBuf; f32 otherX, otherZ; f32 otherBuf; f32 xDiff, zDiff; f32 dist; s32 collision; s32 i; if (!(npc->flags & NPC_FLAG_IGNORE_PLAYER_COLLISION)) { npc->flags &= ~NPC_FLAG_COLLIDING_WITH_NPC; thisBuf = npc->collisionDiameter * 0.5f; thisX = npc->pos.x; thisY = npc->pos.y; thisZ = npc->pos.z; for (i = 0; i < MAX_NPCS; i++) { otherNpc = get_npc_by_index(i); if (otherNpc != NULL && npc != otherNpc) { if (otherNpc->flags != 0 && !(otherNpc->flags & (NPC_FLAG_SUSPENDED | NPC_FLAG_IGNORE_PLAYER_COLLISION))) { if (!(otherNpc->pos.y + otherNpc->collisionHeight < thisY) && !(thisY + npc->collisionHeight < otherNpc->pos.y)) { otherX = otherNpc->pos.x; xDiff = otherX - thisX; otherZ = otherNpc->pos.z; zDiff = otherZ - thisZ; otherBuf = otherNpc->collisionDiameter * 0.5f; dist = sqrtf(SQ(xDiff) + SQ(zDiff)); if (!(thisBuf + otherBuf <= dist)) { collision = FALSE; if (npc->flags & NPC_FLAG_PARTNER) { collision = gPartnerStatus.partnerActionState == PARTNER_ACTION_NONE; } else if (!(otherNpc->flags & NPC_FLAG_PARTNER) || gPartnerStatus.partnerActionState == PARTNER_ACTION_NONE) { collision = TRUE; } if (collision) { angle = DEG_TO_RAD(atan2(otherX, otherZ, thisX, thisZ)); dist = (thisBuf + otherBuf) - dist; xDiff = dist * sin_rad(angle); zDiff = -dist * cos_rad(angle); thisX += xDiff * 0.1f; thisZ += zDiff * 0.1f; } npc->flags |= NPC_FLAG_COLLIDING_WITH_NPC; } } } } } npc->pos.x = thisX; npc->pos.z = thisZ; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel PlayerRunToGoal /* 1A2544 80273C64 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 1A2548 80273C68 AFB00018 */ sw $s0, 0x18($sp) /* 1A254C 80273C6C 3C10800E */ lui $s0, %hi(gBattleStatus + 0xD8) /* 1A2550 80273C70 8E10C148 */ lw $s0, %lo(gBattleStatus + 0xD8)($s0) /* 1A2554 80273C74 AFB20020 */ sw $s2, 0x20($sp) /* 1A2558 80273C78 0080902D */ daddu $s2, $a0, $zero /* 1A255C 80273C7C AFBF0024 */ sw $ra, 0x24($sp) /* 1A2560 80273C80 AFB1001C */ sw $s1, 0x1C($sp) /* 1A2564 80273C84 F7BA0040 */ sdc1 $f26, 0x40($sp) /* 1A2568 80273C88 F7B80038 */ sdc1 $f24, 0x38($sp) /* 1A256C 80273C8C F7B60030 */ sdc1 $f22, 0x30($sp) /* 1A2570 80273C90 F7B40028 */ sdc1 $f20, 0x28($sp) /* 1A2574 80273C94 8E43000C */ lw $v1, 0xC($s2) /* 1A2578 80273C98 10A00002 */ beqz $a1, .L80273CA4 /* 1A257C 80273C9C 2611000C */ addiu $s1, $s0, 0xC /* 1A2580 80273CA0 AE400070 */ sw $zero, 0x70($s2) .L80273CA4: /* 1A2584 80273CA4 8E420070 */ lw $v0, 0x70($s2) /* 1A2588 80273CA8 14400041 */ bnez $v0, .L80273DB0 /* 1A258C 80273CAC 00000000 */ nop /* 1A2590 80273CB0 8C650000 */ lw $a1, 0x0($v1) /* 1A2594 80273CB4 0C0B1EAF */ jal evt_get_variable /* 1A2598 80273CB8 0240202D */ daddu $a0, $s2, $zero /* 1A259C 80273CBC C6180018 */ lwc1 $f24, 0x18($s0) /* 1A25A0 80273CC0 C61A0020 */ lwc1 $f26, 0x20($s0) /* 1A25A4 80273CC4 C6000144 */ lwc1 $f0, 0x144($s0) /* 1A25A8 80273CC8 C614014C */ lwc1 $f20, 0x14C($s0) /* 1A25AC 80273CCC 4406C000 */ mfc1 $a2, $f24 /* 1A25B0 80273CD0 4407D000 */ mfc1 $a3, $f26 /* 1A25B4 80273CD4 A6020070 */ sh $v0, 0x70($s0) /* 1A25B8 80273CD8 E600000C */ swc1 $f0, 0xC($s0) /* 1A25BC 80273CDC C6000148 */ lwc1 $f0, 0x148($s0) /* 1A25C0 80273CE0 C616000C */ lwc1 $f22, 0xC($s0) /* 1A25C4 80273CE4 4600A386 */ mov.s $f14, $f20 /* 1A25C8 80273CE8 E6140014 */ swc1 $f20, 0x14($s0) /* 1A25CC 80273CEC 4600B306 */ mov.s $f12, $f22 /* 1A25D0 80273CF0 0C00A720 */ jal atan2 /* 1A25D4 80273CF4 E6000010 */ swc1 $f0, 0x10($s0) /* 1A25D8 80273CF8 4600B306 */ mov.s $f12, $f22 /* 1A25DC 80273CFC 4406C000 */ mfc1 $a2, $f24 /* 1A25E0 80273D00 4407D000 */ mfc1 $a3, $f26 /* 1A25E4 80273D04 4600A386 */ mov.s $f14, $f20 /* 1A25E8 80273D08 0C00A7B5 */ jal dist2D /* 1A25EC 80273D0C E6000054 */ swc1 $f0, 0x54($s0) /* 1A25F0 80273D10 86020070 */ lh $v0, 0x70($s0) /* 1A25F4 80273D14 46000086 */ mov.s $f2, $f0 /* 1A25F8 80273D18 14400018 */ bnez $v0, .L80273D7C /* 1A25FC 80273D1C E6020058 */ swc1 $f2, 0x58($s0) /* 1A2600 80273D20 C600004C */ lwc1 $f0, 0x4C($s0) /* 1A2604 80273D24 46001003 */ div.s $f0, $f2, $f0 /* 1A2608 80273D28 4600020D */ trunc.w.s $f8, $f0 /* 1A260C 80273D2C 44024000 */ mfc1 $v0, $f8 /* 1A2610 80273D30 00000000 */ nop /* 1A2614 80273D34 A6020070 */ sh $v0, 0x70($s0) /* 1A2618 80273D38 00021400 */ sll $v0, $v0, 16 /* 1A261C 80273D3C 14400002 */ bnez $v0, .L80273D48 /* 1A2620 80273D40 24020001 */ addiu $v0, $zero, 0x1 /* 1A2624 80273D44 A6020070 */ sh $v0, 0x70($s0) .L80273D48: /* 1A2628 80273D48 86020070 */ lh $v0, 0x70($s0) /* 1A262C 80273D4C C602004C */ lwc1 $f2, 0x4C($s0) /* 1A2630 80273D50 44823000 */ mtc1 $v0, $f6 /* 1A2634 80273D54 00000000 */ nop /* 1A2638 80273D58 468031A0 */ cvt.s.w $f6, $f6 /* 1A263C 80273D5C 46023102 */ mul.s $f4, $f6, $f2 /* 1A2640 80273D60 00000000 */ nop /* 1A2644 80273D64 C6000058 */ lwc1 $f0, 0x58($s0) /* 1A2648 80273D68 46040001 */ sub.s $f0, $f0, $f4 /* 1A264C 80273D6C 46060003 */ div.s $f0, $f0, $f6 /* 1A2650 80273D70 46001080 */ add.s $f2, $f2, $f0 /* 1A2654 80273D74 0809CF64 */ j .L80273D90 /* 1A2658 80273D78 E602004C */ swc1 $f2, 0x4C($s0) .L80273D7C: /* 1A265C 80273D7C 44820000 */ mtc1 $v0, $f0 /* 1A2660 80273D80 00000000 */ nop /* 1A2664 80273D84 46800020 */ cvt.s.w $f0, $f0 /* 1A2668 80273D88 46001003 */ div.s $f0, $f2, $f0 /* 1A266C 80273D8C E600004C */ swc1 $f0, 0x4C($s0) .L80273D90: /* 1A2670 80273D90 860201B4 */ lh $v0, 0x1B4($s0) /* 1A2674 80273D94 24420001 */ addiu $v0, $v0, 0x1 /* 1A2678 80273D98 44820000 */ mtc1 $v0, $f0 /* 1A267C 80273D9C 00000000 */ nop /* 1A2680 80273DA0 46800020 */ cvt.s.w $f0, $f0 /* 1A2684 80273DA4 24020001 */ addiu $v0, $zero, 0x1 /* 1A2688 80273DA8 E620004C */ swc1 $f0, 0x4C($s1) /* 1A268C 80273DAC AE420070 */ sw $v0, 0x70($s2) .L80273DB0: /* 1A2690 80273DB0 8E250040 */ lw $a1, 0x40($s1) /* 1A2694 80273DB4 8E260048 */ lw $a2, 0x48($s1) /* 1A2698 80273DB8 0C09904A */ jal add_xz_vec3f /* 1A269C 80273DBC 0220202D */ daddu $a0, $s1, $zero /* 1A26A0 80273DC0 C6200000 */ lwc1 $f0, 0x0($s1) /* 1A26A4 80273DC4 E6000144 */ swc1 $f0, 0x144($s0) /* 1A26A8 80273DC8 C6200004 */ lwc1 $f0, 0x4($s1) /* 1A26AC 80273DCC E6000148 */ swc1 $f0, 0x148($s0) /* 1A26B0 80273DD0 C6200008 */ lwc1 $f0, 0x8($s1) /* 1A26B4 80273DD4 E600014C */ swc1 $f0, 0x14C($s0) /* 1A26B8 80273DD8 C6220040 */ lwc1 $f2, 0x40($s1) /* 1A26BC 80273DDC 3C014080 */ lui $at, (0x40800000 >> 16) /* 1A26C0 80273DE0 44810000 */ mtc1 $at, $f0 /* 1A26C4 80273DE4 00000000 */ nop /* 1A26C8 80273DE8 4600103C */ c.lt.s $f2, $f0 /* 1A26CC 80273DEC 00000000 */ nop /* 1A26D0 80273DF0 45000007 */ bc1f .L80273E10 /* 1A26D4 80273DF4 0000202D */ daddu $a0, $zero, $zero /* 1A26D8 80273DF8 C600018C */ lwc1 $f0, 0x18C($s0) /* 1A26DC 80273DFC E7A00010 */ swc1 $f0, 0x10($sp) /* 1A26E0 80273E00 8E050144 */ lw $a1, 0x144($s0) /* 1A26E4 80273E04 8E060148 */ lw $a2, 0x148($s0) /* 1A26E8 80273E08 0809CF8A */ j .L80273E28 /* 1A26EC 80273E0C 8E07014C */ lw $a3, 0x14C($s0) .L80273E10: /* 1A26F0 80273E10 C600018C */ lwc1 $f0, 0x18C($s0) /* 1A26F4 80273E14 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A26F8 80273E18 8E050144 */ lw $a1, 0x144($s0) /* 1A26FC 80273E1C 8E060148 */ lw $a2, 0x148($s0) /* 1A2700 80273E20 8E07014C */ lw $a3, 0x14C($s0) /* 1A2704 80273E24 24040001 */ addiu $a0, $zero, 0x1 .L80273E28: /* 1A2708 80273E28 0C0990BC */ jal play_movement_dust_effects /* 1A270C 80273E2C 00000000 */ nop /* 1A2710 80273E30 C622004C */ lwc1 $f2, 0x4C($s1) /* 1A2714 80273E34 C6200040 */ lwc1 $f0, 0x40($s1) /* 1A2718 80273E38 46001080 */ add.s $f2, $f2, $f0 /* 1A271C 80273E3C E622004C */ swc1 $f2, 0x4C($s1) /* 1A2720 80273E40 860201B4 */ lh $v0, 0x1B4($s0) /* 1A2724 80273E44 44820000 */ mtc1 $v0, $f0 /* 1A2728 80273E48 00000000 */ nop /* 1A272C 80273E4C 46800020 */ cvt.s.w $f0, $f0 /* 1A2730 80273E50 4602003C */ c.lt.s $f0, $f2 /* 1A2734 80273E54 00000000 */ nop /* 1A2738 80273E58 45000013 */ bc1f .L80273EA8 /* 1A273C 80273E5C 00000000 */ nop /* 1A2740 80273E60 92020135 */ lbu $v0, 0x135($s0) /* 1A2744 80273E64 24420001 */ addiu $v0, $v0, 0x1 /* 1A2748 80273E68 A2020135 */ sb $v0, 0x135($s0) /* 1A274C 80273E6C AE20004C */ sw $zero, 0x4C($s1) /* 1A2750 80273E70 92020135 */ lbu $v0, 0x135($s0) /* 1A2754 80273E74 30420001 */ andi $v0, $v0, 0x1 /* 1A2758 80273E78 10400004 */ beqz $v0, .L80273E8C /* 1A275C 80273E7C 24040141 */ addiu $a0, $zero, 0x141 /* 1A2760 80273E80 C600014C */ lwc1 $f0, 0x14C($s0) /* 1A2764 80273E84 0809CFA6 */ j .L80273E98 /* 1A2768 80273E88 E7A00010 */ swc1 $f0, 0x10($sp) .L80273E8C: /* 1A276C 80273E8C C600014C */ lwc1 $f0, 0x14C($s0) /* 1A2770 80273E90 24040142 */ addiu $a0, $zero, 0x142 /* 1A2774 80273E94 E7A00010 */ swc1 $f0, 0x10($sp) .L80273E98: /* 1A2778 80273E98 8E060144 */ lw $a2, 0x144($s0) /* 1A277C 80273E9C 8E070148 */ lw $a3, 0x148($s0) /* 1A2780 80273EA0 0C052757 */ jal sfx_play_sound_at_position /* 1A2784 80273EA4 0000282D */ daddu $a1, $zero, $zero .L80273EA8: /* 1A2788 80273EA8 96220064 */ lhu $v0, 0x64($s1) /* 1A278C 80273EAC 2442FFFF */ addiu $v0, $v0, -0x1 /* 1A2790 80273EB0 A6220064 */ sh $v0, 0x64($s1) /* 1A2794 80273EB4 00021400 */ sll $v0, $v0, 16 /* 1A2798 80273EB8 1C400006 */ bgtz $v0, .L80273ED4 /* 1A279C 80273EBC 0000102D */ daddu $v0, $zero, $zero /* 1A27A0 80273EC0 C620000C */ lwc1 $f0, 0xC($s1) /* 1A27A4 80273EC4 E6000144 */ swc1 $f0, 0x144($s0) /* 1A27A8 80273EC8 C6200014 */ lwc1 $f0, 0x14($s1) /* 1A27AC 80273ECC 24020002 */ addiu $v0, $zero, 0x2 /* 1A27B0 80273ED0 E600014C */ swc1 $f0, 0x14C($s0) .L80273ED4: /* 1A27B4 80273ED4 8FBF0024 */ lw $ra, 0x24($sp) /* 1A27B8 80273ED8 8FB20020 */ lw $s2, 0x20($sp) /* 1A27BC 80273EDC 8FB1001C */ lw $s1, 0x1C($sp) /* 1A27C0 80273EE0 8FB00018 */ lw $s0, 0x18($sp) /* 1A27C4 80273EE4 D7BA0040 */ ldc1 $f26, 0x40($sp) /* 1A27C8 80273EE8 D7B80038 */ ldc1 $f24, 0x38($sp) /* 1A27CC 80273EEC D7B60030 */ ldc1 $f22, 0x30($sp) /* 1A27D0 80273EF0 D7B40028 */ ldc1 $f20, 0x28($sp) /* 1A27D4 80273EF4 03E00008 */ jr $ra /* 1A27D8 80273EF8 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: ApiStatus PlayerRunToGoal(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; Actor* player = battleStatus->playerActor; ActorState* playerState = &player->state; f32 currentX, currentZ, goalX, goalZ; if (isInitialCall) { script->functionTemp[0] = FALSE; } if (!script->functionTemp[0]) { player->state.moveTime = evt_get_variable(script, *args++); player->state.currentPos.x = player->currentPos.x; player->state.currentPos.y = player->currentPos.y; player->state.currentPos.z = player->currentPos.z; goalX = player->state.goalPos.x; goalZ = player->state.goalPos.z; currentX = player->state.currentPos.x; currentZ = player->state.currentPos.z; player->state.angle = atan2(currentX, currentZ, goalX, goalZ); player->state.distance = dist2D(currentX, currentZ, goalX, goalZ); if (player->state.moveTime == 0) { player->state.moveTime = player->state.distance / player->state.speed; if (player->state.moveTime == 0) { player->state.moveTime = 1; } player->state.speed += (player->state.distance - (player->state.moveTime * player->state.speed)) / player->state.moveTime; } else { player->state.speed = player->state.distance / player->state.moveTime; } playerState->distance = player->actorTypeData1b[0] + 1; script->functionTemp[0] = TRUE; } add_xz_vec3f(&playerState->currentPos, playerState->speed, playerState->angle); player->currentPos.x = playerState->currentPos.x; player->currentPos.y = playerState->currentPos.y; player->currentPos.z = playerState->currentPos.z; if (playerState->speed < 4.0f) { play_movement_dust_effects(0, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw); } else { play_movement_dust_effects(1, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw); } playerState->distance += playerState->speed; if (playerState->distance > player->actorTypeData1b[0]) { player->footStepCounter++; playerState->distance = 0.0f; if ((player->footStepCounter % 2) != 0) { sfx_play_sound_at_position(SOUND_STEP_NORMAL1, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z); } else { sfx_play_sound_at_position(SOUND_STEP_NORMAL2, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z); } } playerState->moveTime--; if (playerState->moveTime <= 0) { player->currentPos.x = playerState->goalPos.x; player->currentPos.z = playerState->goalPos.z; return ApiStatus_DONE2; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_step_end_battle /* EFC0 80033BC0 27BDFFD0 */ addiu $sp, $sp, -0x30 /* EFC4 80033BC4 AFB30024 */ sw $s3, 0x24($sp) /* EFC8 80033BC8 3C138011 */ lui $s3, %hi(gPlayerStatus) /* EFCC 80033BCC 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus) /* EFD0 80033BD0 3C06800A */ lui $a2, %hi(D_800A0900) /* EFD4 80033BD4 24C60900 */ addiu $a2, $a2, %lo(D_800A0900) /* EFD8 80033BD8 AFBF0028 */ sw $ra, 0x28($sp) /* EFDC 80033BDC AFB20020 */ sw $s2, 0x20($sp) /* EFE0 80033BE0 AFB1001C */ sw $s1, 0x1C($sp) /* EFE4 80033BE4 AFB00018 */ sw $s0, 0x18($sp) /* EFE8 80033BE8 80C20000 */ lb $v0, 0x0($a2) /* EFEC 80033BEC 90C30000 */ lbu $v1, 0x0($a2) /* EFF0 80033BF0 04400095 */ bltz $v0, .L80033E48 /* EFF4 80033BF4 2462FFFF */ addiu $v0, $v1, -0x1 /* EFF8 80033BF8 A0C20000 */ sb $v0, 0x0($a2) /* EFFC 80033BFC 00021600 */ sll $v0, $v0, 24 /* F000 80033C00 14400091 */ bnez $v0, .L80033E48 /* F004 80033C04 24050003 */ addiu $a1, $zero, 0x3 /* F008 80033C08 3C048007 */ lui $a0, %hi(bFrameBuffers) /* F00C 80033C0C 248478A0 */ addiu $a0, $a0, %lo(bFrameBuffers) /* F010 80033C10 2402FFFF */ addiu $v0, $zero, -0x1 /* F014 80033C14 0C017CBC */ jal nuGfxSetCfb /* F018 80033C18 A0C20000 */ sb $v0, 0x0($a2) /* F01C 80033C1C 3C04800A */ lui $a0, %hi(gOverrideFlags) /* F020 80033C20 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* F024 80033C24 8C820000 */ lw $v0, 0x0($a0) /* F028 80033C28 2403FFF7 */ addiu $v1, $zero, -0x9 /* F02C 80033C2C 00431024 */ and $v0, $v0, $v1 /* F030 80033C30 0C018030 */ jal nuContRmbForceStopEnd /* F034 80033C34 AC820000 */ sw $v0, 0x0($a0) /* F038 80033C38 0C05260E */ jal sfx_stop_env_sounds /* F03C 80033C3C 00000000 */ nop /* F040 80033C40 0C016AFA */ jal get_current_map_settings /* F044 80033C44 00000000 */ nop /* F048 80033C48 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* F04C 80033C4C 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* F050 80033C50 8E040000 */ lw $a0, 0x0($s0) /* F054 80033C54 0040902D */ daddu $s2, $v0, $zero /* F058 80033C58 84830086 */ lh $v1, 0x86($a0) /* F05C 80033C5C 8482008C */ lh $v0, 0x8C($a0) /* F060 80033C60 00031900 */ sll $v1, $v1, 4 /* F064 80033C64 3C018009 */ lui $at, %hi(gAreas + 0x4) /* F068 80033C68 00230821 */ addu $at, $at, $v1 /* F06C 80033C6C 8C2334F4 */ lw $v1, %lo(gAreas + 0x4)($at) /* F070 80033C70 00021140 */ sll $v0, $v0, 5 /* F074 80033C74 0C0902AA */ jal func_80240AA8 /* F078 80033C78 00628821 */ addu $s1, $v1, $v0 /* F07C 80033C7C 8E020000 */ lw $v0, 0x0($s0) /* F080 80033C80 0C016BE1 */ jal func_8005AF84 /* F084 80033C84 A0400070 */ sb $zero, 0x70($v0) /* F088 80033C88 0C00AB37 */ jal func_8002ACDC /* F08C 80033C8C 00000000 */ nop /* F090 80033C90 0C05259C */ jal sfx_clear_env_sounds /* F094 80033C94 24040001 */ addiu $a0, $zero, 0x1 /* F098 80033C98 8E030000 */ lw $v1, 0x0($s0) /* F09C 80033C9C 9062007E */ lbu $v0, 0x7E($v1) /* F0A0 80033CA0 304200FE */ andi $v0, $v0, 0xFE /* F0A4 80033CA4 0C00AB28 */ jal battle_heap_create /* F0A8 80033CA8 A062007E */ sb $v0, 0x7E($v1) /* F0AC 80033CAC 8E020000 */ lw $v0, 0x0($s0) /* F0B0 80033CB0 0C0B763E */ jal spr_init_sprites /* F0B4 80033CB4 80440084 */ lb $a0, 0x84($v0) /* F0B8 80033CB8 0C0457FA */ jal init_model_data /* F0BC 80033CBC 00000000 */ nop /* F0C0 80033CC0 0C05203C */ jal init_sprite_shading_data /* F0C4 80033CC4 00000000 */ nop /* F0C8 80033CC8 0C048316 */ jal init_entity_models /* F0CC 80033CCC 00000000 */ nop /* F0D0 80033CD0 0C0478C4 */ jal reset_animator_list /* F0D4 80033CD4 00000000 */ nop /* F0D8 80033CD8 0C048C45 */ jal init_worker_list /* F0DC 80033CDC 00000000 */ nop /* F0E0 80033CE0 0000202D */ daddu $a0, $zero, $zero /* F0E4 80033CE4 0C0514BA */ jal hud_element_set_aux_cache /* F0E8 80033CE8 0080282D */ daddu $a1, $a0, $zero /* F0EC 80033CEC 0C0504C0 */ jal init_hud_element_list /* F0F0 80033CF0 00000000 */ nop /* F0F4 80033CF4 0C04C433 */ jal init_item_entity_list /* F0F8 80033CF8 00000000 */ nop /* F0FC 80033CFC 0C0B0CBB */ jal init_script_list /* F100 80033D00 00000000 */ nop /* F104 80033D04 0C00E14B */ jal init_npc_list /* F108 80033D08 00000000 */ nop /* F10C 80033D0C 0C044396 */ jal init_entity_data /* F110 80033D10 00000000 */ nop /* F114 80033D14 0C0515CA */ jal init_trigger_list /* F118 80033D18 00000000 */ nop /* F11C 80033D1C 8E020000 */ lw $v0, 0x0($s0) /* F120 80033D20 904200AA */ lbu $v0, 0xAA($v0) /* F124 80033D24 30420001 */ andi $v0, $v0, 0x1 /* F128 80033D28 10400008 */ beqz $v0, .L80033D4C /* F12C 80033D2C 00000000 */ nop /* F130 80033D30 0C00EC6C */ jal npc_reload_all /* F134 80033D34 00000000 */ nop /* F138 80033D38 3C02800A */ lui $v0, %hi(D_800A0904) /* F13C 80033D3C 8C420904 */ lw $v0, %lo(D_800A0904)($v0) /* F140 80033D40 24040011 */ addiu $a0, $zero, 0x11 /* F144 80033D44 0800CF90 */ j .L80033E40 /* F148 80033D48 AE620004 */ sw $v0, 0x4($s3) .L80033D4C: /* F14C 80033D4C 3C028011 */ lui $v0, %hi(gPlayerData) /* F150 80033D50 2442F290 */ addiu $v0, $v0, %lo(gPlayerData) /* F154 80033D54 0C03AC80 */ jal partner_init_after_battle /* F158 80033D58 80440012 */ lb $a0, 0x12($v0) /* F15C 80033D5C 0C0169B0 */ jal load_map_script_lib /* F160 80033D60 00000000 */ nop /* F164 80033D64 3C04800E */ lui $a0, %hi(wMapShapeName) /* F168 80033D68 24849230 */ addiu $a0, $a0, %lo(wMapShapeName) /* F16C 80033D6C 0C016B3A */ jal load_asset_by_name /* F170 80033D70 27A50010 */ addiu $a1, $sp, 0x10 /* F174 80033D74 0040802D */ daddu $s0, $v0, $zero /* F178 80033D78 3C058021 */ lui $a1, %hi(gMapShapeData) /* F17C 80033D7C 24A50000 */ addiu $a1, $a1, %lo(gMapShapeData) /* F180 80033D80 0C01BB7C */ jal decode_yay0 /* F184 80033D84 0200202D */ daddu $a0, $s0, $zero /* F188 80033D88 0C00AB1E */ jal general_heap_free /* F18C 80033D8C 0200202D */ daddu $a0, $s0, $zero /* F190 80033D90 0C016BE5 */ jal initialize_collision /* F194 80033D94 00000000 */ nop /* F198 80033D98 0C016C16 */ jal restore_map_collision_data /* F19C 80033D9C 00000000 */ nop /* F1A0 80033DA0 8E240008 */ lw $a0, 0x8($s1) /* F1A4 80033DA4 10800004 */ beqz $a0, .L80033DB8 /* F1A8 80033DA8 00000000 */ nop /* F1AC 80033DAC 8E25000C */ lw $a1, 0xC($s1) /* F1B0 80033DB0 0C00A5CF */ jal dma_copy /* F1B4 80033DB4 8E260010 */ lw $a2, 0x10($s1) .L80033DB8: /* F1B8 80033DB8 0C05175C */ jal load_map_bg /* F1BC 80033DBC 8E240014 */ lw $a0, 0x14($s1) /* F1C0 80033DC0 8E440038 */ lw $a0, 0x38($s2) /* F1C4 80033DC4 50800005 */ beql $a0, $zero, .L80033DDC /* F1C8 80033DC8 24040128 */ addiu $a0, $zero, 0x128 /* F1CC 80033DCC 0C05178A */ jal read_background_size /* F1D0 80033DD0 00000000 */ nop /* F1D4 80033DD4 0800CF7B */ j .L80033DEC /* F1D8 80033DD8 00000000 */ nop .L80033DDC: /* F1DC 80033DDC 240500C8 */ addiu $a1, $zero, 0xC8 /* F1E0 80033DE0 2406000C */ addiu $a2, $zero, 0xC /* F1E4 80033DE4 0C05179C */ jal set_background_size /* F1E8 80033DE8 24070014 */ addiu $a3, $zero, 0x14 .L80033DEC: /* F1EC 80033DEC 3C04800B */ lui $a0, %hi(wMapTexName) /* F1F0 80033DF0 24840CF0 */ addiu $a0, $a0, %lo(wMapTexName) /* F1F4 80033DF4 0C016B74 */ jal get_asset_offset /* F1F8 80033DF8 27A50010 */ addiu $a1, $sp, 0x10 /* F1FC 80033DFC 8E440000 */ lw $a0, 0x0($s2) /* F200 80033E00 8FA60010 */ lw $a2, 0x10($sp) /* F204 80033E04 0C045709 */ jal load_model_textures /* F208 80033E08 0040282D */ daddu $a1, $v0, $zero /* F20C 80033E0C 0C04584B */ jal calculate_model_sizes /* F210 80033E10 00000000 */ nop /* F214 80033E14 0C00EC6C */ jal npc_reload_all /* F218 80033E18 00000000 */ nop /* F21C 80033E1C 3C02800A */ lui $v0, %hi(D_800A0904) /* F220 80033E20 8C420904 */ lw $v0, %lo(D_800A0904)($v0) /* F224 80033E24 3C04800A */ lui $a0, %hi(D_800A0908) /* F228 80033E28 8C840908 */ lw $a0, %lo(D_800A0908)($a0) /* F22C 80033E2C 10800003 */ beqz $a0, .L80033E3C /* F230 80033E30 AE620004 */ sw $v0, 0x4($s3) /* F234 80033E34 0C009C22 */ jal set_time_freeze_mode /* F238 80033E38 00000000 */ nop .L80033E3C: /* F23C 80033E3C 24040004 */ addiu $a0, $zero, 0x4 .L80033E40: /* F240 80033E40 0C00CD3C */ jal set_game_mode /* F244 80033E44 00000000 */ nop .L80033E48: /* F248 80033E48 8FBF0028 */ lw $ra, 0x28($sp) /* F24C 80033E4C 8FB30024 */ lw $s3, 0x24($sp) /* F250 80033E50 8FB20020 */ lw $s2, 0x20($sp) /* F254 80033E54 8FB1001C */ lw $s1, 0x1C($sp) /* F258 80033E58 8FB00018 */ lw $s0, 0x18($sp) /* F25C 80033E5C 03E00008 */ jr $ra /* F260 80033E60 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void state_step_end_battle(void) { PlayerStatus* playerStatus = &gPlayerStatus; PlayerData* playerData = &gPlayerData; if (D_800A0900 >= 0) { D_800A0900--; if (D_800A0900 == 0) { MapSettings* mapSettings; MapConfig* mapConfig; D_800A0900 = -1; nuGfxSetCfb(bFrameBuffers, 3); gOverrideFlags &= ~GLOBAL_OVERRIDES_8; nuContRmbForceStopEnd(); sfx_stop_env_sounds(); mapSettings = get_current_map_settings(); mapConfig = &gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID]; btl_restore_world_cameras(); gGameStatusPtr->isBattle = FALSE; func_8005AF84(); func_8002ACDC(); sfx_clear_env_sounds(1); gGameStatusPtr->peachFlags &= ~PEACH_STATUS_FLAG_IS_PEACH; battle_heap_create(); spr_init_sprites(gGameStatusPtr->playerSpriteSet); init_model_data(); init_sprite_shading_data(); init_entity_models(); reset_animator_list(); init_worker_list(); hud_element_set_aux_cache(0, 0); init_hud_element_list(); init_item_entity_list(); init_script_list(); init_npc_list(); init_entity_data(); init_trigger_list(); if (gGameStatusPtr->demoFlags & 1) { npc_reload_all(); playerStatus->animFlags = D_800A0904; set_game_mode(GAME_MODE_DEMO); } else { void* mapShape; u32 sizeTemp; partner_init_after_battle(playerData->currentPartner); load_map_script_lib(); mapShape = load_asset_by_name(wMapShapeName, &sizeTemp); decode_yay0(mapShape, &gMapShapeData); general_heap_free(mapShape); initialize_collision(); restore_map_collision_data(); if (mapConfig->dmaStart != NULL) { dma_copy(mapConfig->dmaStart, mapConfig->dmaEnd, mapConfig->dmaDest); } load_map_bg(mapConfig->bgName); if (mapSettings->background != NULL) { read_background_size(mapSettings->background); } else { set_background_size(296, 200, 12, 20); } load_model_textures(mapSettings->modelTreeRoot, get_asset_offset(wMapTexName, &sizeTemp), sizeTemp); calculate_model_sizes(); npc_reload_all(); playerStatus->animFlags = D_800A0904; if (D_800A0908 != 0) { set_time_freeze_mode(D_800A0908); } set_game_mode(GAME_MODE_CHANGE_MAP); } } } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802616F4 /* 18FFD4 802616F4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 18FFD8 802616F8 AFB20020 */ sw $s2, 0x20($sp) /* 18FFDC 802616FC 0080902D */ daddu $s2, $a0, $zero /* 18FFE0 80261700 AFB00018 */ sw $s0, 0x18($sp) /* 18FFE4 80261704 00A0802D */ daddu $s0, $a1, $zero /* 18FFE8 80261708 2404FFF6 */ addiu $a0, $zero, -0xA /* 18FFEC 8026170C AFBF0024 */ sw $ra, 0x24($sp) /* 18FFF0 80261710 0C00EABB */ jal get_npc_unsafe /* 18FFF4 80261714 AFB1001C */ sw $s1, 0x1C($sp) /* 18FFF8 80261718 12000024 */ beqz $s0, .L802617AC /* 18FFFC 8026171C 0040882D */ daddu $s1, $v0, $zero /* 190000 80261720 AE400074 */ sw $zero, 0x74($s2) /* 190004 80261724 C622003C */ lwc1 $f2, 0x3C($s1) /* 190008 80261728 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) /* 19000C 8026172C 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) /* 190010 80261730 44810000 */ mtc1 $at, $f0 /* 190014 80261734 AFA00014 */ sw $zero, 0x14($sp) /* 190018 80261738 E7A00010 */ swc1 $f0, 0x10($sp) /* 19001C 8026173C 8E250038 */ lw $a1, 0x38($s1) /* 190020 80261740 8E26003C */ lw $a2, 0x3C($s1) /* 190024 80261744 8E270040 */ lw $a3, 0x40($s1) /* 190028 80261748 3C01802A */ lui $at, %hi(D_8029FB94) /* 19002C 8026174C E422FB94 */ swc1 $f2, %lo(D_8029FB94)($at) /* 190030 80261750 0C01C5D4 */ jal fx_energy_orb_wave /* 190034 80261754 0000202D */ daddu $a0, $zero, $zero /* 190038 80261758 3C013727 */ lui $at, (0x3727C5AC >> 16) /* 19003C 8026175C 3421C5AC */ ori $at, $at, (0x3727C5AC & 0xFFFF) /* 190040 80261760 44810000 */ mtc1 $at, $f0 /* 190044 80261764 AFA00014 */ sw $zero, 0x14($sp) /* 190048 80261768 E7A00010 */ swc1 $f0, 0x10($sp) /* 19004C 8026176C 8E250038 */ lw $a1, 0x38($s1) /* 190050 80261770 8E26003C */ lw $a2, 0x3C($s1) /* 190054 80261774 8E270040 */ lw $a3, 0x40($s1) /* 190058 80261778 3C01802A */ lui $at, %hi(BattleMerleeOrbEffect) /* 19005C 8026177C AC22FB98 */ sw $v0, %lo(BattleMerleeOrbEffect)($at) /* 190060 80261780 0C01C5D4 */ jal fx_energy_orb_wave /* 190064 80261784 24040003 */ addiu $a0, $zero, 0x3 /* 190068 80261788 3C01802A */ lui $at, %hi(BattleMerleeWaveEffect) /* 19006C 8026178C AC22FB9C */ sw $v0, %lo(BattleMerleeWaveEffect)($at) /* 190070 80261790 2402000C */ addiu $v0, $zero, 0xC /* 190074 80261794 3C01802A */ lui $at, %hi(D_8029FBA4) /* 190078 80261798 A420FBA4 */ sh $zero, %lo(D_8029FBA4)($at) /* 19007C 8026179C 3C01802A */ lui $at, %hi(D_8029FB90) /* 190080 802617A0 AC22FB90 */ sw $v0, %lo(D_8029FB90)($at) /* 190084 802617A4 0C05272D */ jal sfx_play_sound /* 190088 802617A8 24042074 */ addiu $a0, $zero, 0x2074 .L802617AC: /* 19008C 802617AC 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 190090 802617B0 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 190094 802617B4 44810000 */ mtc1 $at, $f0 /* 190098 802617B8 C64C0074 */ lwc1 $f12, 0x74($s2) /* 19009C 802617BC 46806320 */ cvt.s.w $f12, $f12 /* 1900A0 802617C0 46006302 */ mul.s $f12, $f12, $f0 /* 1900A4 802617C4 00000000 */ nop /* 1900A8 802617C8 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 1900AC 802617CC 44810000 */ mtc1 $at, $f0 /* 1900B0 802617D0 0C00A85B */ jal sin_rad /* 1900B4 802617D4 46006303 */ div.s $f12, $f12, $f0 /* 1900B8 802617D8 3C014040 */ lui $at, (0x40400000 >> 16) /* 1900BC 802617DC 44811000 */ mtc1 $at, $f2 /* 1900C0 802617E0 00000000 */ nop /* 1900C4 802617E4 46020002 */ mul.s $f0, $f0, $f2 /* 1900C8 802617E8 00000000 */ nop /* 1900CC 802617EC 3C01802A */ lui $at, %hi(D_8029FB94) /* 1900D0 802617F0 C422FB94 */ lwc1 $f2, %lo(D_8029FB94)($at) /* 1900D4 802617F4 46001080 */ add.s $f2, $f2, $f0 /* 1900D8 802617F8 E622003C */ swc1 $f2, 0x3C($s1) /* 1900DC 802617FC 8E420074 */ lw $v0, 0x74($s2) /* 1900E0 80261800 2442000A */ addiu $v0, $v0, 0xA /* 1900E4 80261804 44826000 */ mtc1 $v0, $f12 /* 1900E8 80261808 00000000 */ nop /* 1900EC 8026180C 46806320 */ cvt.s.w $f12, $f12 /* 1900F0 80261810 0C00A6C9 */ jal clamp_angle /* 1900F4 80261814 AE420074 */ sw $v0, 0x74($s2) /* 1900F8 80261818 4600018D */ trunc.w.s $f6, $f0 /* 1900FC 8026181C E6460074 */ swc1 $f6, 0x74($s2) /* 190100 80261820 3C05802A */ lui $a1, %hi(BattleMerleeOrbEffect) /* 190104 80261824 8CA5FB98 */ lw $a1, %lo(BattleMerleeOrbEffect)($a1) /* 190108 80261828 C6200038 */ lwc1 $f0, 0x38($s1) /* 19010C 8026182C 3C014180 */ lui $at, (0x41800000 >> 16) D_80261830: /* 190110 80261830 44811000 */ mtc1 $at, $f2 /* 190114 80261834 8CA2000C */ lw $v0, 0xC($a1) /* 190118 80261838 E4400004 */ swc1 $f0, 0x4($v0) /* 19011C 8026183C C620003C */ lwc1 $f0, 0x3C($s1) /* 190120 80261840 46020000 */ add.s $f0, $f0, $f2 /* 190124 80261844 3C08802A */ lui $t0, %hi(BattleMerleeWaveEffect) /* 190128 80261848 2508FB9C */ addiu $t0, $t0, %lo(BattleMerleeWaveEffect) /* 19012C 8026184C E4400008 */ swc1 $f0, 0x8($v0) /* 190130 80261850 C6200040 */ lwc1 $f0, 0x40($s1) /* 190134 80261854 8D040000 */ lw $a0, 0x0($t0) /* 190138 80261858 E440000C */ swc1 $f0, 0xC($v0) /* 19013C 8026185C 8C82000C */ lw $v0, 0xC($a0) /* 190140 80261860 C6200038 */ lwc1 $f0, 0x38($s1) /* 190144 80261864 E4400004 */ swc1 $f0, 0x4($v0) /* 190148 80261868 C620003C */ lwc1 $f0, 0x3C($s1) /* 19014C 8026186C 46020000 */ add.s $f0, $f0, $f2 /* 190150 80261870 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 190154 80261874 44811000 */ mtc1 $at, $f2 /* 190158 80261878 E4400008 */ swc1 $f0, 0x8($v0) /* 19015C 8026187C C6200040 */ lwc1 $f0, 0x40($s1) D_80261880: /* 190160 80261880 46020000 */ add.s $f0, $f0, $f2 /* 190164 80261884 3C07802A */ lui $a3, %hi(D_8029FBA4) /* 190168 80261888 24E7FBA4 */ addiu $a3, $a3, %lo(D_8029FBA4) /* 19016C 8026188C E440000C */ swc1 $f0, 0xC($v0) /* 190170 80261890 84E30000 */ lh $v1, 0x0($a3) /* 190174 80261894 24060002 */ addiu $a2, $zero, 0x2 /* 190178 80261898 14660011 */ bne $v1, $a2, .L802618E0 /* 19017C 8026189C 24020001 */ addiu $v0, $zero, 0x1 /* 190180 802618A0 8CA2000C */ lw $v0, 0xC($a1) /* 190184 802618A4 3C013727 */ lui $at, (0x3727C5AC >> 16) /* 190188 802618A8 3421C5AC */ ori $at, $at, (0x3727C5AC & 0xFFFF) /* 19018C 802618AC 44810000 */ mtc1 $at, $f0 /* 190190 802618B0 00000000 */ nop /* 190194 802618B4 E4400030 */ swc1 $f0, 0x30($v0) /* 190198 802618B8 8C82000C */ lw $v0, 0xC($a0) /* 19019C 802618BC E4400030 */ swc1 $f0, 0x30($v0) /* 1901A0 802618C0 8CA20000 */ lw $v0, 0x0($a1) /* 1901A4 802618C4 34420010 */ ori $v0, $v0, 0x10 /* 1901A8 802618C8 ACA20000 */ sw $v0, 0x0($a1) /* 1901AC 802618CC 8C830000 */ lw $v1, 0x0($a0) /* 1901B0 802618D0 24020001 */ addiu $v0, $zero, 0x1 /* 1901B4 802618D4 34630010 */ ori $v1, $v1, 0x10 /* 1901B8 802618D8 08098667 */ j .L8026199C /* 1901BC 802618DC AC830000 */ sw $v1, 0x0($a0) .L802618E0: /* 1901C0 802618E0 1462002E */ bne $v1, $v0, .L8026199C /* 1901C4 802618E4 0000102D */ daddu $v0, $zero, $zero /* 1901C8 802618E8 8CA2000C */ lw $v0, 0xC($a1) /* 1901CC 802618EC C4400030 */ lwc1 $f0, 0x30($v0) /* 1901D0 802618F0 3C01802A */ lui $at, %hi(D_8029D590) /* 1901D4 802618F4 D422D590 */ ldc1 $f2, %lo(D_8029D590)($at) /* 1901D8 802618F8 46000021 */ cvt.d.s $f0, $f0 /* 1901DC 802618FC 46220000 */ add.d $f0, $f0, $f2 /* 1901E0 80261900 3C01400C */ lui $at, (0x400C0000 >> 16) /* 1901E4 80261904 44812800 */ mtc1 $at, $f5 /* 1901E8 80261908 44802000 */ mtc1 $zero, $f4 /* 1901EC 8026190C 46200020 */ cvt.s.d $f0, $f0 /* 1901F0 80261910 460000A1 */ cvt.d.s $f2, $f0 /* 1901F4 80261914 4622203C */ c.lt.d $f4, $f2 /* 1901F8 80261918 00000000 */ nop /* 1901FC 8026191C 45000005 */ bc1f .L80261934 /* 190200 80261920 E4400030 */ swc1 $f0, 0x30($v0) /* 190204 80261924 3C014060 */ lui $at, (0x40600000 >> 16) /* 190208 80261928 44810000 */ mtc1 $at, $f0 /* 19020C 8026192C 00000000 */ nop /* 190210 80261930 E4400030 */ swc1 $f0, 0x30($v0) .L80261934: /* 190214 80261934 3C03802A */ lui $v1, %hi(D_8029FB90) /* 190218 80261938 2463FB90 */ addiu $v1, $v1, %lo(D_8029FB90) /* 19021C 8026193C 8C620000 */ lw $v0, 0x0($v1) /* 190220 80261940 10400003 */ beqz $v0, .L80261950 /* 190224 80261944 2442FFFF */ addiu $v0, $v0, -0x1 /* 190228 80261948 08098666 */ j .L80261998 /* 19022C 8026194C AC620000 */ sw $v0, 0x0($v1) .L80261950: /* 190230 80261950 8D020000 */ lw $v0, 0x0($t0) /* 190234 80261954 8C42000C */ lw $v0, 0xC($v0) /* 190238 80261958 C4400030 */ lwc1 $f0, 0x30($v0) /* 19023C 8026195C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 190240 80261960 44811800 */ mtc1 $at, $f3 /* 190244 80261964 44801000 */ mtc1 $zero, $f2 /* 190248 80261968 46000021 */ cvt.d.s $f0, $f0 /* 19024C 8026196C 46220000 */ add.d $f0, $f0, $f2 /* 190250 80261970 3C014014 */ lui $at, (0x40140000 >> 16) /* 190254 80261974 44812800 */ mtc1 $at, $f5 /* 190258 80261978 44802000 */ mtc1 $zero, $f4 /* 19025C 8026197C 46200020 */ cvt.s.d $f0, $f0 /* 190260 80261980 460000A1 */ cvt.d.s $f2, $f0 /* 190264 80261984 4622203C */ c.lt.d $f4, $f2 /* 190268 80261988 00000000 */ nop /* 19026C 8026198C 45000002 */ bc1f .L80261998 /* 190270 80261990 E4400030 */ swc1 $f0, 0x30($v0) /* 190274 80261994 A4E60000 */ sh $a2, 0x0($a3) .L80261998: /* 190278 80261998 0000102D */ daddu $v0, $zero, $zero .L8026199C: /* 19027C 8026199C 8FBF0024 */ lw $ra, 0x24($sp) /* 190280 802619A0 8FB20020 */ lw $s2, 0x20($sp) /* 190284 802619A4 8FB1001C */ lw $s1, 0x1C($sp) /* 190288 802619A8 8FB00018 */ lw $s0, 0x18($sp) /* 19028C 802619AC 03E00008 */ jr $ra /* 190290 802619B0 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(BattleMerleeUpdateFX) { Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE); EnergyOrbWaveFXData* data; if (isInitialCall) { script->functionTemp[1] = 0; D_8029FB94 = merlee->pos.y; BattleMerleeOrbEffect = fx_energy_orb_wave(0, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.4f, 0); BattleMerleeWaveEffect = fx_energy_orb_wave(3, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.00001f, 0); D_8029FBA4 = 0; D_8029FB90 = 12; sfx_play_sound(SOUND_2074); } merlee->pos.y = D_8029FB94 + (sin_rad(DEG_TO_RAD(script->functionTemp[1])) * 3.0f); script->functionTemp[1] += 10; script->functionTemp[1] = clamp_angle(script->functionTemp[1]); data = BattleMerleeOrbEffect->data.energyOrbWave; data->pos.x = merlee->pos.x; data->pos.y = merlee->pos.y + 16.0f; data->pos.z = merlee->pos.z; data = BattleMerleeWaveEffect->data.energyOrbWave; data->pos.x = merlee->pos.x; data->pos.y = merlee->pos.y + 16.0f; data->pos.z = merlee->pos.z + 5.0f; if (D_8029FBA4 == 2) { BattleMerleeOrbEffect->data.energyOrbWave->scale = 0.00001f; BattleMerleeWaveEffect->data.energyOrbWave->scale = 0.00001f; BattleMerleeOrbEffect->flags |= FX_INSTANCE_FLAG_DISMISS; BattleMerleeWaveEffect->flags |= FX_INSTANCE_FLAG_DISMISS; return ApiStatus_DONE1; } if (D_8029FBA4 == 1) { data = BattleMerleeOrbEffect->data.energyOrbWave; data->scale += 0.35; if (data->scale > 3.5) { data->scale = 3.5f; } if (D_8029FB90 != 0) { D_8029FB90--; } else { data = BattleMerleeWaveEffect->data.energyOrbWave; data->scale += 0.5; if (data->scale > 5.0) { D_8029FBA4 = 2; } } } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel draw_msg /* BCBEC 801264EC 27BDFA58 */ addiu $sp, $sp, -0x5A8 /* BCBF0 801264F0 8FA205BC */ lw $v0, 0x5BC($sp) /* BCBF4 801264F4 AFB7059C */ sw $s7, 0x59C($sp) /* BCBF8 801264F8 8FB705B8 */ lw $s7, 0x5B8($sp) /* BCBFC 801264FC AFB00580 */ sw $s0, 0x580($sp) /* BCC00 80126500 0080802D */ daddu $s0, $a0, $zero /* BCC04 80126504 AFBE05A0 */ sw $fp, 0x5A0($sp) /* BCC08 80126508 00E0F02D */ daddu $fp, $a3, $zero /* BCC0C 8012650C AFB60598 */ sw $s6, 0x598($sp) /* BCC10 80126510 0000B02D */ daddu $s6, $zero, $zero /* BCC14 80126514 AFB20588 */ sw $s2, 0x588($sp) /* BCC18 80126518 02C0902D */ daddu $s2, $s6, $zero /* BCC1C 8012651C AFB40590 */ sw $s4, 0x590($sp) /* BCC20 80126520 0000A02D */ daddu $s4, $zero, $zero /* BCC24 80126524 AFB3058C */ sw $s3, 0x58C($sp) /* BCC28 80126528 0280982D */ daddu $s3, $s4, $zero /* BCC2C 8012652C AFBF05A4 */ sw $ra, 0x5A4($sp) /* BCC30 80126530 AFB50594 */ sw $s5, 0x594($sp) /* BCC34 80126534 AFB10584 */ sw $s1, 0x584($sp) /* BCC38 80126538 AFA505AC */ sw $a1, 0x5AC($sp) /* BCC3C 8012653C AFA605B0 */ sw $a2, 0x5B0($sp) /* BCC40 80126540 12000087 */ beqz $s0, .L80126760 /* BCC44 80126544 0040A82D */ daddu $s5, $v0, $zero /* BCC48 80126548 30420001 */ andi $v0, $v0, 0x1 /* BCC4C 8012654C 10400003 */ beqz $v0, .L8012655C /* BCC50 80126550 2BC200FF */ slti $v0, $fp, 0xFF /* BCC54 80126554 24160002 */ addiu $s6, $zero, 0x2 /* BCC58 80126558 24130001 */ addiu $s3, $zero, 0x1 .L8012655C: /* BCC5C 8012655C 54400001 */ bnel $v0, $zero, .L80126564 /* BCC60 80126560 36D60001 */ ori $s6, $s6, 0x1 .L80126564: /* BCC64 80126564 27B10020 */ addiu $s1, $sp, 0x20 /* BCC68 80126568 0220202D */ daddu $a0, $s1, $zero /* BCC6C 8012656C 24050001 */ addiu $a1, $zero, 0x1 /* BCC70 80126570 0C0495A9 */ jal initialize_printer /* BCC74 80126574 0000302D */ daddu $a2, $zero, $zero /* BCC78 80126578 06010003 */ bgez $s0, .L80126588 /* BCC7C 8012657C 00000000 */ nop /* BCC80 80126580 08049975 */ j .L801265D4 /* BCC84 80126584 AFB00020 */ sw $s0, 0x20($sp) .L80126588: /* BCC88 80126588 0C00AB0A */ jal general_heap_malloc /* BCC8C 8012658C 24040400 */ addiu $a0, $zero, 0x400 /* BCC90 80126590 0040A02D */ daddu $s4, $v0, $zero /* BCC94 80126594 0200202D */ daddu $a0, $s0, $zero /* BCC98 80126598 0C049601 */ jal dma_load_msg /* BCC9C 8012659C 0280282D */ daddu $a1, $s4, $zero /* BCCA0 801265A0 0000282D */ daddu $a1, $zero, $zero /* BCCA4 801265A4 27B00578 */ addiu $s0, $sp, 0x578 /* BCCA8 801265A8 0200302D */ daddu $a2, $s0, $zero /* BCCAC 801265AC AFB40020 */ sw $s4, 0x20($sp) /* BCCB0 801265B0 AFA00010 */ sw $zero, 0x10($sp) /* BCCB4 801265B4 AFA00014 */ sw $zero, 0x14($sp) /* BCCB8 801265B8 AFA00018 */ sw $zero, 0x18($sp) /* BCCBC 801265BC AFB3001C */ sw $s3, 0x1C($sp) /* BCCC0 801265C0 0280202D */ daddu $a0, $s4, $zero /* BCCC4 801265C4 0C0497DA */ jal get_msg_properties /* BCCC8 801265C8 00A0382D */ daddu $a3, $a1, $zero /* BCCCC 801265CC 96020002 */ lhu $v0, 0x2($s0) /* BCCD0 801265D0 A7A20558 */ sh $v0, 0x558($sp) .L801265D4: /* BCCD4 801265D4 06E00011 */ bltz $s7, .L8012661C /* BCCD8 801265D8 26450001 */ addiu $a1, $s2, 0x1 /* BCCDC 801265DC 24A40001 */ addiu $a0, $a1, 0x1 /* BCCE0 801265E0 3242FFFF */ andi $v0, $s2, 0xFFFF /* BCCE4 801265E4 02221021 */ addu $v0, $s1, $v0 /* BCCE8 801265E8 240300FF */ addiu $v1, $zero, 0xFF /* BCCEC 801265EC A0430010 */ sb $v1, 0x10($v0) /* BCCF0 801265F0 30A2FFFF */ andi $v0, $a1, 0xFFFF /* BCCF4 801265F4 02221021 */ addu $v0, $s1, $v0 /* BCCF8 801265F8 24030004 */ addiu $v1, $zero, 0x4 /* BCCFC 801265FC 3084FFFF */ andi $a0, $a0, 0xFFFF /* BCD00 80126600 02242021 */ addu $a0, $s1, $a0 /* BCD04 80126604 A0430010 */ sb $v1, 0x10($v0) /* BCD08 80126608 A0970010 */ sb $s7, 0x10($a0) /* BCD0C 8012660C 96220004 */ lhu $v0, 0x4($s1) /* BCD10 80126610 24B20002 */ addiu $s2, $a1, 0x2 /* BCD14 80126614 24420003 */ addiu $v0, $v0, 0x3 /* BCD18 80126618 A6220004 */ sh $v0, 0x4($s1) .L8012661C: /* BCD1C 8012661C 32A20002 */ andi $v0, $s5, 0x2 /* BCD20 80126620 10400012 */ beqz $v0, .L8012666C /* BCD24 80126624 26450001 */ addiu $a1, $s2, 0x1 /* BCD28 80126628 24A40001 */ addiu $a0, $a1, 0x1 /* BCD2C 8012662C 3242FFFF */ andi $v0, $s2, 0xFFFF /* BCD30 80126630 02221021 */ addu $v0, $s1, $v0 /* BCD34 80126634 240300FF */ addiu $v1, $zero, 0xFF /* BCD38 80126638 A0430010 */ sb $v1, 0x10($v0) /* BCD3C 8012663C 30A2FFFF */ andi $v0, $a1, 0xFFFF /* BCD40 80126640 02221021 */ addu $v0, $s1, $v0 /* BCD44 80126644 2403001C */ addiu $v1, $zero, 0x1C /* BCD48 80126648 3084FFFF */ andi $a0, $a0, 0xFFFF /* BCD4C 8012664C 02242021 */ addu $a0, $s1, $a0 /* BCD50 80126650 A0430010 */ sb $v1, 0x10($v0) /* BCD54 80126654 24020008 */ addiu $v0, $zero, 0x8 /* BCD58 80126658 A0820010 */ sb $v0, 0x10($a0) /* BCD5C 8012665C 96220004 */ lhu $v0, 0x4($s1) /* BCD60 80126660 24B20002 */ addiu $s2, $a1, 0x2 /* BCD64 80126664 24420003 */ addiu $v0, $v0, 0x3 /* BCD68 80126668 A6220004 */ sh $v0, 0x4($s1) .L8012666C: /* BCD6C 8012666C 32A20004 */ andi $v0, $s5, 0x4 /* BCD70 80126670 10400012 */ beqz $v0, .L801266BC /* BCD74 80126674 26450001 */ addiu $a1, $s2, 0x1 /* BCD78 80126678 24A40001 */ addiu $a0, $a1, 0x1 /* BCD7C 8012667C 3242FFFF */ andi $v0, $s2, 0xFFFF /* BCD80 80126680 02221021 */ addu $v0, $s1, $v0 /* BCD84 80126684 240300FF */ addiu $v1, $zero, 0xFF /* BCD88 80126688 A0430010 */ sb $v1, 0x10($v0) /* BCD8C 8012668C 30A2FFFF */ andi $v0, $a1, 0xFFFF /* BCD90 80126690 02221021 */ addu $v0, $s1, $v0 /* BCD94 80126694 2403001C */ addiu $v1, $zero, 0x1C /* BCD98 80126698 3084FFFF */ andi $a0, $a0, 0xFFFF /* BCD9C 8012669C 02242021 */ addu $a0, $s1, $a0 /* BCDA0 801266A0 A0430010 */ sb $v1, 0x10($v0) /* BCDA4 801266A4 24020009 */ addiu $v0, $zero, 0x9 /* BCDA8 801266A8 A0820010 */ sb $v0, 0x10($a0) /* BCDAC 801266AC 96220004 */ lhu $v0, 0x4($s1) /* BCDB0 801266B0 24B20002 */ addiu $s2, $a1, 0x2 /* BCDB4 801266B4 24420003 */ addiu $v0, $v0, 0x3 /* BCDB8 801266B8 A6220004 */ sh $v0, 0x4($s1) .L801266BC: /* BCDBC 801266BC 32A20008 */ andi $v0, $s5, 0x8 /* BCDC0 801266C0 10400011 */ beqz $v0, .L80126708 /* BCDC4 801266C4 26440001 */ addiu $a0, $s2, 0x1 /* BCDC8 801266C8 24850001 */ addiu $a1, $a0, 0x1 /* BCDCC 801266CC 3242FFFF */ andi $v0, $s2, 0xFFFF /* BCDD0 801266D0 02221021 */ addu $v0, $s1, $v0 /* BCDD4 801266D4 240300FF */ addiu $v1, $zero, 0xFF /* BCDD8 801266D8 3084FFFF */ andi $a0, $a0, 0xFFFF /* BCDDC 801266DC 02242021 */ addu $a0, $s1, $a0 /* BCDE0 801266E0 A0430010 */ sb $v1, 0x10($v0) /* BCDE4 801266E4 2402001C */ addiu $v0, $zero, 0x1C /* BCDE8 801266E8 30A5FFFF */ andi $a1, $a1, 0xFFFF /* BCDEC 801266EC 02252821 */ addu $a1, $s1, $a1 /* BCDF0 801266F0 A0820010 */ sb $v0, 0x10($a0) /* BCDF4 801266F4 2402000E */ addiu $v0, $zero, 0xE glabel func_801266F8 /* BCDF8 801266F8 A0A20010 */ sb $v0, 0x10($a1) /* BCDFC 801266FC 96220004 */ lhu $v0, 0x4($s1) /* BCE00 80126700 24420003 */ addiu $v0, $v0, 0x3 /* BCE04 80126704 A6220004 */ sh $v0, 0x4($s1) .L80126708: /* BCE08 80126708 0220202D */ daddu $a0, $s1, $zero /* BCE0C 8012670C 24052710 */ addiu $a1, $zero, 0x2710 /* BCE10 80126710 0C04915C */ jal msg_copy_to_print_buffer /* BCE14 80126714 24060001 */ addiu $a2, $zero, 0x1 /* BCE18 80126718 0220202D */ daddu $a0, $s1, $zero /* BCE1C 8012671C 0000382D */ daddu $a3, $zero, $zero /* BCE20 80126720 8FA805AC */ lw $t0, 0x5AC($sp) /* BCE24 80126724 32C2FFFF */ andi $v0, $s6, 0xFFFF /* BCE28 80126728 AFA20014 */ sw $v0, 0x14($sp) /* BCE2C 8012672C 33C200FF */ andi $v0, $fp, 0xFF /* BCE30 80126730 AFA00010 */ sw $zero, 0x10($sp) glabel func_80126734 /* BCE34 80126734 AFA20018 */ sw $v0, 0x18($sp) /* BCE38 80126738 00082C00 */ sll $a1, $t0, 16 /* BCE3C 8012673C 8FA805B0 */ lw $t0, 0x5B0($sp) /* BCE40 80126740 00052C03 */ sra $a1, $a1, 16 /* BCE44 80126744 00083400 */ sll $a2, $t0, 16 /* BCE48 80126748 0C049F64 */ jal appendGfx_message /* BCE4C 8012674C 00063403 */ sra $a2, $a2, 16 /* BCE50 80126750 12800003 */ beqz $s4, .L80126760 /* BCE54 80126754 00000000 */ nop /* BCE58 80126758 0C00AB1E */ jal general_heap_free /* BCE5C 8012675C 0280202D */ daddu $a0, $s4, $zero .L80126760: /* BCE60 80126760 8FBF05A4 */ lw $ra, 0x5A4($sp) /* BCE64 80126764 8FBE05A0 */ lw $fp, 0x5A0($sp) /* BCE68 80126768 8FB7059C */ lw $s7, 0x59C($sp) /* BCE6C 8012676C 8FB60598 */ lw $s6, 0x598($sp) /* BCE70 80126770 8FB50594 */ lw $s5, 0x594($sp) /* BCE74 80126774 8FB40590 */ lw $s4, 0x590($sp) /* BCE78 80126778 8FB3058C */ lw $s3, 0x58C($sp) /* BCE7C 8012677C 8FB20588 */ lw $s2, 0x588($sp) /* BCE80 80126780 8FB10584 */ lw $s1, 0x584($sp) /* BCE84 80126784 8FB00580 */ lw $s0, 0x580($sp) /* BCE88 80126788 03E00008 */ jr $ra /* BCE8C 8012678C 27BD05A8 */ addiu $sp, $sp, 0x5A8 ### DECOMPILED C INSTRUCTIONS: void draw_msg(s32 msgID, s32 posX, s32 posY, s32 opacity, s32 palette, u8 style) { MessagePrintState stackPrinter; MessagePrintState* printer; u16 bufferPos; s8* mallocSpace; s32 charset; u16 flags; s32 width; flags = 0; bufferPos = 0; mallocSpace = NULL; charset = 0; if (msgID != 0) { if (style & DRAW_MSG_STYLE_MENU) { flags = 2; charset = 1; } if (opacity < 0xFF) { flags |= 1; } printer = &stackPrinter; initialize_printer(printer, 1, 0); if (msgID < 0) { printer->srcBuffer = (u8*)msgID; } else { mallocSpace = general_heap_malloc(0x400); dma_load_msg(msgID, mallocSpace); printer->srcBuffer = mallocSpace; get_msg_properties((s32) printer->srcBuffer, 0, &width, 0, 0, 0, 0, charset); printer->msgWidth = width; } if (palette >= 0) { printer->printBuffer[bufferPos++] = MSG_CHAR_PRINT_FUNCTION; printer->printBuffer[bufferPos++] = MSG_PRINT_FUNC_COLOR; printer->printBuffer[bufferPos++] = palette; printer->printBufferPos += 3; } if (style & DRAW_MSG_STYLE_WAVY) { printer->printBuffer[bufferPos++] = MSG_CHAR_PRINT_FUNCTION; printer->printBuffer[bufferPos++] = MSG_PRINT_FUNC_START_FX; printer->printBuffer[bufferPos++] = MSG_FX_GLOBAL_WAVE; printer->printBufferPos += 3; } if (style & DRAW_MSG_STYLE_RAINBOW) { printer->printBuffer[bufferPos++] = MSG_CHAR_PRINT_FUNCTION; printer->printBuffer[bufferPos++] = MSG_PRINT_FUNC_START_FX; printer->printBuffer[bufferPos++] = MSG_FX_GLOBAL_RAINBOW; printer->printBufferPos += 3; } if (style & DRAW_MSG_STYLE_DROP_SHADOW) { printer->printBuffer[bufferPos++] = MSG_CHAR_PRINT_FUNCTION; printer->printBuffer[bufferPos++] = MSG_PRINT_FUNC_START_FX; printer->printBuffer[bufferPos++] = MSG_FX_DROP_SHADOW; printer->printBufferPos += 3; } msg_copy_to_print_buffer(printer, 10000, 1); appendGfx_message(printer, (s16)posX, (s16)posY, 0, 0, flags, opacity & 0xFF); if (mallocSpace != NULL) { general_heap_free(mallocSpace); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E010E000 /* 3EB4E0 E010E000 14A00004 */ bnez $a1, .LE010E014 /* 3EB4E4 E010E004 8C83001C */ lw $v1, 0x1C($a0) /* 3EB4E8 E010E008 C4860004 */ lwc1 $f6, 0x4($a0) /* 3EB4EC E010E00C 08043807 */ j .LE010E01C /* 3EB4F0 E010E010 C4840008 */ lwc1 $f4, 0x8($a0) .LE010E014: /* 3EB4F4 E010E014 C4860010 */ lwc1 $f6, 0x10($a0) /* 3EB4F8 E010E018 C4840014 */ lwc1 $f4, 0x14($a0) .LE010E01C: /* 3EB4FC E010E01C 10C000C1 */ beqz $a2, .LE010E324 /* 3EB500 E010E020 00000000 */ nop /* 3EB504 E010E024 8CC20000 */ lw $v0, 0x0($a2) /* 3EB508 E010E028 104000B5 */ beqz $v0, .LE010E300 /* 3EB50C E010E02C 00035080 */ sll $t2, $v1, 2 /* 3EB510 E010E030 3C08800A */ lui $t0, %hi(gMainGfxPos) /* 3EB514 E010E034 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* 3EB518 E010E038 3C014080 */ lui $at, (0x40800000 >> 16) /* 3EB51C E010E03C 44814000 */ mtc1 $at, $f8 /* 3EB520 E010E040 24C70006 */ addiu $a3, $a2, 0x6 .LE010E044: /* 3EB524 E010E044 8D040000 */ lw $a0, 0x0($t0) /* 3EB528 E010E048 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 3EB52C E010E04C 0080182D */ daddu $v1, $a0, $zero /* 3EB530 E010E050 AC620000 */ sw $v0, 0x0($v1) /* 3EB534 E010E054 8CC20000 */ lw $v0, 0x0($a2) /* 3EB538 E010E058 24840008 */ addiu $a0, $a0, 0x8 /* 3EB53C E010E05C AC620004 */ sw $v0, 0x4($v1) /* 3EB540 E010E060 84E2FFFE */ lh $v0, -0x2($a3) /* 3EB544 E010E064 3C03F200 */ lui $v1, (0xF2000000 >> 16) /* 3EB548 E010E068 2442FE80 */ addiu $v0, $v0, -0x180 /* 3EB54C E010E06C 01421023 */ subu $v0, $t2, $v0 /* 3EB550 E010E070 00021080 */ sll $v0, $v0, 2 /* 3EB554 E010E074 30420FFF */ andi $v0, $v0, 0xFFF /* 3EB558 E010E078 00021300 */ sll $v0, $v0, 12 /* 3EB55C E010E07C 00431025 */ or $v0, $v0, $v1 /* 3EB560 E010E080 AC820000 */ sw $v0, 0x0($a0) /* 3EB564 E010E084 84E2FFFE */ lh $v0, -0x2($a3) /* 3EB568 E010E088 3C030100 */ lui $v1, (0x1000000 >> 16) /* 3EB56C E010E08C 01421023 */ subu $v0, $t2, $v0 /* 3EB570 E010E090 244201FF */ addiu $v0, $v0, 0x1FF /* 3EB574 E010E094 00021080 */ sll $v0, $v0, 2 /* 3EB578 E010E098 30420FFF */ andi $v0, $v0, 0xFFF /* 3EB57C E010E09C 00021300 */ sll $v0, $v0, 12 /* 3EB580 E010E0A0 00431025 */ or $v0, $v0, $v1 /* 3EB584 E010E0A4 AC820004 */ sw $v0, 0x4($a0) /* 3EB588 E010E0A8 84E2FFFE */ lh $v0, -0x2($a3) /* 3EB58C E010E0AC 44821000 */ mtc1 $v0, $f2 /* 3EB590 E010E0B0 00000000 */ nop /* 3EB594 E010E0B4 468010A0 */ cvt.s.w $f2, $f2 /* 3EB598 E010E0B8 46023080 */ add.s $f2, $f6, $f2 /* 3EB59C E010E0BC 84E20002 */ lh $v0, 0x2($a3) /* 3EB5A0 E010E0C0 44820000 */ mtc1 $v0, $f0 /* 3EB5A4 E010E0C4 00000000 */ nop /* 3EB5A8 E010E0C8 46800020 */ cvt.s.w $f0, $f0 /* 3EB5AC E010E0CC 46001080 */ add.s $f2, $f2, $f0 /* 3EB5B0 E010E0D0 AD040000 */ sw $a0, 0x0($t0) /* 3EB5B4 E010E0D4 24820008 */ addiu $v0, $a0, 0x8 /* 3EB5B8 E010E0D8 46081082 */ mul.s $f2, $f2, $f8 /* 3EB5BC E010E0DC 00000000 */ nop /* 3EB5C0 E010E0E0 24840010 */ addiu $a0, $a0, 0x10 /* 3EB5C4 E010E0E4 AD020000 */ sw $v0, 0x0($t0) /* 3EB5C8 E010E0E8 AD040000 */ sw $a0, 0x0($t0) /* 3EB5CC E010E0EC 0040202D */ daddu $a0, $v0, $zero /* 3EB5D0 E010E0F0 4600128D */ trunc.w.s $f10, $f2 /* 3EB5D4 E010E0F4 44025000 */ mfc1 $v0, $f10 /* 3EB5D8 E010E0F8 00000000 */ nop /* 3EB5DC E010E0FC 00021400 */ sll $v0, $v0, 16 /* 3EB5E0 E010E100 00021403 */ sra $v0, $v0, 16 /* 3EB5E4 E010E104 18400005 */ blez $v0, .LE010E11C /* 3EB5E8 E010E108 30420FFF */ andi $v0, $v0, 0xFFF /* 3EB5EC E010E10C 00021300 */ sll $v0, $v0, 12 /* 3EB5F0 E010E110 3C03E400 */ lui $v1, (0xE4000000 >> 16) /* 3EB5F4 E010E114 08043848 */ j .LE010E120 /* 3EB5F8 E010E118 00431825 */ or $v1, $v0, $v1 .LE010E11C: /* 3EB5FC E010E11C 3C03E400 */ lui $v1, (0xE4000000 >> 16) .LE010E120: /* 3EB600 E010E120 84E20000 */ lh $v0, 0x0($a3) /* 3EB604 E010E124 44820000 */ mtc1 $v0, $f0 /* 3EB608 E010E128 00000000 */ nop /* 3EB60C E010E12C 46800020 */ cvt.s.w $f0, $f0 /* 3EB610 E010E130 84E20004 */ lh $v0, 0x4($a3) /* 3EB614 E010E134 46002000 */ add.s $f0, $f4, $f0 /* 3EB618 E010E138 44821000 */ mtc1 $v0, $f2 /* 3EB61C E010E13C 00000000 */ nop /* 3EB620 E010E140 468010A0 */ cvt.s.w $f2, $f2 /* 3EB624 E010E144 46020000 */ add.s $f0, $f0, $f2 /* 3EB628 E010E148 46080002 */ mul.s $f0, $f0, $f8 /* 3EB62C E010E14C 00000000 */ nop /* 3EB630 E010E150 4600028D */ trunc.w.s $f10, $f0 /* 3EB634 E010E154 44025000 */ mfc1 $v0, $f10 /* 3EB638 E010E158 00000000 */ nop /* 3EB63C E010E15C 00021400 */ sll $v0, $v0, 16 /* 3EB640 E010E160 00021403 */ sra $v0, $v0, 16 /* 3EB644 E010E164 18400002 */ blez $v0, .LE010E170 /* 3EB648 E010E168 30420FFF */ andi $v0, $v0, 0xFFF /* 3EB64C E010E16C 00621825 */ or $v1, $v1, $v0 .LE010E170: /* 3EB650 E010E170 AC830000 */ sw $v1, 0x0($a0) /* 3EB654 E010E174 84E2FFFE */ lh $v0, -0x2($a3) /* 3EB658 E010E178 44820000 */ mtc1 $v0, $f0 /* 3EB65C E010E17C 00000000 */ nop /* 3EB660 E010E180 46800020 */ cvt.s.w $f0, $f0 /* 3EB664 E010E184 46003000 */ add.s $f0, $f6, $f0 /* 3EB668 E010E188 46080002 */ mul.s $f0, $f0, $f8 /* 3EB66C E010E18C 00000000 */ nop /* 3EB670 E010E190 4600028D */ trunc.w.s $f10, $f0 /* 3EB674 E010E194 44025000 */ mfc1 $v0, $f10 /* 3EB678 E010E198 00000000 */ nop /* 3EB67C E010E19C 00021400 */ sll $v0, $v0, 16 /* 3EB680 E010E1A0 00021403 */ sra $v0, $v0, 16 /* 3EB684 E010E1A4 18400004 */ blez $v0, .LE010E1B8 /* 3EB688 E010E1A8 24850004 */ addiu $a1, $a0, 0x4 /* 3EB68C E010E1AC 30420FFF */ andi $v0, $v0, 0xFFF /* 3EB690 E010E1B0 0804386F */ j .LE010E1BC /* 3EB694 E010E1B4 00021B00 */ sll $v1, $v0, 12 .LE010E1B8: /* 3EB698 E010E1B8 0000182D */ daddu $v1, $zero, $zero .LE010E1BC: /* 3EB69C E010E1BC 84E20000 */ lh $v0, 0x0($a3) /* 3EB6A0 E010E1C0 44820000 */ mtc1 $v0, $f0 /* 3EB6A4 E010E1C4 00000000 */ nop /* 3EB6A8 E010E1C8 46800020 */ cvt.s.w $f0, $f0 /* 3EB6AC E010E1CC 46002000 */ add.s $f0, $f4, $f0 /* 3EB6B0 E010E1D0 46080002 */ mul.s $f0, $f0, $f8 /* 3EB6B4 E010E1D4 00000000 */ nop /* 3EB6B8 E010E1D8 4600028D */ trunc.w.s $f10, $f0 /* 3EB6BC E010E1DC 44025000 */ mfc1 $v0, $f10 /* 3EB6C0 E010E1E0 00000000 */ nop /* 3EB6C4 E010E1E4 00021400 */ sll $v0, $v0, 16 /* 3EB6C8 E010E1E8 00021403 */ sra $v0, $v0, 16 /* 3EB6CC E010E1EC 18400003 */ blez $v0, .LE010E1FC /* 3EB6D0 E010E1F0 0060202D */ daddu $a0, $v1, $zero /* 3EB6D4 E010E1F4 30420FFF */ andi $v0, $v0, 0xFFF /* 3EB6D8 E010E1F8 00822025 */ or $a0, $a0, $v0 .LE010E1FC: /* 3EB6DC E010E1FC 8D030000 */ lw $v1, 0x0($t0) /* 3EB6E0 E010E200 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* 3EB6E4 E010E204 ACA40000 */ sw $a0, 0x0($a1) /* 3EB6E8 E010E208 0060202D */ daddu $a0, $v1, $zero /* 3EB6EC E010E20C AC820000 */ sw $v0, 0x0($a0) /* 3EB6F0 E010E210 84E2FFFE */ lh $v0, -0x2($a3) /* 3EB6F4 E010E214 44820000 */ mtc1 $v0, $f0 /* 3EB6F8 E010E218 00000000 */ nop /* 3EB6FC E010E21C 46800020 */ cvt.s.w $f0, $f0 /* 3EB700 E010E220 46003000 */ add.s $f0, $f6, $f0 /* 3EB704 E010E224 46080002 */ mul.s $f0, $f0, $f8 /* 3EB708 E010E228 00000000 */ nop /* 3EB70C E010E22C 24630008 */ addiu $v1, $v1, 0x8 /* 3EB710 E010E230 24890004 */ addiu $t1, $a0, 0x4 /* 3EB714 E010E234 4600028D */ trunc.w.s $f10, $f0 /* 3EB718 E010E238 44025000 */ mfc1 $v0, $f10 /* 3EB71C E010E23C 00000000 */ nop /* 3EB720 E010E240 00021400 */ sll $v0, $v0, 16 /* 3EB724 E010E244 00021403 */ sra $v0, $v0, 16 /* 3EB728 E010E248 04410007 */ bgez $v0, .LE010E268 /* 3EB72C E010E24C AD030000 */ sw $v1, 0x0($t0) /* 3EB730 E010E250 000210C0 */ sll $v0, $v0, 3 /* 3EB734 E010E254 5C400001 */ bgtzl $v0, .LE010E25C /* 3EB738 E010E258 0000102D */ daddu $v0, $zero, $zero .LE010E25C: /* 3EB73C E010E25C 00021023 */ negu $v0, $v0 /* 3EB740 E010E260 0804389B */ j .LE010E26C /* 3EB744 E010E264 00021C00 */ sll $v1, $v0, 16 .LE010E268: /* 3EB748 E010E268 0000182D */ daddu $v1, $zero, $zero .LE010E26C: /* 3EB74C E010E26C 84E20000 */ lh $v0, 0x0($a3) /* 3EB750 E010E270 44820000 */ mtc1 $v0, $f0 /* 3EB754 E010E274 00000000 */ nop /* 3EB758 E010E278 46800020 */ cvt.s.w $f0, $f0 /* 3EB75C E010E27C 46002000 */ add.s $f0, $f4, $f0 /* 3EB760 E010E280 46080082 */ mul.s $f2, $f0, $f8 /* 3EB764 E010E284 00000000 */ nop /* 3EB768 E010E288 44800000 */ mtc1 $zero, $f0 /* 3EB76C E010E28C 00000000 */ nop /* 3EB770 E010E290 4600103C */ c.lt.s $f2, $f0 /* 3EB774 E010E294 00000000 */ nop /* 3EB778 E010E298 4500000C */ bc1f .LE010E2CC /* 3EB77C E010E29C 3C050400 */ lui $a1, (0x4000400 >> 16) /* 3EB780 E010E2A0 4600128D */ trunc.w.s $f10, $f2 /* 3EB784 E010E2A4 44025000 */ mfc1 $v0, $f10 /* 3EB788 E010E2A8 00000000 */ nop /* 3EB78C E010E2AC 00021400 */ sll $v0, $v0, 16 /* 3EB790 E010E2B0 00021343 */ sra $v0, $v0, 13 /* 3EB794 E010E2B4 5C400001 */ bgtzl $v0, .LE010E2BC /* 3EB798 E010E2B8 0000102D */ daddu $v0, $zero, $zero .LE010E2BC: /* 3EB79C E010E2BC 00021023 */ negu $v0, $v0 /* 3EB7A0 E010E2C0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3EB7A4 E010E2C4 00621825 */ or $v1, $v1, $v0 /* 3EB7A8 E010E2C8 3C050400 */ lui $a1, (0x4000400 >> 16) .LE010E2CC: /* 3EB7AC E010E2CC 34A50400 */ ori $a1, $a1, (0x4000400 & 0xFFFF) /* 3EB7B0 E010E2D0 24E7000C */ addiu $a3, $a3, 0xC /* 3EB7B4 E010E2D4 24C6000C */ addiu $a2, $a2, 0xC /* 3EB7B8 E010E2D8 8D040000 */ lw $a0, 0x0($t0) /* 3EB7BC E010E2DC 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* 3EB7C0 E010E2E0 AD230000 */ sw $v1, 0x0($t1) /* 3EB7C4 E010E2E4 0080182D */ daddu $v1, $a0, $zero /* 3EB7C8 E010E2E8 AC620000 */ sw $v0, 0x0($v1) /* 3EB7CC E010E2EC AC650004 */ sw $a1, 0x4($v1) /* 3EB7D0 E010E2F0 8CC20000 */ lw $v0, 0x0($a2) /* 3EB7D4 E010E2F4 24840008 */ addiu $a0, $a0, 0x8 /* 3EB7D8 E010E2F8 1440FF52 */ bnez $v0, .LE010E044 /* 3EB7DC E010E2FC AD040000 */ sw $a0, 0x0($t0) .LE010E300: /* 3EB7E0 E010E300 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 3EB7E4 E010E304 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 3EB7E8 E010E308 8C620000 */ lw $v0, 0x0($v1) /* 3EB7EC E010E30C 0040202D */ daddu $a0, $v0, $zero /* 3EB7F0 E010E310 24420008 */ addiu $v0, $v0, 0x8 /* 3EB7F4 E010E314 AC620000 */ sw $v0, 0x0($v1) /* 3EB7F8 E010E318 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3EB7FC E010E31C AC820000 */ sw $v0, 0x0($a0) /* 3EB800 E010E320 AC800004 */ sw $zero, 0x4($a0) .LE010E324: /* 3EB804 E010E324 03E00008 */ jr $ra /* 3EB808 E010E328 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void func_E010E000(ChapterChangeFXData* data, s32 arg1, UnkStruct* arg2) { s32 unk_1C = data->lifetime; UnkStruct* it; f32 posX; f32 posY; s32 temp; if (arg1 == 0) { posX = data->chapterPos.x; posY = data->chapterPos.y; } else { posX = data->endOfPos.x; posY = data->endOfPos.y; } if (arg2 != NULL) { for (it = arg2; it->displayList != NULL; it++) { gSPDisplayList(gMainGfxPos++, it->displayList); temp = it->x - 384; gDPSetTileSize(gMainGfxPos++, 1, (unk_1C * 4 - temp) * 4, 0, (unk_1C * 4 - it->x + 511) * 4, 0); gSPScisTextureRectangle(gMainGfxPos++, (posX + it->x) * 4, (posY + it->y) * 4, (posX + it->x + it->width) * 4, (posY + it->y + it->height) * 4, G_TX_RENDERTILE, 0, 0, 1024, 1024); } gDPPipeSync(gMainGfxPos++); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel PartnerAfflictEnemy /* 1AE8E4 80280004 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 1AE8E8 80280008 AFB20018 */ sw $s2, 0x18($sp) /* 1AE8EC 8028000C 0080902D */ daddu $s2, $a0, $zero /* 1AE8F0 80280010 AFBF0024 */ sw $ra, 0x24($sp) /* 1AE8F4 80280014 AFB40020 */ sw $s4, 0x20($sp) /* 1AE8F8 80280018 AFB3001C */ sw $s3, 0x1C($sp) /* 1AE8FC 8028001C AFB10014 */ sw $s1, 0x14($sp) /* 1AE900 80280020 AFB00010 */ sw $s0, 0x10($sp) /* 1AE904 80280024 8E440148 */ lw $a0, 0x148($s2) /* 1AE908 80280028 0C09A75B */ jal get_actor /* 1AE90C 8028002C 8E50000C */ lw $s0, 0xC($s2) /* 1AE910 80280030 8E140000 */ lw $s4, 0x0($s0) /* 1AE914 80280034 26100004 */ addiu $s0, $s0, 0x4 /* 1AE918 80280038 8E030000 */ lw $v1, 0x0($s0) /* 1AE91C 8028003C 26100004 */ addiu $s0, $s0, 0x4 /* 1AE920 80280040 0240202D */ daddu $a0, $s2, $zero /* 1AE924 80280044 3C11800E */ lui $s1, %hi(gBattleStatus) /* 1AE928 80280048 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) /* 1AE92C 8028004C 0040982D */ daddu $s3, $v0, $zero /* 1AE930 80280050 AE230188 */ sw $v1, 0x188($s1) /* 1AE934 80280054 8E030000 */ lw $v1, 0x0($s0) /* 1AE938 80280058 26100004 */ addiu $s0, $s0, 0x4 /* 1AE93C 8028005C AE23018C */ sw $v1, 0x18C($s1) /* 1AE940 80280060 8E030000 */ lw $v1, 0x0($s0) /* 1AE944 80280064 26100004 */ addiu $s0, $s0, 0x4 /* 1AE948 80280068 AE230190 */ sw $v1, 0x190($s1) /* 1AE94C 8028006C 8E050000 */ lw $a1, 0x0($s0) /* 1AE950 80280070 0C0B1EAF */ jal evt_get_variable /* 1AE954 80280074 26100004 */ addiu $s0, $s0, 0x4 /* 1AE958 80280078 8E230190 */ lw $v1, 0x190($s1) /* 1AE95C 8028007C 0240202D */ daddu $a0, $s2, $zero /* 1AE960 80280080 00621825 */ or $v1, $v1, $v0 /* 1AE964 80280084 AE230190 */ sw $v1, 0x190($s1) glabel shop_owner_buy_dialog /* 1AE968 80280088 8E050000 */ lw $a1, 0x0($s0) /* 1AE96C 8028008C 0C0B1EAF */ jal evt_get_variable /* 1AE970 80280090 26100004 */ addiu $s0, $s0, 0x4 /* 1AE974 80280094 A622017E */ sh $v0, 0x17E($s1) /* 1AE978 80280098 A2200198 */ sb $zero, 0x198($s1) /* 1AE97C 8028009C 8E100000 */ lw $s0, 0x0($s0) /* 1AE980 802800A0 24020030 */ addiu $v0, $zero, 0x30 /* 1AE984 802800A4 32030030 */ andi $v1, $s0, 0x30 /* 1AE988 802800A8 54620004 */ bnel $v1, $v0, .L802800BC /* 1AE98C 802800AC 32020010 */ andi $v0, $s0, 0x10 /* 1AE990 802800B0 8E220000 */ lw $v0, 0x0($s1) /* 1AE994 802800B4 080A003F */ j .L802800FC /* 1AE998 802800B8 34420030 */ ori $v0, $v0, 0x30 .L802800BC: /* 1AE99C 802800BC 10400004 */ beqz $v0, .L802800D0 /* 1AE9A0 802800C0 2403FFDF */ addiu $v1, $zero, -0x21 /* 1AE9A4 802800C4 8E220000 */ lw $v0, 0x0($s1) /* 1AE9A8 802800C8 080A003E */ j .L802800F8 /* 1AE9AC 802800CC 34420010 */ ori $v0, $v0, 0x10 .L802800D0: /* 1AE9B0 802800D0 32020020 */ andi $v0, $s0, 0x20 /* 1AE9B4 802800D4 10400005 */ beqz $v0, .L802800EC /* 1AE9B8 802800D8 2403FFEF */ addiu $v1, $zero, -0x11 /* 1AE9BC 802800DC 8E220000 */ lw $v0, 0x0($s1) /* 1AE9C0 802800E0 00431024 */ and $v0, $v0, $v1 /* 1AE9C4 802800E4 080A003F */ j .L802800FC /* 1AE9C8 802800E8 34420020 */ ori $v0, $v0, 0x20 .L802800EC: /* 1AE9CC 802800EC 8E220000 */ lw $v0, 0x0($s1) /* 1AE9D0 802800F0 00431024 */ and $v0, $v0, $v1 /* 1AE9D4 802800F4 2403FFDF */ addiu $v1, $zero, -0x21 .L802800F8: /* 1AE9D8 802800F8 00431024 */ and $v0, $v0, $v1 .L802800FC: /* 1AE9DC 802800FC AE220000 */ sw $v0, 0x0($s1) /* 1AE9E0 80280100 32020040 */ andi $v0, $s0, 0x40 /* 1AE9E4 80280104 10400007 */ beqz $v0, .L80280124 /* 1AE9E8 80280108 2404FFBF */ addiu $a0, $zero, -0x41 /* 1AE9EC 8028010C 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AE9F0 80280110 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) .L80280114: /* 1AE9F4 80280114 8C620000 */ lw $v0, 0x0($v1) /* 1AE9F8 80280118 34420040 */ ori $v0, $v0, 0x40 .L8028011C: /* 1AE9FC 8028011C 080A004E */ j .L80280138 /* 1AEA00 80280120 AC620000 */ sw $v0, 0x0($v1) .L80280124: /* 1AEA04 80280124 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AEA08 80280128 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AEA0C 8028012C 8C430000 */ lw $v1, 0x0($v0) /* 1AEA10 80280130 00641824 */ and $v1, $v1, $a0 /* 1AEA14 80280134 AC430000 */ sw $v1, 0x0($v0) .L80280138: /* 1AEA18 80280138 32020200 */ andi $v0, $s0, 0x200 /* 1AEA1C 8028013C 10400007 */ beqz $v0, .L8028015C /* 1AEA20 80280140 2404FDFF */ addiu $a0, $zero, -0x201 /* 1AEA24 80280144 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AEA28 80280148 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AEA2C 8028014C 8C620000 */ lw $v0, 0x0($v1) /* 1AEA30 80280150 34420200 */ ori $v0, $v0, 0x200 /* 1AEA34 80280154 080A005C */ j .L80280170 /* 1AEA38 80280158 AC620000 */ sw $v0, 0x0($v1) .L8028015C: /* 1AEA3C 8028015C 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AEA40 80280160 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AEA44 80280164 8C430000 */ lw $v1, 0x0($v0) /* 1AEA48 80280168 00641824 */ and $v1, $v1, $a0 /* 1AEA4C 8028016C AC430000 */ sw $v1, 0x0($v0) .L80280170: /* 1AEA50 80280170 32020080 */ andi $v0, $s0, 0x80 /* 1AEA54 80280174 10400007 */ beqz $v0, .L80280194 /* 1AEA58 80280178 2404FF7F */ addiu $a0, $zero, -0x81 glabel shop_owner_continue_speech /* 1AEA5C 8028017C 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AEA60 80280180 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AEA64 80280184 8C620000 */ lw $v0, 0x0($v1) /* 1AEA68 80280188 34420080 */ ori $v0, $v0, 0x80 /* 1AEA6C 8028018C 080A006A */ j .L802801A8 /* 1AEA70 80280190 AC620000 */ sw $v0, 0x0($v1) .L80280194: /* 1AEA74 80280194 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AEA78 80280198 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AEA7C 8028019C 8C430000 */ lw $v1, 0x0($v0) /* 1AEA80 802801A0 00641824 */ and $v1, $v1, $a0 /* 1AEA84 802801A4 AC430000 */ sw $v1, 0x0($v0) .L802801A8: /* 1AEA88 802801A8 32020800 */ andi $v0, $s0, 0x800 /* 1AEA8C 802801AC 10400007 */ beqz $v0, .L802801CC /* 1AEA90 802801B0 2404F7FF */ addiu $a0, $zero, -0x801 /* 1AEA94 802801B4 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AEA98 802801B8 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AEA9C 802801BC 8C620000 */ lw $v0, 0x0($v1) /* 1AEAA0 802801C0 34420800 */ ori $v0, $v0, 0x800 /* 1AEAA4 802801C4 080A0078 */ j .L802801E0 /* 1AEAA8 802801C8 AC620000 */ sw $v0, 0x0($v1) .L802801CC: /* 1AEAAC 802801CC 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AEAB0 802801D0 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AEAB4 802801D4 8C430000 */ lw $v1, 0x0($v0) /* 1AEAB8 802801D8 00641824 */ and $v1, $v1, $a0 /* 1AEABC 802801DC AC430000 */ sw $v1, 0x0($v0) .L802801E0: /* 1AEAC0 802801E0 96620428 */ lhu $v0, 0x428($s3) /* 1AEAC4 802801E4 92230193 */ lbu $v1, 0x193($s1) /* 1AEAC8 802801E8 A62201A0 */ sh $v0, 0x1A0($s1) /* 1AEACC 802801EC 92620426 */ lbu $v0, 0x426($s3) /* 1AEAD0 802801F0 A2230194 */ sb $v1, 0x194($s1) /* 1AEAD4 802801F4 306300FF */ andi $v1, $v1, 0xFF /* 1AEAD8 802801F8 A22201A2 */ sb $v0, 0x1A2($s1) /* 1AEADC 802801FC 240200FF */ addiu $v0, $zero, 0xFF /* 1AEAE0 80280200 50620001 */ beql $v1, $v0, shop_owner_continue_speech_with_quantity /* 1AEAE4 80280204 A2200194 */ sb $zero, 0x194($s1) glabel shop_owner_continue_speech_with_quantity /* 1AEAE8 80280208 8E220190 */ lw $v0, 0x190($s1) /* 1AEAEC 8028020C 30420F00 */ andi $v0, $v0, 0xF00 /* 1AEAF0 80280210 00021203 */ sra $v0, $v0, 8 /* 1AEAF4 80280214 0C09F8CA */ jal calc_partner_damage_enemy /* 1AEAF8 80280218 A2220195 */ sb $v0, 0x195($s1) /* 1AEAFC 8028021C 0440000B */ bltz $v0, .L8028024C /* 1AEB00 80280220 0240202D */ daddu $a0, $s2, $zero /* 1AEB04 80280224 0280282D */ daddu $a1, $s4, $zero /* 1AEB08 80280228 0C0B2026 */ jal evt_set_variable /* 1AEB0C 8028022C 0040302D */ daddu $a2, $v0, $zero /* 1AEB10 80280230 0C0B1069 */ jal does_script_exist_by_ref /* 1AEB14 80280234 0240202D */ daddu $a0, $s2, $zero /* 1AEB18 80280238 0040182D */ daddu $v1, $v0, $zero /* 1AEB1C 8028023C 10600004 */ beqz $v1, .L80280250 /* 1AEB20 80280240 240200FF */ addiu $v0, $zero, 0xFF /* 1AEB24 80280244 080A0094 */ j .L80280250 /* 1AEB28 80280248 24020002 */ addiu $v0, $zero, 0x2 .L8028024C: /* 1AEB2C 8028024C 240200FF */ addiu $v0, $zero, 0xFF .L80280250: /* 1AEB30 80280250 8FBF0024 */ lw $ra, 0x24($sp) /* 1AEB34 80280254 8FB40020 */ lw $s4, 0x20($sp) /* 1AEB38 80280258 8FB3001C */ lw $s3, 0x1C($sp) /* 1AEB3C 8028025C 8FB20018 */ lw $s2, 0x18($sp) /* 1AEB40 80280260 8FB10014 */ lw $s1, 0x14($sp) /* 1AEB44 80280264 8FB00010 */ lw $s0, 0x10($sp) .L80280268: /* 1AEB48 80280268 03E00008 */ jr $ra /* 1AEB4C 8028026C 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus PartnerAfflictEnemy(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; Actor* actor = get_actor(script->owner1.enemyID); s32 returnValue = *args++; s32 flags; u8 statusChance; s32 damageResult; battleStatus->currentAttackElement = *args++; battleStatus->currentAttackEventSuppression = *args++; battleStatus->currentAttackStatus = *args++; battleStatus->currentAttackStatus |= evt_get_variable(script, *args++); battleStatus->currentAttackDamage = evt_get_variable(script, *args++); battleStatus->powerBounceCounter = 0; flags = *args++; if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) { battleStatus->flags1 |= BS_FLAGS1_10; battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_10) { battleStatus->flags1 |= BS_FLAGS1_10; battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) { battleStatus->flags1 &= ~BS_FLAGS1_10; battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; } else { battleStatus->flags1 &= ~BS_FLAGS1_10; battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } if (flags & BS_FLAGS1_40) { gBattleStatus.flags1 |= BS_FLAGS1_40; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_40; } if (flags & BS_FLAGS1_200) { gBattleStatus.flags1 |= BS_FLAGS1_200; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_200; } if (flags & BS_FLAGS1_80) { gBattleStatus.flags1 |= BS_FLAGS1_80; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_80; } if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) { gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE; } statusChance = battleStatus->currentAttackStatus; battleStatus->currentTargetID = actor->targetActorID; battleStatus->currentTargetPart = actor->targetPartIndex; battleStatus->statusChance = statusChance; if (statusChance == STATUS_KEY_NEVER) { battleStatus->statusChance = 0; } battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8; damageResult = calc_partner_damage_enemy(); if (damageResult < 0) { return ApiStatus_FINISH; } evt_set_variable(script, returnValue, damageResult); if (!does_script_exist_by_ref(script)) { return ApiStatus_FINISH; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel MerleeUpdateFX /* 1A4C4 8003F0C4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 1A4C8 8003F0C8 AFB20020 */ sw $s2, 0x20($sp) /* 1A4CC 8003F0CC 0080902D */ daddu $s2, $a0, $zero /* 1A4D0 8003F0D0 AFB00018 */ sw $s0, 0x18($sp) /* 1A4D4 8003F0D4 00A0802D */ daddu $s0, $a1, $zero /* 1A4D8 8003F0D8 2404FFF6 */ addiu $a0, $zero, -0xA /* 1A4DC 8003F0DC AFBF0024 */ sw $ra, 0x24($sp) /* 1A4E0 8003F0E0 0C00EABB */ jal get_npc_unsafe /* 1A4E4 8003F0E4 AFB1001C */ sw $s1, 0x1C($sp) /* 1A4E8 8003F0E8 12000024 */ beqz $s0, .L8003F17C /* 1A4EC 8003F0EC 0040882D */ daddu $s1, $v0, $zero /* 1A4F0 8003F0F0 AE400074 */ sw $zero, 0x74($s2) /* 1A4F4 8003F0F4 C622003C */ lwc1 $f2, 0x3C($s1) /* 1A4F8 8003F0F8 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) /* 1A4FC 8003F0FC 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) /* 1A500 8003F100 44810000 */ mtc1 $at, $f0 /* 1A504 8003F104 AFA00014 */ sw $zero, 0x14($sp) /* 1A508 8003F108 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A50C 8003F10C 8E250038 */ lw $a1, 0x38($s1) /* 1A510 8003F110 8E26003C */ lw $a2, 0x3C($s1) /* 1A514 8003F114 8E270040 */ lw $a3, 0x40($s1) /* 1A518 8003F118 3C01800A */ lui $at, %hi(D_800A0BA4) /* 1A51C 8003F11C E4220BA4 */ swc1 $f2, %lo(D_800A0BA4)($at) /* 1A520 8003F120 0C01C5D4 */ jal fx_energy_orb_wave /* 1A524 8003F124 0000202D */ daddu $a0, $zero, $zero /* 1A528 8003F128 3C013727 */ lui $at, (0x3727C5AC >> 16) /* 1A52C 8003F12C 3421C5AC */ ori $at, $at, (0x3727C5AC & 0xFFFF) /* 1A530 8003F130 44810000 */ mtc1 $at, $f0 /* 1A534 8003F134 AFA00014 */ sw $zero, 0x14($sp) /* 1A538 8003F138 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A53C 8003F13C 8E250038 */ lw $a1, 0x38($s1) /* 1A540 8003F140 8E26003C */ lw $a2, 0x3C($s1) /* 1A544 8003F144 8E270040 */ lw $a3, 0x40($s1) /* 1A548 8003F148 3C01800A */ lui $at, %hi(WorldMerleeOrbEffect) /* 1A54C 8003F14C AC220BA8 */ sw $v0, %lo(WorldMerleeOrbEffect)($at) /* 1A550 8003F150 0C01C5D4 */ jal fx_energy_orb_wave /* 1A554 8003F154 24040003 */ addiu $a0, $zero, 0x3 /* 1A558 8003F158 3C01800A */ lui $at, %hi(WorldMerleeWaveEffect) /* 1A55C 8003F15C AC220BAC */ sw $v0, %lo(WorldMerleeWaveEffect)($at) /* 1A560 8003F160 2402000C */ addiu $v0, $zero, 0xC /* 1A564 8003F164 3C01800A */ lui $at, %hi(D_800A0BB8) /* 1A568 8003F168 A4200BB8 */ sh $zero, %lo(D_800A0BB8)($at) /* 1A56C 8003F16C 3C01800A */ lui $at, %hi(D_800A0BA0) /* 1A570 8003F170 AC220BA0 */ sw $v0, %lo(D_800A0BA0)($at) /* 1A574 8003F174 0C05272D */ jal sfx_play_sound /* 1A578 8003F178 24042074 */ addiu $a0, $zero, 0x2074 .L8003F17C: /* 1A57C 8003F17C 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 1A580 8003F180 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 1A584 8003F184 44810000 */ mtc1 $at, $f0 /* 1A588 8003F188 C64C0074 */ lwc1 $f12, 0x74($s2) /* 1A58C 8003F18C 46806320 */ cvt.s.w $f12, $f12 /* 1A590 8003F190 46006302 */ mul.s $f12, $f12, $f0 /* 1A594 8003F194 00000000 */ nop /* 1A598 8003F198 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 1A59C 8003F19C 44810000 */ mtc1 $at, $f0 /* 1A5A0 8003F1A0 0C00A85B */ jal sin_rad /* 1A5A4 8003F1A4 46006303 */ div.s $f12, $f12, $f0 /* 1A5A8 8003F1A8 3C014040 */ lui $at, (0x40400000 >> 16) /* 1A5AC 8003F1AC 44811000 */ mtc1 $at, $f2 /* 1A5B0 8003F1B0 00000000 */ nop /* 1A5B4 8003F1B4 46020002 */ mul.s $f0, $f0, $f2 /* 1A5B8 8003F1B8 00000000 */ nop /* 1A5BC 8003F1BC 3C01800A */ lui $at, %hi(D_800A0BA4) /* 1A5C0 8003F1C0 C4220BA4 */ lwc1 $f2, %lo(D_800A0BA4)($at) /* 1A5C4 8003F1C4 46001080 */ add.s $f2, $f2, $f0 /* 1A5C8 8003F1C8 E622003C */ swc1 $f2, 0x3C($s1) /* 1A5CC 8003F1CC 8E420074 */ lw $v0, 0x74($s2) /* 1A5D0 8003F1D0 2442000A */ addiu $v0, $v0, 0xA /* 1A5D4 8003F1D4 44826000 */ mtc1 $v0, $f12 /* 1A5D8 8003F1D8 00000000 */ nop /* 1A5DC 8003F1DC 46806320 */ cvt.s.w $f12, $f12 /* 1A5E0 8003F1E0 0C00A6C9 */ jal clamp_angle /* 1A5E4 8003F1E4 AE420074 */ sw $v0, 0x74($s2) /* 1A5E8 8003F1E8 4600018D */ trunc.w.s $f6, $f0 /* 1A5EC 8003F1EC E6460074 */ swc1 $f6, 0x74($s2) /* 1A5F0 8003F1F0 3C05800A */ lui $a1, %hi(WorldMerleeOrbEffect) /* 1A5F4 8003F1F4 8CA50BA8 */ lw $a1, %lo(WorldMerleeOrbEffect)($a1) /* 1A5F8 8003F1F8 C6200038 */ lwc1 $f0, 0x38($s1) /* 1A5FC 8003F1FC 3C014180 */ lui $at, (0x41800000 >> 16) /* 1A600 8003F200 44811000 */ mtc1 $at, $f2 /* 1A604 8003F204 8CA2000C */ lw $v0, 0xC($a1) /* 1A608 8003F208 E4400004 */ swc1 $f0, 0x4($v0) /* 1A60C 8003F20C C620003C */ lwc1 $f0, 0x3C($s1) /* 1A610 8003F210 46020000 */ add.s $f0, $f0, $f2 /* 1A614 8003F214 3C08800A */ lui $t0, %hi(WorldMerleeWaveEffect) /* 1A618 8003F218 25080BAC */ addiu $t0, $t0, %lo(WorldMerleeWaveEffect) /* 1A61C 8003F21C E4400008 */ swc1 $f0, 0x8($v0) /* 1A620 8003F220 C6200040 */ lwc1 $f0, 0x40($s1) /* 1A624 8003F224 8D040000 */ lw $a0, 0x0($t0) /* 1A628 8003F228 E440000C */ swc1 $f0, 0xC($v0) /* 1A62C 8003F22C 8C82000C */ lw $v0, 0xC($a0) /* 1A630 8003F230 C6200038 */ lwc1 $f0, 0x38($s1) /* 1A634 8003F234 E4400004 */ swc1 $f0, 0x4($v0) /* 1A638 8003F238 C620003C */ lwc1 $f0, 0x3C($s1) /* 1A63C 8003F23C 46020000 */ add.s $f0, $f0, $f2 /* 1A640 8003F240 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 1A644 8003F244 44811000 */ mtc1 $at, $f2 /* 1A648 8003F248 E4400008 */ swc1 $f0, 0x8($v0) /* 1A64C 8003F24C C6200040 */ lwc1 $f0, 0x40($s1) /* 1A650 8003F250 46020000 */ add.s $f0, $f0, $f2 /* 1A654 8003F254 3C07800A */ lui $a3, %hi(D_800A0BB8) /* 1A658 8003F258 24E70BB8 */ addiu $a3, $a3, %lo(D_800A0BB8) /* 1A65C 8003F25C E440000C */ swc1 $f0, 0xC($v0) /* 1A660 8003F260 84E30000 */ lh $v1, 0x0($a3) /* 1A664 8003F264 24060002 */ addiu $a2, $zero, 0x2 /* 1A668 8003F268 14660011 */ bne $v1, $a2, .L8003F2B0 /* 1A66C 8003F26C 24020001 */ addiu $v0, $zero, 0x1 /* 1A670 8003F270 8CA2000C */ lw $v0, 0xC($a1) /* 1A674 8003F274 3C013727 */ lui $at, (0x3727C5AC >> 16) /* 1A678 8003F278 3421C5AC */ ori $at, $at, (0x3727C5AC & 0xFFFF) /* 1A67C 8003F27C 44810000 */ mtc1 $at, $f0 /* 1A680 8003F280 00000000 */ nop /* 1A684 8003F284 E4400030 */ swc1 $f0, 0x30($v0) /* 1A688 8003F288 8C82000C */ lw $v0, 0xC($a0) /* 1A68C 8003F28C E4400030 */ swc1 $f0, 0x30($v0) /* 1A690 8003F290 8CA20000 */ lw $v0, 0x0($a1) /* 1A694 8003F294 34420010 */ ori $v0, $v0, 0x10 /* 1A698 8003F298 ACA20000 */ sw $v0, 0x0($a1) /* 1A69C 8003F29C 8C830000 */ lw $v1, 0x0($a0) /* 1A6A0 8003F2A0 24020001 */ addiu $v0, $zero, 0x1 /* 1A6A4 8003F2A4 34630010 */ ori $v1, $v1, 0x10 /* 1A6A8 8003F2A8 0800FCDB */ j .L8003F36C /* 1A6AC 8003F2AC AC830000 */ sw $v1, 0x0($a0) .L8003F2B0: /* 1A6B0 8003F2B0 1462002E */ bne $v1, $v0, .L8003F36C /* 1A6B4 8003F2B4 0000102D */ daddu $v0, $zero, $zero /* 1A6B8 8003F2B8 8CA2000C */ lw $v0, 0xC($a1) /* 1A6BC 8003F2BC C4400030 */ lwc1 $f0, 0x30($v0) /* 1A6C0 8003F2C0 3C01800A */ lui $at, %hi(D_800985F0) /* 1A6C4 8003F2C4 D42285F0 */ ldc1 $f2, %lo(D_800985F0)($at) /* 1A6C8 8003F2C8 46000021 */ cvt.d.s $f0, $f0 /* 1A6CC 8003F2CC 46220000 */ add.d $f0, $f0, $f2 /* 1A6D0 8003F2D0 3C01400C */ lui $at, (0x400C0000 >> 16) /* 1A6D4 8003F2D4 44812800 */ mtc1 $at, $f5 /* 1A6D8 8003F2D8 44802000 */ mtc1 $zero, $f4 /* 1A6DC 8003F2DC 46200020 */ cvt.s.d $f0, $f0 /* 1A6E0 8003F2E0 460000A1 */ cvt.d.s $f2, $f0 /* 1A6E4 8003F2E4 4622203C */ c.lt.d $f4, $f2 /* 1A6E8 8003F2E8 00000000 */ nop /* 1A6EC 8003F2EC 45000005 */ bc1f .L8003F304 /* 1A6F0 8003F2F0 E4400030 */ swc1 $f0, 0x30($v0) /* 1A6F4 8003F2F4 3C014060 */ lui $at, (0x40600000 >> 16) /* 1A6F8 8003F2F8 44810000 */ mtc1 $at, $f0 /* 1A6FC 8003F2FC 00000000 */ nop /* 1A700 8003F300 E4400030 */ swc1 $f0, 0x30($v0) .L8003F304: /* 1A704 8003F304 3C03800A */ lui $v1, %hi(D_800A0BA0) /* 1A708 8003F308 24630BA0 */ addiu $v1, $v1, %lo(D_800A0BA0) /* 1A70C 8003F30C 8C620000 */ lw $v0, 0x0($v1) /* 1A710 8003F310 10400003 */ beqz $v0, .L8003F320 /* 1A714 8003F314 2442FFFF */ addiu $v0, $v0, -0x1 /* 1A718 8003F318 0800FCDA */ j .L8003F368 /* 1A71C 8003F31C AC620000 */ sw $v0, 0x0($v1) .L8003F320: /* 1A720 8003F320 8D020000 */ lw $v0, 0x0($t0) /* 1A724 8003F324 8C42000C */ lw $v0, 0xC($v0) /* 1A728 8003F328 C4400030 */ lwc1 $f0, 0x30($v0) /* 1A72C 8003F32C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 1A730 8003F330 44811800 */ mtc1 $at, $f3 /* 1A734 8003F334 44801000 */ mtc1 $zero, $f2 /* 1A738 8003F338 46000021 */ cvt.d.s $f0, $f0 /* 1A73C 8003F33C 46220000 */ add.d $f0, $f0, $f2 /* 1A740 8003F340 3C014014 */ lui $at, (0x40140000 >> 16) /* 1A744 8003F344 44812800 */ mtc1 $at, $f5 /* 1A748 8003F348 44802000 */ mtc1 $zero, $f4 /* 1A74C 8003F34C 46200020 */ cvt.s.d $f0, $f0 /* 1A750 8003F350 460000A1 */ cvt.d.s $f2, $f0 /* 1A754 8003F354 4622203C */ c.lt.d $f4, $f2 /* 1A758 8003F358 00000000 */ nop /* 1A75C 8003F35C 45000002 */ bc1f .L8003F368 /* 1A760 8003F360 E4400030 */ swc1 $f0, 0x30($v0) /* 1A764 8003F364 A4E60000 */ sh $a2, 0x0($a3) .L8003F368: /* 1A768 8003F368 0000102D */ daddu $v0, $zero, $zero .L8003F36C: /* 1A76C 8003F36C 8FBF0024 */ lw $ra, 0x24($sp) /* 1A770 8003F370 8FB20020 */ lw $s2, 0x20($sp) /* 1A774 8003F374 8FB1001C */ lw $s1, 0x1C($sp) /* 1A778 8003F378 8FB00018 */ lw $s0, 0x18($sp) /* 1A77C 8003F37C 03E00008 */ jr $ra /* 1A780 8003F380 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall) { Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE); EnergyOrbWaveFXData* effectData; if (isInitialCall) { script->functionTemp[1] = 0; D_800A0BA4 = merlee->pos.y; WorldMerleeOrbEffect = fx_energy_orb_wave(0, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.4f, 0); WorldMerleeWaveEffect = fx_energy_orb_wave(3, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.00001f, 0); D_800A0BB8 = 0; D_800A0BA0 = 12; sfx_play_sound(SOUND_2074); } merlee->pos.y = D_800A0BA4 + sin_rad(DEG_TO_RAD(script->functionTemp[1])) * 3.0f; script->functionTemp[1] += 10; script->functionTemp[1] = clamp_angle(script->functionTemp[1]); effectData = WorldMerleeOrbEffect->data.energyOrbWave; effectData->pos.x = merlee->pos.x; effectData->pos.y = merlee->pos.y + 16.0f; effectData->pos.z = merlee->pos.z; effectData = WorldMerleeWaveEffect->data.energyOrbWave; effectData->pos.x = merlee->pos.x; effectData->pos.y = merlee->pos.y + 16.0f; effectData->pos.z = merlee->pos.z + 5.0f; if (D_800A0BB8 == 2) { WorldMerleeOrbEffect->data.energyOrbWave->scale = 0.00001f; WorldMerleeWaveEffect->data.energyOrbWave->scale = 0.00001f; WorldMerleeOrbEffect->flags |= FX_INSTANCE_FLAG_DISMISS; WorldMerleeWaveEffect->flags |= FX_INSTANCE_FLAG_DISMISS; return ApiStatus_DONE1; } if (D_800A0BB8 == 1) { effectData = WorldMerleeOrbEffect->data.energyOrbWave; effectData->scale += 0.35; if (effectData->scale > 3.5) { effectData->scale = 3.5f; } if (D_800A0BA0 != 0) { D_800A0BA0--; } else { effectData = WorldMerleeWaveEffect->data.energyOrbWave; effectData->scale += 0.5; if (effectData->scale > 5.0) { D_800A0BB8 = 2; } } } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel player_test_move_with_slipping /* 78910 800DF460 27BDFF48 */ addiu $sp, $sp, -0xB8 /* 78914 800DF464 AFB40078 */ sw $s4, 0x78($sp) /* 78918 800DF468 0080A02D */ daddu $s4, $a0, $zero /* 7891C 800DF46C AFB1006C */ sw $s1, 0x6C($sp) /* 78920 800DF470 00A0882D */ daddu $s1, $a1, $zero /* 78924 800DF474 AFB5007C */ sw $s5, 0x7C($sp) /* 78928 800DF478 00C0A82D */ daddu $s5, $a2, $zero /* 7892C 800DF47C AFB20070 */ sw $s2, 0x70($sp) /* 78930 800DF480 00E0902D */ daddu $s2, $a3, $zero /* 78934 800DF484 AFB30074 */ sw $s3, 0x74($sp) /* 78938 800DF488 AFBF0080 */ sw $ra, 0x80($sp) /* 7893C 800DF48C AFB00068 */ sw $s0, 0x68($sp) /* 78940 800DF490 F7BE00B0 */ sdc1 $f30, 0xB0($sp) /* 78944 800DF494 F7BC00A8 */ sdc1 $f28, 0xA8($sp) /* 78948 800DF498 F7BA00A0 */ sdc1 $f26, 0xA0($sp) /* 7894C 800DF49C F7B80098 */ sdc1 $f24, 0x98($sp) /* 78950 800DF4A0 F7B60090 */ sdc1 $f22, 0x90($sp) /* 78954 800DF4A4 F7B40088 */ sdc1 $f20, 0x88($sp) /* 78958 800DF4A8 8E820000 */ lw $v0, 0x0($s4) /* 7895C 800DF4AC 4480A000 */ mtc1 $zero, $f20 /* 78960 800DF4B0 C7BC00C8 */ lwc1 $f28, 0xC8($sp) /* 78964 800DF4B4 30420006 */ andi $v0, $v0, 0x6 /* 78968 800DF4B8 14400004 */ bnez $v0, .L800DF4CC /* 7896C 800DF4BC 2413FFFF */ addiu $s3, $zero, -0x1 /* 78970 800DF4C0 3C014120 */ lui $at, (0x412028F6 >> 16) /* 78974 800DF4C4 342128F6 */ ori $at, $at, (0x412028F6 & 0xFFFF) /* 78978 800DF4C8 4481A000 */ mtc1 $at, $f20 .L800DF4CC: /* 7897C 800DF4CC 27A50038 */ addiu $a1, $sp, 0x38 /* 78980 800DF4D0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 78984 800DF4D4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 78988 800DF4D8 44810000 */ mtc1 $at, $f0 /* 7898C 800DF4DC C7A400CC */ lwc1 $f4, 0xCC($sp) /* 78990 800DF4E0 27A6003C */ addiu $a2, $sp, 0x3C /* 78994 800DF4E4 46002102 */ mul.s $f4, $f4, $f0 /* 78998 800DF4E8 00000000 */ nop /* 7899C 800DF4EC 868200B2 */ lh $v0, 0xB2($s4) /* 789A0 800DF4F0 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 789A4 800DF4F4 44811000 */ mtc1 $at, $f2 /* 789A8 800DF4F8 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 789AC 800DF4FC 44816000 */ mtc1 $at, $f12 /* 789B0 800DF500 44820000 */ mtc1 $v0, $f0 /* 789B4 800DF504 00000000 */ nop /* 789B8 800DF508 46800020 */ cvt.s.w $f0, $f0 /* 789BC 800DF50C 46020782 */ mul.s $f30, $f0, $f2 /* 789C0 800DF510 00000000 */ nop /* 789C4 800DF514 0C00A82D */ jal sin_cos_rad /* 789C8 800DF518 460C2303 */ div.s $f12, $f4, $f12 /* 789CC 800DF51C 27A20040 */ addiu $v0, $sp, 0x40 /* 789D0 800DF520 461EE580 */ add.s $f22, $f28, $f30 /* 789D4 800DF524 C7A0003C */ lwc1 $f0, 0x3C($sp) /* 789D8 800DF528 C7A20038 */ lwc1 $f2, 0x38($sp) /* 789DC 800DF52C 46000007 */ neg.s $f0, $f0 /* 789E0 800DF530 E7A0003C */ swc1 $f0, 0x3C($sp) /* 789E4 800DF534 E7B6004C */ swc1 $f22, 0x4C($sp) /* 789E8 800DF538 C6A40000 */ lwc1 $f4, 0x0($s5) /* 789EC 800DF53C 4602E682 */ mul.s $f26, $f28, $f2 /* 789F0 800DF540 00000000 */ nop /* 789F4 800DF544 AFA2001C */ sw $v0, 0x1C($sp) /* 789F8 800DF548 27A20044 */ addiu $v0, $sp, 0x44 /* 789FC 800DF54C AFA20020 */ sw $v0, 0x20($sp) /* 78A00 800DF550 27A20048 */ addiu $v0, $sp, 0x48 /* 78A04 800DF554 AFA20024 */ sw $v0, 0x24($sp) /* 78A08 800DF558 27A2004C */ addiu $v0, $sp, 0x4C /* 78A0C 800DF55C AFA20028 */ sw $v0, 0x28($sp) /* 78A10 800DF560 27A20050 */ addiu $v0, $sp, 0x50 /* 78A14 800DF564 AFA2002C */ sw $v0, 0x2C($sp) /* 78A18 800DF568 27A20054 */ addiu $v0, $sp, 0x54 /* 78A1C 800DF56C AFA20030 */ sw $v0, 0x30($sp) /* 78A20 800DF570 27A20058 */ addiu $v0, $sp, 0x58 /* 78A24 800DF574 E7A20010 */ swc1 $f2, 0x10($sp) /* 78A28 800DF578 AFA00014 */ sw $zero, 0x14($sp) /* 78A2C 800DF57C E7A00018 */ swc1 $f0, 0x18($sp) /* 78A30 800DF580 AFA20034 */ sw $v0, 0x34($sp) /* 78A34 800DF584 46142100 */ add.s $f4, $f4, $f20 /* 78A38 800DF588 8E250000 */ lw $a1, 0x0($s1) /* 78A3C 800DF58C 8E470000 */ lw $a3, 0x0($s2) /* 78A40 800DF590 44062000 */ mfc1 $a2, $f4 /* 78A44 800DF594 4600E602 */ mul.s $f24, $f28, $f0 /* 78A48 800DF598 00000000 */ nop /* 78A4C 800DF59C 0C037B97 */ jal player_raycast_general /* 78A50 800DF5A0 0000202D */ daddu $a0, $zero, $zero /* 78A54 800DF5A4 0040802D */ daddu $s0, $v0, $zero /* 78A58 800DF5A8 06000008 */ bltz $s0, .L800DF5CC /* 78A5C 800DF5AC 00000000 */ nop /* 78A60 800DF5B0 C7A4004C */ lwc1 $f4, 0x4C($sp) /* 78A64 800DF5B4 4616203E */ c.le.s $f4, $f22 /* 78A68 800DF5B8 00000000 */ nop /* 78A6C 800DF5BC 45000003 */ bc1f .L800DF5CC /* 78A70 800DF5C0 27A4005C */ addiu $a0, $sp, 0x5C /* 78A74 800DF5C4 08037DA1 */ j .L800DF684 /* 78A78 800DF5C8 46162101 */ sub.s $f4, $f4, $f22 .L800DF5CC: /* 78A7C 800DF5CC 868300B0 */ lh $v1, 0xB0($s4) /* 78A80 800DF5D0 C6A60000 */ lwc1 $f6, 0x0($s5) /* 78A84 800DF5D4 C7A00038 */ lwc1 $f0, 0x38($sp) /* 78A88 800DF5D8 AFA00014 */ sw $zero, 0x14($sp) /* 78A8C 800DF5DC E7A00010 */ swc1 $f0, 0x10($sp) /* 78A90 800DF5E0 C7A4003C */ lwc1 $f4, 0x3C($sp) /* 78A94 800DF5E4 27A20040 */ addiu $v0, $sp, 0x40 /* 78A98 800DF5E8 AFA2001C */ sw $v0, 0x1C($sp) /* 78A9C 800DF5EC 27A20044 */ addiu $v0, $sp, 0x44 /* 78AA0 800DF5F0 AFA20020 */ sw $v0, 0x20($sp) /* 78AA4 800DF5F4 27A20048 */ addiu $v0, $sp, 0x48 /* 78AA8 800DF5F8 AFA20024 */ sw $v0, 0x24($sp) /* 78AAC 800DF5FC 27A2004C */ addiu $v0, $sp, 0x4C /* 78AB0 800DF600 3C013FE8 */ lui $at, (0x3FE80000 >> 16) /* 78AB4 800DF604 44810800 */ mtc1 $at, $f1 /* 78AB8 800DF608 44800000 */ mtc1 $zero, $f0 /* 78ABC 800DF60C 44831000 */ mtc1 $v1, $f2 /* 78AC0 800DF610 00000000 */ nop /* 78AC4 800DF614 468010A1 */ cvt.d.w $f2, $f2 /* 78AC8 800DF618 AFA20028 */ sw $v0, 0x28($sp) /* 78ACC 800DF61C 46201082 */ mul.d $f2, $f2, $f0 /* 78AD0 800DF620 00000000 */ nop /* 78AD4 800DF624 27A20050 */ addiu $v0, $sp, 0x50 /* 78AD8 800DF628 AFA2002C */ sw $v0, 0x2C($sp) /* 78ADC 800DF62C 27A20054 */ addiu $v0, $sp, 0x54 /* 78AE0 800DF630 AFA20030 */ sw $v0, 0x30($sp) /* 78AE4 800DF634 27A20058 */ addiu $v0, $sp, 0x58 /* 78AE8 800DF638 AFA20034 */ sw $v0, 0x34($sp) /* 78AEC 800DF63C E7A40018 */ swc1 $f4, 0x18($sp) /* 78AF0 800DF640 46201520 */ cvt.s.d $f20, $f2 /* 78AF4 800DF644 46143180 */ add.s $f6, $f6, $f20 /* 78AF8 800DF648 8E250000 */ lw $a1, 0x0($s1) /* 78AFC 800DF64C 8E470000 */ lw $a3, 0x0($s2) /* 78B00 800DF650 44063000 */ mfc1 $a2, $f6 /* 78B04 800DF654 0C037B97 */ jal player_raycast_general /* 78B08 800DF658 0000202D */ daddu $a0, $zero, $zero /* 78B0C 800DF65C 0040802D */ daddu $s0, $v0, $zero /* 78B10 800DF660 06000021 */ bltz $s0, .L800DF6E8 /* 78B14 800DF664 00000000 */ nop /* 78B18 800DF668 461EE000 */ add.s $f0, $f28, $f30 /* 78B1C 800DF66C C7A4004C */ lwc1 $f4, 0x4C($sp) /* 78B20 800DF670 4600203E */ c.le.s $f4, $f0 /* 78B24 800DF674 00000000 */ nop /* 78B28 800DF678 4500001B */ bc1f .L800DF6E8 /* 78B2C 800DF67C 27A4005C */ addiu $a0, $sp, 0x5C /* 78B30 800DF680 46002101 */ sub.s $f4, $f4, $f0 .L800DF684: /* 78B34 800DF684 4406D000 */ mfc1 $a2, $f26 /* 78B38 800DF688 C7A00038 */ lwc1 $f0, 0x38($sp) /* 78B3C 800DF68C 4407C000 */ mfc1 $a3, $f24 /* 78B40 800DF690 C7A2003C */ lwc1 $f2, 0x3C($sp) /* 78B44 800DF694 46002582 */ mul.s $f22, $f4, $f0 /* 78B48 800DF698 00000000 */ nop /* 78B4C 800DF69C C7A00050 */ lwc1 $f0, 0x50($sp) /* 78B50 800DF6A0 27A50060 */ addiu $a1, $sp, 0x60 /* 78B54 800DF6A4 E7A00010 */ swc1 $f0, 0x10($sp) /* 78B58 800DF6A8 C7A00058 */ lwc1 $f0, 0x58($sp) /* 78B5C 800DF6AC 46022502 */ mul.s $f20, $f4, $f2 /* 78B60 800DF6B0 00000000 */ nop /* 78B64 800DF6B4 0C037CFF */ jal player_get_slip_vector /* 78B68 800DF6B8 E7A00014 */ swc1 $f0, 0x14($sp) /* 78B6C 800DF6BC C7A2005C */ lwc1 $f2, 0x5C($sp) /* 78B70 800DF6C0 4602B080 */ add.s $f2, $f22, $f2 /* 78B74 800DF6C4 C6200000 */ lwc1 $f0, 0x0($s1) /* 78B78 800DF6C8 46020000 */ add.s $f0, $f0, $f2 /* 78B7C 800DF6CC E6200000 */ swc1 $f0, 0x0($s1) /* 78B80 800DF6D0 C7A00060 */ lwc1 $f0, 0x60($sp) /* 78B84 800DF6D4 4600A000 */ add.s $f0, $f20, $f0 /* 78B88 800DF6D8 C6420000 */ lwc1 $f2, 0x0($s2) /* 78B8C 800DF6DC 46001080 */ add.s $f2, $f2, $f0 /* 78B90 800DF6E0 0200982D */ daddu $s3, $s0, $zero /* 78B94 800DF6E4 E6420000 */ swc1 $f2, 0x0($s2) .L800DF6E8: /* 78B98 800DF6E8 C6200000 */ lwc1 $f0, 0x0($s1) /* 78B9C 800DF6EC 461A0000 */ add.s $f0, $f0, $f26 /* 78BA0 800DF6F0 E6200000 */ swc1 $f0, 0x0($s1) /* 78BA4 800DF6F4 C6400000 */ lwc1 $f0, 0x0($s2) /* 78BA8 800DF6F8 46180000 */ add.s $f0, $f0, $f24 /* 78BAC 800DF6FC 0260102D */ daddu $v0, $s3, $zero /* 78BB0 800DF700 E6400000 */ swc1 $f0, 0x0($s2) /* 78BB4 800DF704 8FBF0080 */ lw $ra, 0x80($sp) /* 78BB8 800DF708 8FB5007C */ lw $s5, 0x7C($sp) /* 78BBC 800DF70C 8FB40078 */ lw $s4, 0x78($sp) /* 78BC0 800DF710 8FB30074 */ lw $s3, 0x74($sp) /* 78BC4 800DF714 8FB20070 */ lw $s2, 0x70($sp) /* 78BC8 800DF718 8FB1006C */ lw $s1, 0x6C($sp) /* 78BCC 800DF71C 8FB00068 */ lw $s0, 0x68($sp) /* 78BD0 800DF720 D7BE00B0 */ ldc1 $f30, 0xB0($sp) /* 78BD4 800DF724 D7BC00A8 */ ldc1 $f28, 0xA8($sp) /* 78BD8 800DF728 D7BA00A0 */ ldc1 $f26, 0xA0($sp) /* 78BDC 800DF72C D7B80098 */ ldc1 $f24, 0x98($sp) /* 78BE0 800DF730 D7B60090 */ ldc1 $f22, 0x90($sp) /* 78BE4 800DF734 D7B40088 */ ldc1 $f20, 0x88($sp) /* 78BE8 800DF738 03E00008 */ jr $ra /* 78BEC 800DF73C 27BD00B8 */ addiu $sp, $sp, 0xB8 ### DECOMPILED C INSTRUCTIONS: s32 player_test_move_with_slipping(PlayerStatus* playerStatus, f32* x, f32* y, f32* z, f32 length, f32 yaw) { f32 sinTheta; f32 cosTheta; f32 hitX; f32 hitY; f32 hitZ; f32 hitDepth; f32 hitNx; f32 hitNy; f32 hitNz; f32 slipDx; f32 slipDz; f32 radius; f32 height; s32 hitID; f32 targetDx, targetDz; f32 dx, dz; f32 depthDiff; s32 ret = NO_COLLIDER; height = 0.0f; if (!(playerStatus->flags & (PS_FLAG_JUMPING | PS_FLAG_FALLING))) { height = 10.01f; } radius = playerStatus->colliderDiameter * 0.5f; sin_cos_rad(DEG_TO_RAD(yaw), &sinTheta, &cosTheta); cosTheta = -cosTheta; hitDepth = length + radius; targetDx = length * sinTheta; targetDz = length * cosTheta; hitID = player_raycast_general(0, *x, *y + height, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); if (hitID >= 0 && (depthDiff = hitDepth, depthDiff <= length + radius)) { depthDiff -= (length + radius); dx = depthDiff * sinTheta; dz = depthDiff * cosTheta; player_get_slip_vector(&slipDx, &slipDz, targetDx, targetDz, hitNx, hitNz); *x += dx + slipDx; *z += dz + slipDz; ret = hitID; } else { height = playerStatus->colliderHeight * 0.75; hitID = player_raycast_general(0, *x, *y + height, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); if (hitID >= 0 && (depthDiff = hitDepth, depthDiff <= length + radius)) { depthDiff -= (length + radius); dx = depthDiff * sinTheta; dz = depthDiff * cosTheta; player_get_slip_vector(&slipDx, &slipDz, targetDx, targetDz, hitNx, hitNz); *x += dx + slipDx; *z += dz + slipDz; ret = hitID; } } *x += targetDx; *z += targetDz; return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel check_block_input /* 1977AC 80268ECC 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 1977B0 80268ED0 AFB40020 */ sw $s4, 0x20($sp) /* 1977B4 80268ED4 0080A02D */ daddu $s4, $a0, $zero /* 1977B8 80268ED8 AFB7002C */ sw $s7, 0x2C($sp) /* 1977BC 80268EDC 0000B82D */ daddu $s7, $zero, $zero /* 1977C0 80268EE0 AFB10014 */ sw $s1, 0x14($sp) /* 1977C4 80268EE4 3C11800E */ lui $s1, %hi(gBattleStatus) /* 1977C8 80268EE8 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) /* 1977CC 80268EEC AFB50024 */ sw $s5, 0x24($sp) /* 1977D0 80268EF0 3C158011 */ lui $s5, %hi(gPlayerData) /* 1977D4 80268EF4 26B5F290 */ addiu $s5, $s5, %lo(gPlayerData) /* 1977D8 80268EF8 AFB60028 */ sw $s6, 0x28($sp) /* 1977DC 80268EFC 3C16802A */ lui $s6, %hi(gActionCommandStatus) /* 1977E0 80268F00 26D6FBE0 */ addiu $s6, $s6, %lo(gActionCommandStatus) /* 1977E4 80268F04 AFBF0030 */ sw $ra, 0x30($sp) /* 1977E8 80268F08 AFB3001C */ sw $s3, 0x1C($sp) /* 1977EC 80268F0C AFB20018 */ sw $s2, 0x18($sp) /* 1977F0 80268F10 AFB00010 */ sw $s0, 0x10($sp) /* 1977F4 80268F14 82230083 */ lb $v1, 0x83($s1) /* 1977F8 80268F18 2402FFFF */ addiu $v0, $zero, -0x1 /* 1977FC 80268F1C 14620009 */ bne $v1, $v0, .L80268F44 /* 197800 80268F20 A2200087 */ sb $zero, 0x87($s1) /* 197804 80268F24 8E220000 */ lw $v0, 0x0($s1) /* 197808 80268F28 3C030200 */ lui $v1, (0x2000000 >> 16) /* 19780C 80268F2C 00431024 */ and $v0, $v0, $v1 /* 197810 80268F30 10400004 */ beqz $v0, .L80268F44 /* 197814 80268F34 24020001 */ addiu $v0, $zero, 0x1 /* 197818 80268F38 A2220087 */ sb $v0, 0x87($s1) /* 19781C 80268F3C 0809A43B */ j .L802690EC /* 197820 80268F40 24020001 */ addiu $v0, $zero, 0x1 .L80268F44: /* 197824 80268F44 82220083 */ lb $v0, 0x83($s1) /* 197828 80268F48 10400068 */ beqz $v0, .L802690EC /* 19782C 80268F4C 0000102D */ daddu $v0, $zero, $zero /* 197830 80268F50 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 197834 80268F54 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 197838 80268F58 904200AA */ lbu $v0, 0xAA($v0) /* 19783C 80268F5C 30420001 */ andi $v0, $v0, 0x1 /* 197840 80268F60 14400062 */ bnez $v0, .L802690EC /* 197844 80268F64 0000102D */ daddu $v0, $zero, $zero /* 197848 80268F68 96A30298 */ lhu $v1, 0x298($s5) /* 19784C 80268F6C 2C62270F */ sltiu $v0, $v1, 0x270F /* 197850 80268F70 1040000A */ beqz $v0, .L80268F9C /* 197854 80268F74 24620001 */ addiu $v0, $v1, 0x1 /* 197858 80268F78 A6A20298 */ sh $v0, 0x298($s5) /* 19785C 80268F7C 0809A3E9 */ j .L80268FA4 /* 197860 80268F80 A6C0006E */ sh $zero, 0x6E($s6) .L80268F84: /* 197864 80268F84 0809A408 */ j .L80269020 /* 197868 80268F88 24170001 */ addiu $s7, $zero, 0x1 .L80268F8C: /* 19786C 80268F8C 24020001 */ addiu $v0, $zero, 0x1 /* 197870 80268F90 A2220087 */ sb $v0, 0x87($s1) /* 197874 80268F94 0809A41A */ j .L80269068 /* 197878 80268F98 24120001 */ addiu $s2, $zero, 0x1 .L80268F9C: /* 19787C 80268F9C 24020001 */ addiu $v0, $zero, 0x1 /* 197880 80268FA0 A6C2006E */ sh $v0, 0x6E($s6) .L80268FA4: /* 197884 80268FA4 0000902D */ daddu $s2, $zero, $zero /* 197888 80268FA8 24100003 */ addiu $s0, $zero, 0x3 /* 19788C 80268FAC 3C02800E */ lui $v0, %hi(gBattleStatus) /* 197890 80268FB0 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) /* 197894 80268FB4 3C030008 */ lui $v1, (0x80000 >> 16) /* 197898 80268FB8 00431024 */ and $v0, $v0, $v1 /* 19789C 80268FBC 14400005 */ bnez $v0, .L80268FD4 /* 1978A0 80268FC0 2413000A */ addiu $s3, $zero, 0xA /* 1978A4 80268FC4 0C03A752 */ jal is_ability_active /* 1978A8 80268FC8 0240202D */ daddu $a0, $s2, $zero /* 1978AC 80268FCC 54400001 */ bnel $v0, $zero, .L80268FD4 /* 1978B0 80268FD0 24100005 */ addiu $s0, $zero, 0x5 .L80268FD4: /* 1978B4 80268FD4 82230431 */ lb $v1, 0x431($s1) /* 1978B8 80268FD8 02701021 */ addu $v0, $s3, $s0 /* 1978BC 80268FDC 00621823 */ subu $v1, $v1, $v0 /* 1978C0 80268FE0 04620001 */ bltzl $v1, .L80268FE8 /* 1978C4 80268FE4 24630040 */ addiu $v1, $v1, 0x40 .L80268FE8: /* 1978C8 80268FE8 1260000D */ beqz $s3, .L80269020 /* 1978CC 80268FEC 0000202D */ daddu $a0, $zero, $zero .L80268FF0: /* 1978D0 80268FF0 28620040 */ slti $v0, $v1, 0x40 /* 1978D4 80268FF4 50400001 */ beql $v0, $zero, .L80268FFC /* 1978D8 80268FF8 2463FFC0 */ addiu $v1, $v1, -0x40 .L80268FFC: /* 1978DC 80268FFC 00031080 */ sll $v0, $v1, 2 /* 1978E0 80269000 02221021 */ addu $v0, $s1, $v0 /* 1978E4 80269004 8C420330 */ lw $v0, 0x330($v0) /* 1978E8 80269008 00541024 */ and $v0, $v0, $s4 /* 1978EC 8026900C 1440FFDD */ bnez $v0, .L80268F84 /* 1978F0 80269010 24840001 */ addiu $a0, $a0, 0x1 /* 1978F4 80269014 0093102A */ slt $v0, $a0, $s3 /* 1978F8 80269018 1440FFF5 */ bnez $v0, .L80268FF0 /* 1978FC 8026901C 24630001 */ addiu $v1, $v1, 0x1 .L80269020: /* 197900 80269020 82230431 */ lb $v1, 0x431($s1) /* 197904 80269024 00701823 */ subu $v1, $v1, $s0 /* 197908 80269028 04620001 */ bltzl $v1, .L80269030 /* 19790C 8026902C 24630040 */ addiu $v1, $v1, 0x40 .L80269030: /* 197910 80269030 1200000D */ beqz $s0, .L80269068 /* 197914 80269034 0000202D */ daddu $a0, $zero, $zero .L80269038: /* 197918 80269038 28620040 */ slti $v0, $v1, 0x40 /* 19791C 8026903C 50400001 */ beql $v0, $zero, .L80269044 /* 197920 80269040 2463FFC0 */ addiu $v1, $v1, -0x40 .L80269044: /* 197924 80269044 00031080 */ sll $v0, $v1, 2 /* 197928 80269048 02221021 */ addu $v0, $s1, $v0 /* 19792C 8026904C 8C420330 */ lw $v0, 0x330($v0) /* 197930 80269050 00541024 */ and $v0, $v0, $s4 /* 197934 80269054 1440FFCD */ bnez $v0, .L80268F8C /* 197938 80269058 24840001 */ addiu $a0, $a0, 0x1 /* 19793C 8026905C 0090102A */ slt $v0, $a0, $s0 /* 197940 80269060 1440FFF5 */ bnez $v0, .L80269038 /* 197944 80269064 24630001 */ addiu $v1, $v1, 0x1 .L80269068: /* 197948 80269068 12E00003 */ beqz $s7, .L80269078 /* 19794C 8026906C 2402FFFF */ addiu $v0, $zero, -0x1 /* 197950 80269070 A2220087 */ sb $v0, 0x87($s1) /* 197954 80269074 0000902D */ daddu $s2, $zero, $zero .L80269078: /* 197958 80269078 24020001 */ addiu $v0, $zero, 0x1 /* 19795C 8026907C 16420012 */ bne $s2, $v0, .L802690C8 /* 197960 80269080 02701021 */ addu $v0, $s3, $s0 /* 197964 80269084 82230431 */ lb $v1, 0x431($s1) /* 197968 80269088 00621823 */ subu $v1, $v1, $v0 /* 19796C 8026908C 04620001 */ bltzl $v1, .L80269094 /* 197970 80269090 24630040 */ addiu $v1, $v1, 0x40 .L80269094: /* 197974 80269094 1040000C */ beqz $v0, .L802690C8 /* 197978 80269098 0000202D */ daddu $a0, $zero, $zero /* 19797C 8026909C 0040282D */ daddu $a1, $v0, $zero .L802690A0: /* 197980 802690A0 28620040 */ slti $v0, $v1, 0x40 /* 197984 802690A4 50400001 */ beql $v0, $zero, .L802690AC /* 197988 802690A8 2463FFC0 */ addiu $v1, $v1, -0x40 .L802690AC: /* 19798C 802690AC 00031080 */ sll $v0, $v1, 2 /* 197990 802690B0 02221021 */ addu $v0, $s1, $v0 /* 197994 802690B4 AC400330 */ sw $zero, 0x330($v0) /* 197998 802690B8 24840001 */ addiu $a0, $a0, 0x1 /* 19799C 802690BC 0085102A */ slt $v0, $a0, $a1 /* 1979A0 802690C0 1440FFF7 */ bnez $v0, .L802690A0 /* 1979A4 802690C4 24630001 */ addiu $v1, $v1, 0x1 .L802690C8: /* 1979A8 802690C8 12400008 */ beqz $s2, .L802690EC /* 1979AC 802690CC 0240102D */ daddu $v0, $s2, $zero /* 1979B0 802690D0 86C2006E */ lh $v0, 0x6E($s6) /* 1979B4 802690D4 14400005 */ bnez $v0, .L802690EC /* 1979B8 802690D8 0240102D */ daddu $v0, $s2, $zero /* 1979BC 802690DC 96A2029A */ lhu $v0, 0x29A($s5) /* 1979C0 802690E0 24420001 */ addiu $v0, $v0, 0x1 /* 1979C4 802690E4 A6A2029A */ sh $v0, 0x29A($s5) /* 1979C8 802690E8 0240102D */ daddu $v0, $s2, $zero .L802690EC: /* 1979CC 802690EC 8FBF0030 */ lw $ra, 0x30($sp) /* 1979D0 802690F0 8FB7002C */ lw $s7, 0x2C($sp) /* 1979D4 802690F4 8FB60028 */ lw $s6, 0x28($sp) /* 1979D8 802690F8 8FB50024 */ lw $s5, 0x24($sp) /* 1979DC 802690FC 8FB40020 */ lw $s4, 0x20($sp) /* 1979E0 80269100 8FB3001C */ lw $s3, 0x1C($sp) /* 1979E4 80269104 8FB20018 */ lw $s2, 0x18($sp) /* 1979E8 80269108 8FB10014 */ lw $s1, 0x14($sp) /* 1979EC 8026910C 8FB00010 */ lw $s0, 0x10($sp) /* 1979F0 80269110 03E00008 */ jr $ra /* 1979F4 80269114 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: s32 check_block_input(s32 buttonMask) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; s32 mashWindow; s32 blockWindow; s32 block; s32 mash = FALSE; s32 bufferPos; s32 i; s32 ignoreWindow; battleStatus->blockResult = 0; // Fail if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_TUTORIAL_BLOCK && (battleStatus->flags1 & BS_FLAGS1_TUTORIAL_BATTLE)) { battleStatus->blockResult = 1; return TRUE; } if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED || (gGameStatusPtr->demoFlags & 1)) { return FALSE; } if (playerData->hitsTaken < 9999) { playerData->hitsTaken++; actionCommandStatus->hitsTakenIsMax = FALSE; } else { actionCommandStatus->hitsTakenIsMax = TRUE; } block = FALSE; blockWindow = 3; mashWindow = 10; if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING) && is_ability_active(ABILITY_DODGE_MASTER)) { blockWindow = 5; } // Pre-window mashing check bufferPos = battleStatus->inputBufferPos; bufferPos -= mashWindow + blockWindow; if (bufferPos < 0) { bufferPos += ARRAY_COUNT(battleStatus->pushInputBuffer); } for (i = 0; i < mashWindow; i++) { if (bufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) { bufferPos -= ARRAY_COUNT(battleStatus->pushInputBuffer); } if (battleStatus->pushInputBuffer[bufferPos] & buttonMask) { mash = TRUE; break; } bufferPos++; } // Block check bufferPos = battleStatus->inputBufferPos; bufferPos -= blockWindow; if (bufferPos < 0) { bufferPos += ARRAY_COUNT(battleStatus->pushInputBuffer); } for (i = 0; i < blockWindow; i++) { if (bufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) { bufferPos -= ARRAY_COUNT(battleStatus->pushInputBuffer); } if (battleStatus->pushInputBuffer[bufferPos] & buttonMask) { battleStatus->blockResult = 1; // Block block = TRUE; break; } bufferPos++; } if (mash) { battleStatus->blockResult = -1; // Mash block = FALSE; } // Ignore inputs until another mash window has passed, so check_block_input() can be called in quick succession if (block == TRUE) { bufferPos = battleStatus->inputBufferPos; bufferPos -= mashWindow + blockWindow; if (bufferPos < 0) { bufferPos += ARRAY_COUNT(battleStatus->pushInputBuffer); } for (i = 0; i < mashWindow + blockWindow; i++) { if (bufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) { bufferPos -= ARRAY_COUNT(battleStatus->pushInputBuffer); } battleStatus->pushInputBuffer[bufferPos] = 0; bufferPos++; } } if (block && !actionCommandStatus->hitsTakenIsMax) { playerData->hitsBlocked++; } return block; }
### RAW ASSEMBLY INSTRUCTIONS: glabel nuAuMgr /* 26208 8004AE08 27BDFF50 */ addiu $sp, $sp, -0xB0 /* 2620C 8004AE0C AFB00088 */ sw $s0, 0x88($sp) /* 26210 8004AE10 27B00020 */ addiu $s0, $sp, 0x20 /* 26214 8004AE14 0200202D */ daddu $a0, $s0, $zero /* 26218 8004AE18 27A50038 */ addiu $a1, $sp, 0x38 /* 2621C 8004AE1C 24060008 */ addiu $a2, $zero, 0x8 /* 26220 8004AE20 AFBF00AC */ sw $ra, 0xAC($sp) /* 26224 8004AE24 AFBE00A8 */ sw $fp, 0xA8($sp) /* 26228 8004AE28 AFB700A4 */ sw $s7, 0xA4($sp) /* 2622C 8004AE2C AFB600A0 */ sw $s6, 0xA0($sp) /* 26230 8004AE30 AFB5009C */ sw $s5, 0x9C($sp) /* 26234 8004AE34 AFB40098 */ sw $s4, 0x98($sp) /* 26238 8004AE38 AFB30094 */ sw $s3, 0x94($sp) /* 2623C 8004AE3C AFB20090 */ sw $s2, 0x90($sp) /* 26240 8004AE40 0C019560 */ jal osCreateMesgQueue /* 26244 8004AE44 AFB1008C */ sw $s1, 0x8C($sp) /* 26248 8004AE48 27B10058 */ addiu $s1, $sp, 0x58 /* 2624C 8004AE4C 0220202D */ daddu $a0, $s1, $zero /* 26250 8004AE50 27A50070 */ addiu $a1, $sp, 0x70 /* 26254 8004AE54 0C019560 */ jal osCreateMesgQueue /* 26258 8004AE58 24060001 */ addiu $a2, $zero, 0x1 /* 2625C 8004AE5C 27A40010 */ addiu $a0, $sp, 0x10 /* 26260 8004AE60 0200282D */ daddu $a1, $s0, $zero /* 26264 8004AE64 0C017B8C */ jal nuScAddClient /* 26268 8004AE68 24060003 */ addiu $a2, $zero, 0x3 /* 2626C 8004AE6C 0000902D */ daddu $s2, $zero, $zero /* 26270 8004AE70 0240982D */ daddu $s3, $s2, $zero /* 26274 8004AE74 0240A82D */ daddu $s5, $s2, $zero /* 26278 8004AE78 3C14800A */ lui $s4, %hi(AlCmdListBuffers) /* 2627C 8004AE7C 8E943510 */ lw $s4, %lo(AlCmdListBuffers)($s4) /* 26280 8004AE80 3C1E800A */ lui $fp, %hi(D_800A3628) /* 26284 8004AE84 8FDE3628 */ lw $fp, %lo(D_800A3628)($fp) /* 26288 8004AE88 3C178008 */ lui $s7, %hi(nuAuPreNMI) /* 2628C 8004AE8C 26F78170 */ addiu $s7, $s7, %lo(nuAuPreNMI) /* 26290 8004AE90 AFB10080 */ sw $s1, 0x80($sp) /* 26294 8004AE94 3C11800A */ lui $s1, %hi(nuAuTasks) /* 26298 8004AE98 26313520 */ addiu $s1, $s1, %lo(nuAuTasks) /* 2629C 8004AE9C AFA00078 */ sw $zero, 0x78($sp) .L8004AEA0: /* 262A0 8004AEA0 27A40020 */ addiu $a0, $sp, 0x20 .L8004AEA4: /* 262A4 8004AEA4 27A50074 */ addiu $a1, $sp, 0x74 .L8004AEA8: /* 262A8 8004AEA8 0C0195BC */ jal osRecvMesg /* 262AC 8004AEAC 24060001 */ addiu $a2, $zero, 0x1 /* 262B0 8004AEB0 8FA20074 */ lw $v0, 0x74($sp) /* 262B4 8004AEB4 84430000 */ lh $v1, 0x0($v0) /* 262B8 8004AEB8 24080001 */ addiu $t0, $zero, 0x1 /* 262BC 8004AEBC 10680005 */ beq $v1, $t0, .L8004AED4 /* 262C0 8004AEC0 24020002 */ addiu $v0, $zero, 0x2 /* 262C4 8004AEC4 1062005F */ beq $v1, $v0, .L8004B044 /* 262C8 8004AEC8 27A40020 */ addiu $a0, $sp, 0x20 /* 262CC 8004AECC 08012BAA */ j .L8004AEA8 /* 262D0 8004AED0 27A50074 */ addiu $a1, $sp, 0x74 .L8004AED4: /* 262D4 8004AED4 8FA20078 */ lw $v0, 0x78($sp) /* 262D8 8004AED8 10400021 */ beqz $v0, .L8004AF60 /* 262DC 8004AEDC 24080001 */ addiu $t0, $zero, 0x1 /* 262E0 8004AEE0 3C028008 */ lui $v0, %hi(nuAuTaskStop) /* 262E4 8004AEE4 90428180 */ lbu $v0, %lo(nuAuTaskStop)($v0) /* 262E8 8004AEE8 1448001D */ bne $v0, $t0, .L8004AF60 /* 262EC 8004AEEC 0100302D */ daddu $a2, $t0, $zero /* 262F0 8004AEF0 8FA80080 */ lw $t0, 0x80($sp) /* 262F4 8004AEF4 3C04800E */ lui $a0, %hi(D_800DA444) /* 262F8 8004AEF8 2484A444 */ addiu $a0, $a0, %lo(D_800DA444) /* 262FC 8004AEFC AE340040 */ sw $s4, 0x40($s1) /* 26300 8004AF00 AE280050 */ sw $t0, 0x50($s1) /* 26304 8004AF04 8FA8007C */ lw $t0, 0x7C($sp) /* 26308 8004AF08 0220282D */ daddu $a1, $s1, $zero /* 2630C 8004AF0C 01141023 */ subu $v0, $t0, $s4 /* 26310 8004AF10 000210C3 */ sra $v0, $v0, 3 /* 26314 8004AF14 000210C0 */ sll $v0, $v0, 3 /* 26318 8004AF18 0C019608 */ jal osSendMesg /* 2631C 8004AF1C AE220044 */ sw $v0, 0x44($s1) /* 26320 8004AF20 0C012C9A */ jal nuAuCleanDMABuffers /* 26324 8004AF24 26730001 */ addiu $s3, $s3, 0x1 /* 26328 8004AF28 0000282D */ daddu $a1, $zero, $zero /* 2632C 8004AF2C 8FA40080 */ lw $a0, 0x80($sp) /* 26330 8004AF30 0C0195BC */ jal osRecvMesg /* 26334 8004AF34 24060001 */ addiu $a2, $zero, 0x1 /* 26338 8004AF38 24080003 */ addiu $t0, $zero, 0x3 /* 2633C 8004AF3C 52680001 */ beql $s3, $t0, .L8004AF44 /* 26340 8004AF40 0000982D */ daddu $s3, $zero, $zero .L8004AF44: /* 26344 8004AF44 26520001 */ addiu $s2, $s2, 0x1 /* 26348 8004AF48 24080003 */ addiu $t0, $zero, 0x3 /* 2634C 8004AF4C 16480004 */ bne $s2, $t0, .L8004AF60 /* 26350 8004AF50 26310058 */ addiu $s1, $s1, 0x58 /* 26354 8004AF54 3C11800A */ lui $s1, %hi(nuAuTasks) /* 26358 8004AF58 26313520 */ addiu $s1, $s1, %lo(nuAuTasks) /* 2635C 8004AF5C 0000902D */ daddu $s2, $zero, $zero .L8004AF60: /* 26360 8004AF60 0C018554 */ jal osAiGetStatus /* 26364 8004AF64 00000000 */ nop /* 26368 8004AF68 04410003 */ bgez $v0, .L8004AF78 /* 2636C 8004AF6C 00000000 */ nop /* 26370 8004AF70 08012BA8 */ j .L8004AEA0 /* 26374 8004AF74 0000B02D */ daddu $s6, $zero, $zero .L8004AF78: /* 26378 8004AF78 0C018550 */ jal osAiGetLength /* 2637C 8004AF7C 00000000 */ nop /* 26380 8004AF80 8FA30078 */ lw $v1, 0x78($sp) /* 26384 8004AF84 10600011 */ beqz $v1, .L8004AFCC /* 26388 8004AF88 00028082 */ srl $s0, $v0, 2 /* 2638C 8004AF8C 3C028008 */ lui $v0, %hi(nuAuTaskStop) /* 26390 8004AF90 90428180 */ lbu $v0, %lo(nuAuTaskStop)($v0) /* 26394 8004AF94 24080001 */ addiu $t0, $zero, 0x1 /* 26398 8004AF98 1448000D */ bne $v0, $t0, .L8004AFD0 /* 2639C 8004AF9C 2A0200B8 */ slti $v0, $s0, 0xB8 /* 263A0 8004AFA0 03C0202D */ daddu $a0, $fp, $zero /* 263A4 8004AFA4 0C0185A0 */ jal osAiSetNextBuffer /* 263A8 8004AFA8 00152880 */ sll $a1, $s5, 2 /* 263AC 8004AFAC 00121080 */ sll $v0, $s2, 2 /* 263B0 8004AFB0 3C14800A */ lui $s4, %hi(AlCmdListBuffers) /* 263B4 8004AFB4 0282A021 */ addu $s4, $s4, $v0 /* 263B8 8004AFB8 8E943510 */ lw $s4, %lo(AlCmdListBuffers)($s4) /* 263BC 8004AFBC 00131080 */ sll $v0, $s3, 2 /* 263C0 8004AFC0 3C1E800A */ lui $fp, %hi(D_800A3628) /* 263C4 8004AFC4 03C2F021 */ addu $fp, $fp, $v0 /* 263C8 8004AFC8 8FDE3628 */ lw $fp, %lo(D_800A3628)($fp) .L8004AFCC: /* 263CC 8004AFCC 2A0200B8 */ slti $v0, $s0, 0xB8 .L8004AFD0: /* 263D0 8004AFD0 14400003 */ bnez $v0, .L8004AFE0 /* 263D4 8004AFD4 00000000 */ nop /* 263D8 8004AFD8 12C00005 */ beqz $s6, .L8004AFF0 /* 263DC 8004AFDC 24160001 */ addiu $s6, $zero, 0x1 .L8004AFE0: /* 263E0 8004AFE0 3C15800A */ lui $s5, %hi(AlFrameSize) /* 263E4 8004AFE4 8EB53634 */ lw $s5, %lo(AlFrameSize)($s5) /* 263E8 8004AFE8 08012BFE */ j .L8004AFF8 /* 263EC 8004AFEC 0000B02D */ daddu $s6, $zero, $zero .L8004AFF0: /* 263F0 8004AFF0 3C15800A */ lui $s5, %hi(AlMinFrameSize) /* 263F4 8004AFF4 8EB53638 */ lw $s5, %lo(AlMinFrameSize)($s5) .L8004AFF8: /* 263F8 8004AFF8 0C0187A4 */ jal osVirtualToPhysical /* 263FC 8004AFFC 03C0202D */ daddu $a0, $fp, $zero /* 26400 8004B000 0280202D */ daddu $a0, $s4, $zero /* 26404 8004B004 27A50078 */ addiu $a1, $sp, 0x78 /* 26408 8004B008 0040302D */ daddu $a2, $v0, $zero /* 2640C 8004B00C 0C015970 */ jal alAudioFrame /* 26410 8004B010 02A0382D */ daddu $a3, $s5, $zero /* 26414 8004B014 3C038008 */ lui $v1, %hi(nuAuPreNMIFunc) /* 26418 8004B018 8C638174 */ lw $v1, %lo(nuAuPreNMIFunc)($v1) /* 2641C 8004B01C 1060FFA0 */ beqz $v1, .L8004AEA0 /* 26420 8004B020 AFA2007C */ sw $v0, 0x7C($sp) /* 26424 8004B024 92E20000 */ lbu $v0, 0x0($s7) /* 26428 8004B028 1040FF9E */ beqz $v0, .L8004AEA4 /* 2642C 8004B02C 27A40020 */ addiu $a0, $sp, 0x20 /* 26430 8004B030 0040282D */ daddu $a1, $v0, $zero /* 26434 8004B034 0060F809 */ jalr $v1 /* 26438 8004B038 24040001 */ addiu $a0, $zero, 0x1 /* 2643C 8004B03C 08012C19 */ j .L8004B064 /* 26440 8004B040 00000000 */ nop .L8004B044: /* 26444 8004B044 3C028008 */ lui $v0, %hi(nuAuPreNMIFunc) /* 26448 8004B048 8C428174 */ lw $v0, %lo(nuAuPreNMIFunc)($v0) /* 2644C 8004B04C 10400005 */ beqz $v0, .L8004B064 /* 26450 8004B050 00000000 */ nop /* 26454 8004B054 3C058008 */ lui $a1, %hi(nuAuPreNMI) /* 26458 8004B058 90A58170 */ lbu $a1, %lo(nuAuPreNMI)($a1) /* 2645C 8004B05C 0040F809 */ jalr $v0 /* 26460 8004B060 24040002 */ addiu $a0, $zero, 0x2 .L8004B064: /* 26464 8004B064 92E20000 */ lbu $v0, 0x0($s7) /* 26468 8004B068 24420001 */ addiu $v0, $v0, 0x1 /* 2646C 8004B06C 08012BA8 */ j .L8004AEA0 /* 26470 8004B070 A2E20000 */ sb $v0, 0x0($s7) ### DECOMPILED C INSTRUCTIONS: void nuAuMgr(void* arg) { NUScClient auClient; OSMesgQueue auMesgQ; OSMesg auMsgBuf[NU_AU_MESG_MAX]; OSMesgQueue auRtnMesgQ; OSMesg auRtnMesgBuf; NUScMsg* mesg_type; s32 cmdList_len; Acmd* cmdListAfter_ptr; s32 cmdListIndex; s32 bufferIndex; s32 sampleSize; Acmd* cmdListBuf; u8* bufferPtr; s32 samples; s32 cond; osCreateMesgQueue(&auMesgQ, auMsgBuf, NU_AU_MESG_MAX); osCreateMesgQueue(&auRtnMesgQ, &auRtnMesgBuf, 1); nuScAddClient(&auClient, &auMesgQ, NU_SC_RETRACE_MSG | NU_SC_PRENMI_MSG); cmdList_len = 0; cmdListIndex = 0; bufferIndex = 0; samples = 0; cmdListBuf = AlCmdListBuffers[0]; bufferPtr = D_800A3628[0]; while (TRUE) { osRecvMesg(&auMesgQ, (OSMesg*)&mesg_type, OS_MESG_BLOCK); switch (*mesg_type) { case NU_SC_RETRACE_MSG: if (cmdList_len != 0 && nuAuTaskStop == NU_AU_TASK_RUN) { nuAuTasks[cmdListIndex].msgQ = &auRtnMesgQ; nuAuTasks[cmdListIndex].list.t.data_ptr = (u64*)cmdListBuf; nuAuTasks[cmdListIndex].list.t.data_size = (cmdListAfter_ptr - cmdListBuf) * sizeof(Acmd); osSendMesg(&nusched.audioRequestMQ, &nuAuTasks[cmdListIndex], OS_MESG_BLOCK); nuAuCleanDMABuffers(); osRecvMesg(&auRtnMesgQ, NULL, 1); if (++bufferIndex == 3) { bufferIndex = 0; } if (++cmdListIndex == 3) { cmdListIndex = 0; } } if (osAiGetStatus() & AI_STATUS_FIFO_FULL) { cond = FALSE; continue; } sampleSize = osAiGetLength() >> 2; if (cmdList_len != 0 && nuAuTaskStop == NU_AU_TASK_RUN) { osAiSetNextBuffer(bufferPtr, samples * 4); cmdListBuf = AlCmdListBuffers[cmdListIndex]; bufferPtr = D_800A3628[bufferIndex]; } if (sampleSize < AUDIO_SAMPLES || cond) { samples = AlFrameSize; cond = FALSE; } else { samples = AlMinFrameSize; cond = TRUE; } cmdListAfter_ptr = alAudioFrame(cmdListBuf, &cmdList_len, (s16*)osVirtualToPhysical(bufferPtr), samples); if (nuAuPreNMIFunc != 0 && nuAuPreNMI != 0) { nuAuPreNMIFunc(NU_SC_RETRACE_MSG, nuAuPreNMI); nuAuPreNMI++; } break; case NU_SC_PRENMI_MSG: if (nuAuPreNMIFunc) { nuAuPreNMIFunc(NU_SC_PRENMI_MSG, nuAuPreNMI); } nuAuPreNMI++; break; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel windy_leaves_appendGfx /* 35E5D0 E0056BD0 27BDFEF0 */ addiu $sp, $sp, -0x110 /* 35E5D4 E0056BD4 AFBE00F8 */ sw $fp, 0xF8($sp) /* 35E5D8 E0056BD8 0080F02D */ daddu $fp, $a0, $zero /* 35E5DC E0056BDC AFBF00FC */ sw $ra, 0xFC($sp) /* 35E5E0 E0056BE0 AFB700F4 */ sw $s7, 0xF4($sp) /* 35E5E4 E0056BE4 AFB600F0 */ sw $s6, 0xF0($sp) /* 35E5E8 E0056BE8 AFB500EC */ sw $s5, 0xEC($sp) /* 35E5EC E0056BEC AFB400E8 */ sw $s4, 0xE8($sp) /* 35E5F0 E0056BF0 AFB300E4 */ sw $s3, 0xE4($sp) /* 35E5F4 E0056BF4 AFB200E0 */ sw $s2, 0xE0($sp) /* 35E5F8 E0056BF8 AFB100DC */ sw $s1, 0xDC($sp) /* 35E5FC E0056BFC AFB000D8 */ sw $s0, 0xD8($sp) /* 35E600 E0056C00 F7B60108 */ sdc1 $f22, 0x108($sp) /* 35E604 E0056C04 F7B40100 */ sdc1 $f20, 0x100($sp) /* 35E608 E0056C08 8FD0000C */ lw $s0, 0xC($fp) /* 35E60C E0056C0C 8E020000 */ lw $v0, 0x0($s0) /* 35E610 E0056C10 3C170900 */ lui $s7, %hi(D_09001280_40E510) /* 35E614 E0056C14 26F71280 */ addiu $s7, $s7, %lo(D_09001280_40E510) /* 35E618 E0056C18 14400003 */ bnez $v0, .LE0056C28 /* 35E61C E0056C1C 3C02DB06 */ lui $v0, (0xDB060024 >> 16) /* 35E620 E0056C20 3C170900 */ lui $s7, %hi(D_09001258_40E4E8) /* 35E624 E0056C24 26F71258 */ addiu $s7, $s7, %lo(D_09001258_40E4E8) .LE0056C28: /* 35E628 E0056C28 34420024 */ ori $v0, $v0, (0xDB060024 & 0xFFFF) /* 35E62C E0056C2C 3C061464 */ lui $a2, (0x14641400 >> 16) /* 35E630 E0056C30 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 35E634 E0056C34 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 35E638 E0056C38 8E650000 */ lw $a1, 0x0($s3) /* 35E63C E0056C3C 34C61400 */ ori $a2, $a2, (0x14641400 & 0xFFFF) /* 35E640 E0056C40 00A0202D */ daddu $a0, $a1, $zero /* 35E644 E0056C44 24A50008 */ addiu $a1, $a1, 0x8 /* 35E648 E0056C48 AE650000 */ sw $a1, 0x0($s3) /* 35E64C E0056C4C AC820000 */ sw $v0, 0x0($a0) /* 35E650 E0056C50 24A20008 */ addiu $v0, $a1, 0x8 /* 35E654 E0056C54 AE620000 */ sw $v0, 0x0($s3) /* 35E658 E0056C58 8FC30010 */ lw $v1, 0x10($fp) /* 35E65C E0056C5C 24A20010 */ addiu $v0, $a1, 0x10 /* 35E660 E0056C60 AE620000 */ sw $v0, 0x0($s3) /* 35E664 E0056C64 8C62001C */ lw $v0, 0x1C($v1) /* 35E668 E0056C68 3C038000 */ lui $v1, (0x80000000 >> 16) /* 35E66C E0056C6C 00431021 */ addu $v0, $v0, $v1 /* 35E670 E0056C70 AC820004 */ sw $v0, 0x4($a0) /* 35E674 E0056C74 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 35E678 E0056C78 ACA20000 */ sw $v0, 0x0($a1) /* 35E67C E0056C7C 3C020900 */ lui $v0, %hi(D_09001180_40E410) /* 35E680 E0056C80 24421180 */ addiu $v0, $v0, %lo(D_09001180_40E410) /* 35E684 E0056C84 ACA20004 */ sw $v0, 0x4($a1) /* 35E688 E0056C88 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 35E68C E0056C8C ACA20008 */ sw $v0, 0x8($a1) /* 35E690 E0056C90 92020027 */ lbu $v0, 0x27($s0) /* 35E694 E0056C94 24120001 */ addiu $s2, $zero, 0x1 /* 35E698 E0056C98 00461025 */ or $v0, $v0, $a2 /* 35E69C E0056C9C ACA2000C */ sw $v0, 0xC($a1) /* 35E6A0 E0056CA0 8E050004 */ lw $a1, 0x4($s0) /* 35E6A4 E0056CA4 8E060008 */ lw $a2, 0x8($s0) /* 35E6A8 E0056CA8 8E07000C */ lw $a3, 0xC($s0) /* 35E6AC E0056CAC 0C080108 */ jal shim_guTranslateF /* 35E6B0 E0056CB0 27A40018 */ addiu $a0, $sp, 0x18 /* 35E6B4 E0056CB4 27B10058 */ addiu $s1, $sp, 0x58 /* 35E6B8 E0056CB8 4480A000 */ mtc1 $zero, $f20 /* 35E6BC E0056CBC 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 35E6C0 E0056CC0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 35E6C4 E0056CC4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 35E6C8 E0056CC8 4481B000 */ mtc1 $at, $f22 /* 35E6CC E0056CCC 00031080 */ sll $v0, $v1, 2 /* 35E6D0 E0056CD0 00431021 */ addu $v0, $v0, $v1 /* 35E6D4 E0056CD4 00021080 */ sll $v0, $v0, 2 /* 35E6D8 E0056CD8 00431023 */ subu $v0, $v0, $v1 /* 35E6DC E0056CDC 000218C0 */ sll $v1, $v0, 3 /* 35E6E0 E0056CE0 00431021 */ addu $v0, $v0, $v1 /* 35E6E4 E0056CE4 000210C0 */ sll $v0, $v0, 3 /* 35E6E8 E0056CE8 4406A000 */ mfc1 $a2, $f20 /* 35E6EC E0056CEC 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 35E6F0 E0056CF0 00220821 */ addu $at, $at, $v0 /* 35E6F4 E0056CF4 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 35E6F8 E0056CF8 4407B000 */ mfc1 $a3, $f22 /* 35E6FC E0056CFC 46000007 */ neg.s $f0, $f0 /* 35E700 E0056D00 44050000 */ mfc1 $a1, $f0 /* 35E704 E0056D04 0220202D */ daddu $a0, $s1, $zero /* 35E708 E0056D08 0C080104 */ jal shim_guRotateF /* 35E70C E0056D0C E7B40010 */ swc1 $f20, 0x10($sp) /* 35E710 E0056D10 0220202D */ daddu $a0, $s1, $zero /* 35E714 E0056D14 27A50018 */ addiu $a1, $sp, 0x18 /* 35E718 E0056D18 0C080114 */ jal shim_guMtxCatF /* 35E71C E0056D1C 27A60098 */ addiu $a2, $sp, 0x98 /* 35E720 E0056D20 8FC20008 */ lw $v0, 0x8($fp) /* 35E724 E0056D24 0242102A */ slt $v0, $s2, $v0 /* 35E728 E0056D28 1040004C */ beqz $v0, .LE0056E5C /* 35E72C E0056D2C 2610003C */ addiu $s0, $s0, 0x3C /* 35E730 E0056D30 3C16800A */ lui $s6, %hi(gDisplayContext) /* 35E734 E0056D34 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 35E738 E0056D38 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 35E73C E0056D3C 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 35E740 E0056D40 3C140001 */ lui $s4, (0x11630 >> 16) /* 35E744 E0056D44 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 35E748 E0056D48 26100020 */ addiu $s0, $s0, 0x20 .LE0056D4C: /* 35E74C E0056D4C 0220202D */ daddu $a0, $s1, $zero /* 35E750 E0056D50 8E05FFE4 */ lw $a1, -0x1C($s0) /* 35E754 E0056D54 8E06FFE8 */ lw $a2, -0x18($s0) /* 35E758 E0056D58 8E07FFEC */ lw $a3, -0x14($s0) /* 35E75C E0056D5C 0C080108 */ jal shim_guTranslateF /* 35E760 E0056D60 26520001 */ addiu $s2, $s2, 0x1 /* 35E764 E0056D64 0220202D */ daddu $a0, $s1, $zero /* 35E768 E0056D68 27A50098 */ addiu $a1, $sp, 0x98 /* 35E76C E0056D6C 0C080114 */ jal shim_guMtxCatF /* 35E770 E0056D70 27A60018 */ addiu $a2, $sp, 0x18 /* 35E774 E0056D74 E7B60010 */ swc1 $f22, 0x10($sp) /* 35E778 E0056D78 8E05FFF8 */ lw $a1, -0x8($s0) /* 35E77C E0056D7C 4406A000 */ mfc1 $a2, $f20 /* 35E780 E0056D80 4407A000 */ mfc1 $a3, $f20 /* 35E784 E0056D84 0C080104 */ jal shim_guRotateF /* 35E788 E0056D88 0220202D */ daddu $a0, $s1, $zero /* 35E78C E0056D8C 0220202D */ daddu $a0, $s1, $zero /* 35E790 E0056D90 27A50018 */ addiu $a1, $sp, 0x18 /* 35E794 E0056D94 0C080114 */ jal shim_guMtxCatF /* 35E798 E0056D98 00A0302D */ daddu $a2, $a1, $zero /* 35E79C E0056D9C 0220202D */ daddu $a0, $s1, $zero /* 35E7A0 E0056DA0 E7B40010 */ swc1 $f20, 0x10($sp) /* 35E7A4 E0056DA4 8E050000 */ lw $a1, 0x0($s0) /* 35E7A8 E0056DA8 4406A000 */ mfc1 $a2, $f20 /* 35E7AC E0056DAC 4407B000 */ mfc1 $a3, $f22 /* 35E7B0 E0056DB0 0C080104 */ jal shim_guRotateF /* 35E7B4 E0056DB4 2610003C */ addiu $s0, $s0, 0x3C /* 35E7B8 E0056DB8 0220202D */ daddu $a0, $s1, $zero /* 35E7BC E0056DBC 27A50018 */ addiu $a1, $sp, 0x18 /* 35E7C0 E0056DC0 0C080114 */ jal shim_guMtxCatF /* 35E7C4 E0056DC4 00A0302D */ daddu $a2, $a1, $zero /* 35E7C8 E0056DC8 27A40018 */ addiu $a0, $sp, 0x18 /* 35E7CC E0056DCC 96A50000 */ lhu $a1, 0x0($s5) /* 35E7D0 E0056DD0 8EC20000 */ lw $v0, 0x0($s6) /* 35E7D4 E0056DD4 00052980 */ sll $a1, $a1, 6 /* 35E7D8 E0056DD8 00B42821 */ addu $a1, $a1, $s4 /* 35E7DC E0056DDC 0C080118 */ jal shim_guMtxF2L /* 35E7E0 E0056DE0 00452821 */ addu $a1, $v0, $a1 /* 35E7E4 E0056DE4 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 35E7E8 E0056DE8 8E640000 */ lw $a0, 0x0($s3) /* 35E7EC E0056DEC 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 35E7F0 E0056DF0 0080282D */ daddu $a1, $a0, $zero /* 35E7F4 E0056DF4 24840008 */ addiu $a0, $a0, 0x8 /* 35E7F8 E0056DF8 AE640000 */ sw $a0, 0x0($s3) /* 35E7FC E0056DFC 96A20000 */ lhu $v0, 0x0($s5) /* 35E800 E0056E00 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 35E804 E0056E04 ACA30000 */ sw $v1, 0x0($a1) /* 35E808 E0056E08 24430001 */ addiu $v1, $v0, 0x1 /* 35E80C E0056E0C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 35E810 E0056E10 00021180 */ sll $v0, $v0, 6 /* 35E814 E0056E14 A6A30000 */ sh $v1, 0x0($s5) /* 35E818 E0056E18 8EC30000 */ lw $v1, 0x0($s6) /* 35E81C E0056E1C 00541021 */ addu $v0, $v0, $s4 /* 35E820 E0056E20 00621821 */ addu $v1, $v1, $v0 /* 35E824 E0056E24 24820008 */ addiu $v0, $a0, 0x8 /* 35E828 E0056E28 ACA30004 */ sw $v1, 0x4($a1) /* 35E82C E0056E2C AE620000 */ sw $v0, 0x0($s3) /* 35E830 E0056E30 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 35E834 E0056E34 AC820000 */ sw $v0, 0x0($a0) /* 35E838 E0056E38 24020040 */ addiu $v0, $zero, 0x40 /* 35E83C E0056E3C AC970004 */ sw $s7, 0x4($a0) /* 35E840 E0056E40 AC860008 */ sw $a2, 0x8($a0) /* 35E844 E0056E44 AC82000C */ sw $v0, 0xC($a0) /* 35E848 E0056E48 8FC20008 */ lw $v0, 0x8($fp) /* 35E84C E0056E4C 24840010 */ addiu $a0, $a0, 0x10 /* 35E850 E0056E50 0242102A */ slt $v0, $s2, $v0 /* 35E854 E0056E54 1440FFBD */ bnez $v0, .LE0056D4C /* 35E858 E0056E58 AE640000 */ sw $a0, 0x0($s3) .LE0056E5C: /* 35E85C E0056E5C 8FBF00FC */ lw $ra, 0xFC($sp) /* 35E860 E0056E60 8FBE00F8 */ lw $fp, 0xF8($sp) /* 35E864 E0056E64 8FB700F4 */ lw $s7, 0xF4($sp) /* 35E868 E0056E68 8FB600F0 */ lw $s6, 0xF0($sp) /* 35E86C E0056E6C 8FB500EC */ lw $s5, 0xEC($sp) /* 35E870 E0056E70 8FB400E8 */ lw $s4, 0xE8($sp) /* 35E874 E0056E74 8FB300E4 */ lw $s3, 0xE4($sp) /* 35E878 E0056E78 8FB200E0 */ lw $s2, 0xE0($sp) /* 35E87C E0056E7C 8FB100DC */ lw $s1, 0xDC($sp) /* 35E880 E0056E80 8FB000D8 */ lw $s0, 0xD8($sp) /* 35E884 E0056E84 D7B60108 */ ldc1 $f22, 0x108($sp) /* 35E888 E0056E88 D7B40100 */ ldc1 $f20, 0x100($sp) /* 35E88C E0056E8C 03E00008 */ jr $ra /* 35E890 E0056E90 27BD0110 */ addiu $sp, $sp, 0x110 /* 35E894 E0056E94 00000000 */ nop /* 35E898 E0056E98 00000000 */ nop /* 35E89C E0056E9C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void windy_leaves_appendGfx(void* effect) { WindyLeavesFXData* part = ((EffectInstance*)effect)->data.windyLeaves; Matrix4f sp18, sp58, sp98; Gfx* dlist; s32 i; dlist = D_09001280_33E890; if (part->type == 0) { dlist = D_09001258_33E868; } gSPSegment(gMainGfxPos++, 0x09, OS_K0_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09001180_33E790); gDPSetPrimColor(gMainGfxPos++, 0, 0, 20, 100, 20, part->alpha); shim_guTranslateF(sp18, part->unk_04.x, part->unk_04.y, part->unk_04.z); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp98); part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { shim_guTranslateF(sp58, part->unk_04.x, part->unk_04.y, part->unk_04.z); shim_guMtxCatF(sp58, sp98, sp18); shim_guRotateF(sp58, part->unk_18, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, part->unk_20, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, dlist); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel BasicAI_Main /* 2587C 8004A47C 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 25880 8004A480 AFB20038 */ sw $s2, 0x38($sp) /* 25884 8004A484 0080902D */ daddu $s2, $a0, $zero /* 25888 8004A488 AFBF0048 */ sw $ra, 0x48($sp) /* 2588C 8004A48C AFB50044 */ sw $s5, 0x44($sp) /* 25890 8004A490 AFB40040 */ sw $s4, 0x40($sp) /* 25894 8004A494 AFB3003C */ sw $s3, 0x3C($sp) /* 25898 8004A498 AFB10034 */ sw $s1, 0x34($sp) /* 2589C 8004A49C AFB00030 */ sw $s0, 0x30($sp) /* 258A0 8004A4A0 8E510148 */ lw $s1, 0x148($s2) /* 258A4 8004A4A4 86240008 */ lh $a0, 0x8($s1) /* 258A8 8004A4A8 0C00EABB */ jal get_npc_unsafe /* 258AC 8004A4AC 00A0802D */ daddu $s0, $a1, $zero /* 258B0 8004A4B0 8E43000C */ lw $v1, 0xC($s2) /* 258B4 8004A4B4 0240202D */ daddu $a0, $s2, $zero /* 258B8 8004A4B8 8C650000 */ lw $a1, 0x0($v1) /* 258BC 8004A4BC 0C0B1EAF */ jal evt_get_variable /* 258C0 8004A4C0 0040A82D */ daddu $s5, $v0, $zero /* 258C4 8004A4C4 AFA00010 */ sw $zero, 0x10($sp) /* 258C8 8004A4C8 8E2300D0 */ lw $v1, 0xD0($s1) /* 258CC 8004A4CC 8C630030 */ lw $v1, 0x30($v1) /* 258D0 8004A4D0 AFA30014 */ sw $v1, 0x14($sp) /* 258D4 8004A4D4 8E2300D0 */ lw $v1, 0xD0($s1) /* 258D8 8004A4D8 8C63001C */ lw $v1, 0x1C($v1) /* 258DC 8004A4DC AFA30018 */ sw $v1, 0x18($sp) /* 258E0 8004A4E0 8E2300D0 */ lw $v1, 0xD0($s1) /* 258E4 8004A4E4 8C630024 */ lw $v1, 0x24($v1) /* 258E8 8004A4E8 AFA3001C */ sw $v1, 0x1C($sp) /* 258EC 8004A4EC 8E2300D0 */ lw $v1, 0xD0($s1) /* 258F0 8004A4F0 8C630028 */ lw $v1, 0x28($v1) /* 258F4 8004A4F4 27B40010 */ addiu $s4, $sp, 0x10 /* 258F8 8004A4F8 AFA30020 */ sw $v1, 0x20($sp) /* 258FC 8004A4FC 8E2300D0 */ lw $v1, 0xD0($s1) /* 25900 8004A500 3C014282 */ lui $at, (0x42820000 >> 16) /* 25904 8004A504 44810000 */ mtc1 $at, $f0 /* 25908 8004A508 8C63002C */ lw $v1, 0x2C($v1) /* 2590C 8004A50C 0040982D */ daddu $s3, $v0, $zero /* 25910 8004A510 E7A00028 */ swc1 $f0, 0x28($sp) /* 25914 8004A514 A7A0002C */ sh $zero, 0x2C($sp) /* 25918 8004A518 16000005 */ bnez $s0, .L8004A530 /* 2591C 8004A51C AFA30024 */ sw $v1, 0x24($sp) /* 25920 8004A520 8E2200B0 */ lw $v0, 0xB0($s1) /* 25924 8004A524 30420004 */ andi $v0, $v0, 0x4 /* 25928 8004A528 1040002B */ beqz $v0, .L8004A5D8 /* 2592C 8004A52C 00000000 */ nop .L8004A530: /* 25930 8004A530 2404F7FF */ addiu $a0, $zero, -0x801 /* 25934 8004A534 AE400070 */ sw $zero, 0x70($s2) /* 25938 8004A538 A6A0008E */ sh $zero, 0x8E($s5) /* 2593C 8004A53C 8E2200CC */ lw $v0, 0xCC($s1) /* 25940 8004A540 8EA30000 */ lw $v1, 0x0($s5) /* 25944 8004A544 8C420000 */ lw $v0, 0x0($v0) /* 25948 8004A548 00641824 */ and $v1, $v1, $a0 /* 2594C 8004A54C AEA30000 */ sw $v1, 0x0($s5) /* 25950 8004A550 AEA20028 */ sw $v0, 0x28($s5) /* 25954 8004A554 8E2200D0 */ lw $v0, 0xD0($s1) /* 25958 8004A558 8C420034 */ lw $v0, 0x34($v0) /* 2595C 8004A55C 54400005 */ bnel $v0, $zero, .L8004A574 /* 25960 8004A560 2402FDFF */ addiu $v0, $zero, -0x201 /* 25964 8004A564 34620200 */ ori $v0, $v1, 0x200 /* 25968 8004A568 2403FFF7 */ addiu $v1, $zero, -0x9 /* 2596C 8004A56C 0801295F */ j .L8004A57C /* 25970 8004A570 00431024 */ and $v0, $v0, $v1 .L8004A574: /* 25974 8004A574 00621024 */ and $v0, $v1, $v0 /* 25978 8004A578 34420008 */ ori $v0, $v0, 0x8 .L8004A57C: /* 2597C 8004A57C AEA20000 */ sw $v0, 0x0($s5) /* 25980 8004A580 8E2200B0 */ lw $v0, 0xB0($s1) /* 25984 8004A584 30420004 */ andi $v0, $v0, 0x4 /* 25988 8004A588 10400004 */ beqz $v0, .L8004A59C /* 2598C 8004A58C 24020063 */ addiu $v0, $zero, 0x63 /* 25990 8004A590 AE420070 */ sw $v0, 0x70($s2) /* 25994 8004A594 0801296D */ j .L8004A5B4 /* 25998 8004A598 AE400074 */ sw $zero, 0x74($s2) .L8004A59C: /* 2599C 8004A59C 8E220000 */ lw $v0, 0x0($s1) /* 259A0 8004A5A0 3C034000 */ lui $v1, (0x40000000 >> 16) /* 259A4 8004A5A4 00431024 */ and $v0, $v0, $v1 /* 259A8 8004A5A8 10400002 */ beqz $v0, .L8004A5B4 /* 259AC 8004A5AC 2402000C */ addiu $v0, $zero, 0xC /* 259B0 8004A5B0 AE420070 */ sw $v0, 0x70($s2) .L8004A5B4: /* 259B4 8004A5B4 3C05BFFF */ lui $a1, (0xBFFFFFFF >> 16) /* 259B8 8004A5B8 34A5FFFF */ ori $a1, $a1, (0xBFFFFFFF & 0xFFFF) /* 259BC 8004A5BC 2404FFFB */ addiu $a0, $zero, -0x5 /* 259C0 8004A5C0 8E2200B0 */ lw $v0, 0xB0($s1) /* 259C4 8004A5C4 8E230000 */ lw $v1, 0x0($s1) /* 259C8 8004A5C8 00441024 */ and $v0, $v0, $a0 /* 259CC 8004A5CC 00651824 */ and $v1, $v1, $a1 /* 259D0 8004A5D0 AE2200B0 */ sw $v0, 0xB0($s1) /* 259D4 8004A5D4 AE230000 */ sw $v1, 0x0($s1) .L8004A5D8: /* 259D8 8004A5D8 8E430070 */ lw $v1, 0x70($s2) /* 259DC 8004A5DC 2C620064 */ sltiu $v0, $v1, 0x64 /* 259E0 8004A5E0 10400038 */ beqz $v0, .L8004A6C4 /* 259E4 8004A5E4 00031080 */ sll $v0, $v1, 2 /* 259E8 8004A5E8 3C01800A */ lui $at, %hi(jtbl_80098728) /* 259EC 8004A5EC 00220821 */ addu $at, $at, $v0 /* 259F0 8004A5F0 8C228728 */ lw $v0, %lo(jtbl_80098728)($at) /* 259F4 8004A5F4 00400008 */ jr $v0 /* 259F8 8004A5F8 00000000 */ nop glabel .L8004A5FC /* 259FC 8004A5FC 0240202D */ daddu $a0, $s2, $zero /* 25A00 8004A600 0260282D */ daddu $a1, $s3, $zero /* 25A04 8004A604 0C012568 */ jal basic_ai_wander_init /* 25A08 8004A608 0280302D */ daddu $a2, $s4, $zero glabel .L8004A60C /* 25A0C 8004A60C 0240202D */ daddu $a0, $s2, $zero /* 25A10 8004A610 0260282D */ daddu $a1, $s3, $zero /* 25A14 8004A614 0C0125AE */ jal basic_ai_wander /* 25A18 8004A618 0280302D */ daddu $a2, $s4, $zero /* 25A1C 8004A61C 080129B1 */ j .L8004A6C4 /* 25A20 8004A620 00000000 */ nop glabel .L8004A624 /* 25A24 8004A624 0240202D */ daddu $a0, $s2, $zero /* 25A28 8004A628 0260282D */ daddu $a1, $s3, $zero /* 25A2C 8004A62C 0C0126D1 */ jal basic_ai_loiter_init /* 25A30 8004A630 0280302D */ daddu $a2, $s4, $zero glabel .L8004A634 /* 25A34 8004A634 0240202D */ daddu $a0, $s2, $zero /* 25A38 8004A638 0260282D */ daddu $a1, $s3, $zero /* 25A3C 8004A63C 0C012701 */ jal basic_ai_loiter /* 25A40 8004A640 0280302D */ daddu $a2, $s4, $zero /* 25A44 8004A644 080129B1 */ j .L8004A6C4 /* 25A48 8004A648 00000000 */ nop glabel .L8004A64C /* 25A4C 8004A64C 0240202D */ daddu $a0, $s2, $zero /* 25A50 8004A650 0260282D */ daddu $a1, $s3, $zero /* 25A54 8004A654 0C01278F */ jal basic_ai_found_player_jump_init /* 25A58 8004A658 0280302D */ daddu $a2, $s4, $zero glabel .L8004A65C /* 25A5C 8004A65C 0240202D */ daddu $a0, $s2, $zero /* 25A60 8004A660 0260282D */ daddu $a1, $s3, $zero /* 25A64 8004A664 0C0127B3 */ jal basic_ai_found_player_jump /* 25A68 8004A668 0280302D */ daddu $a2, $s4, $zero /* 25A6C 8004A66C 080129B1 */ j .L8004A6C4 /* 25A70 8004A670 00000000 */ nop glabel .L8004A674 /* 25A74 8004A674 0240202D */ daddu $a0, $s2, $zero /* 25A78 8004A678 0260282D */ daddu $a1, $s3, $zero /* 25A7C 8004A67C 0C0127DF */ jal basic_ai_chase_init /* 25A80 8004A680 0280302D */ daddu $a2, $s4, $zero glabel .L8004A684 /* 25A84 8004A684 0240202D */ daddu $a0, $s2, $zero /* 25A88 8004A688 0260282D */ daddu $a1, $s3, $zero /* 25A8C 8004A68C 0C012849 */ jal basic_ai_chase /* 25A90 8004A690 0280302D */ daddu $a2, $s4, $zero /* 25A94 8004A694 8E430070 */ lw $v1, 0x70($s2) /* 25A98 8004A698 2402000E */ addiu $v0, $zero, 0xE /* 25A9C 8004A69C 14620009 */ bne $v1, $v0, .L8004A6C4 /* 25AA0 8004A6A0 00000000 */ nop glabel .L8004A6A4 /* 25AA4 8004A6A4 0240202D */ daddu $a0, $s2, $zero /* 25AA8 8004A6A8 0260282D */ daddu $a1, $s3, $zero /* 25AAC 8004A6AC 0C0128FA */ jal basic_ai_lose_player /* 25AB0 8004A6B0 0280302D */ daddu $a2, $s4, $zero /* 25AB4 8004A6B4 080129B1 */ j .L8004A6C4 /* 25AB8 8004A6B8 00000000 */ nop glabel .L8004A6BC /* 25ABC 8004A6BC 0C0129CF */ jal basic_ai_suspend /* 25AC0 8004A6C0 0240202D */ daddu $a0, $s2, $zero glabel .L8004A6C4 /* 25AC4 8004A6C4 8FBF0048 */ lw $ra, 0x48($sp) /* 25AC8 8004A6C8 8FB50044 */ lw $s5, 0x44($sp) /* 25ACC 8004A6CC 8FB40040 */ lw $s4, 0x40($sp) /* 25AD0 8004A6D0 8FB3003C */ lw $s3, 0x3C($sp) /* 25AD4 8004A6D4 8FB20038 */ lw $s2, 0x38($sp) /* 25AD8 8004A6D8 8FB10034 */ lw $s1, 0x34($sp) /* 25ADC 8004A6DC 8FB00030 */ lw $s0, 0x30($sp) /* 25AE0 8004A6E0 0000102D */ daddu $v0, $zero, $zero /* 25AE4 8004A6E4 03E00008 */ jr $ra /* 25AE8 8004A6E8 27BD0050 */ addiu $sp, $sp, 0x50 /* 25AEC 8004A6EC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: ApiStatus BasicAI_Main(Evt* script, s32 isInitialCall) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); Bytecode* args = script->ptrReadPos; EnemyDetectVolume territory; EnemyDetectVolume* pTerritory = &territory; MobileAISettings* aiSettings = (MobileAISettings*) evt_get_variable(script, *args++); territory.skipPlayerDetectChance = 0; territory.shape = enemy->territory->wander.detectShape; territory.pointX = enemy->territory->wander.detectPos.x; territory.pointZ = enemy->territory->wander.detectPos.z; territory.sizeX = enemy->territory->wander.detectSize.x; territory.sizeZ = enemy->territory->wander.detectSize.z; territory.halfHeight = 65.0f; territory.detectFlags = 0; if (isInitialCall || enemy->aiFlags & ENEMY_AI_FLAG_SUSPEND) { script->AI_TEMP_STATE = AI_STATE_WANDER_INIT; npc->duration = 0; npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_IDLE]; npc->flags &= ~NPC_FLAG_JUMPING; if (!enemy->territory->wander.isFlying) { npc->flags |= NPC_FLAG_GRAVITY; npc->flags &= ~NPC_FLAG_8; } else { npc->flags &= ~NPC_FLAG_GRAVITY; npc->flags |= NPC_FLAG_8; } if (enemy->aiFlags & ENEMY_AI_FLAG_SUSPEND) { script->AI_TEMP_STATE = AI_STATE_SUSPEND; script->functionTemp[1] = AI_STATE_WANDER_INIT; } else if (enemy->flags & ENEMY_FLAG_BEGIN_WITH_CHASING) { script->AI_TEMP_STATE = AI_STATE_CHASE_INIT; } enemy->aiFlags &= ~ENEMY_AI_FLAG_SUSPEND; enemy->flags &= ~ENEMY_FLAG_BEGIN_WITH_CHASING; } switch (script->AI_TEMP_STATE) { case AI_STATE_WANDER_INIT: basic_ai_wander_init(script, aiSettings, pTerritory); case AI_STATE_WANDER: basic_ai_wander(script, aiSettings, pTerritory); break; case AI_STATE_LOITER_INIT: basic_ai_loiter_init(script, aiSettings, pTerritory); case AI_STATE_LOITER: basic_ai_loiter(script, aiSettings, pTerritory); break; case AI_STATE_ALERT_INIT: basic_ai_found_player_jump_init(script, aiSettings, pTerritory); case AI_STATE_ALERT: basic_ai_found_player_jump(script, aiSettings, pTerritory); break; case AI_STATE_CHASE_INIT: basic_ai_chase_init(script, aiSettings, pTerritory); case AI_STATE_CHASE: basic_ai_chase(script, aiSettings, pTerritory); if (script->AI_TEMP_STATE != AI_STATE_LOSE_PLAYER) { break; } case AI_STATE_LOSE_PLAYER: basic_ai_lose_player(script, aiSettings, pTerritory); break; case AI_STATE_SUSPEND: basic_ai_suspend(script); break; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802B7728 /* E20838 802B7728 27BDFFE0 */ addiu $sp, $sp, -0x20 /* E2083C 802B772C AFB00010 */ sw $s0, 0x10($sp) /* E20840 802B7730 241000FF */ addiu $s0, $zero, 0xFF /* E20844 802B7734 AFBF0018 */ sw $ra, 0x18($sp) /* E20848 802B7738 0C0ADD7A */ jal func_802B75E8 /* E2084C 802B773C AFB10014 */ sw $s1, 0x14($sp) /* E20850 802B7740 3C03802B */ lui $v1, %hi(D_802B7CB8) /* E20854 802B7744 24637CB8 */ addiu $v1, $v1, %lo(D_802B7CB8) /* E20858 802B7748 8C640000 */ lw $a0, 0x0($v1) /* E2085C 802B774C 3C118011 */ lui $s1, %hi(gPlayerStatus) /* E20860 802B7750 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) /* E20864 802B7754 90850023 */ lbu $a1, 0x23($a0) /* E20868 802B7758 24020001 */ addiu $v0, $zero, 0x1 /* E2086C 802B775C 10A20026 */ beq $a1, $v0, .L802B77F8 /* E20870 802B7760 28A20002 */ slti $v0, $a1, 0x2 /* E20874 802B7764 10400005 */ beqz $v0, .L802B777C /* E20878 802B7768 24020002 */ addiu $v0, $zero, 0x2 /* E2087C 802B776C 10A00009 */ beqz $a1, .L802B7794 /* E20880 802B7770 00000000 */ nop /* E20884 802B7774 080ADE4A */ j .L802B7928 /* E20888 802B7778 00000000 */ nop .L802B777C: /* E2088C 802B777C 10A20027 */ beq $a1, $v0, .L802B781C /* E20890 802B7780 24020003 */ addiu $v0, $zero, 0x3 /* E20894 802B7784 10A20033 */ beq $a1, $v0, .L802B7854 /* E20898 802B7788 00000000 */ nop /* E2089C 802B778C 080ADE4A */ j .L802B7928 /* E208A0 802B7790 00000000 */ nop .L802B7794: /* E208A4 802B7794 C4800010 */ lwc1 $f0, 0x10($a0) /* E208A8 802B7798 3C01802B */ lui $at, %hi(D_802B7D88) /* E208AC 802B779C D4227D88 */ ldc1 $f2, %lo(D_802B7D88)($at) /* E208B0 802B77A0 3C01802B */ lui $at, %hi(D_802B7D90) /* E208B4 802B77A4 D4247D90 */ ldc1 $f4, %lo(D_802B7D90)($at) /* E208B8 802B77A8 46000021 */ cvt.d.s $f0, $f0 /* E208BC 802B77AC 46220000 */ add.d $f0, $f0, $f2 /* E208C0 802B77B0 AC80000C */ sw $zero, 0xC($a0) /* E208C4 802B77B4 46200020 */ cvt.s.d $f0, $f0 /* E208C8 802B77B8 460000A1 */ cvt.d.s $f2, $f0 /* E208CC 802B77BC 4622203E */ c.le.d $f4, $f2 /* E208D0 802B77C0 00000000 */ nop /* E208D4 802B77C4 45000058 */ bc1f .L802B7928 /* E208D8 802B77C8 E4800010 */ swc1 $f0, 0x10($a0) /* E208DC 802B77CC 90820023 */ lbu $v0, 0x23($a0) /* E208E0 802B77D0 3C013F0C */ lui $at, (0x3F0CCCCD >> 16) /* E208E4 802B77D4 3421CCCD */ ori $at, $at, (0x3F0CCCCD & 0xFFFF) /* E208E8 802B77D8 44810000 */ mtc1 $at, $f0 /* E208EC 802B77DC 24420001 */ addiu $v0, $v0, 0x1 /* E208F0 802B77E0 E4800010 */ swc1 $f0, 0x10($a0) /* E208F4 802B77E4 A0820023 */ sb $v0, 0x23($a0) /* E208F8 802B77E8 8C630000 */ lw $v1, 0x0($v1) /* E208FC 802B77EC 2402000C */ addiu $v0, $zero, 0xC /* E20900 802B77F0 080ADE4A */ j .L802B7928 /* E20904 802B77F4 AC620014 */ sw $v0, 0x14($v1) .L802B77F8: /* E20908 802B77F8 8C820014 */ lw $v0, 0x14($a0) /* E2090C 802B77FC AC80000C */ sw $zero, 0xC($a0) /* E20910 802B7800 2442FFFF */ addiu $v0, $v0, -0x1 /* E20914 802B7804 1C400048 */ bgtz $v0, .L802B7928 /* E20918 802B7808 AC820014 */ sw $v0, 0x14($a0) /* E2091C 802B780C 90820023 */ lbu $v0, 0x23($a0) /* E20920 802B7810 24420001 */ addiu $v0, $v0, 0x1 /* E20924 802B7814 080ADE4A */ j .L802B7928 /* E20928 802B7818 A0820023 */ sb $v0, 0x23($a0) .L802B781C: /* E2092C 802B781C C48C000C */ lwc1 $f12, 0xC($a0) /* E20930 802B7820 3C014120 */ lui $at, (0x41200000 >> 16) /* E20934 802B7824 44810000 */ mtc1 $at, $f0 /* E20938 802B7828 00000000 */ nop /* E2093C 802B782C 46006300 */ add.s $f12, $f12, $f0 /* E20940 802B7830 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* E20944 802B7834 44810000 */ mtc1 $at, $f0 /* E20948 802B7838 00000000 */ nop /* E2094C 802B783C 460C003E */ c.le.s $f0, $f12 /* E20950 802B7840 00000000 */ nop /* E20954 802B7844 45030001 */ bc1tl .L802B784C /* E20958 802B7848 46006301 */ sub.s $f12, $f12, $f0 .L802B784C: /* E2095C 802B784C 080ADE47 */ j .L802B791C /* E20960 802B7850 E48C000C */ swc1 $f12, 0xC($a0) .L802B7854: /* E20964 802B7854 C48C000C */ lwc1 $f12, 0xC($a0) /* E20968 802B7858 3C0141C8 */ lui $at, (0x41C80000 >> 16) /* E2096C 802B785C 44810000 */ mtc1 $at, $f0 /* E20970 802B7860 00000000 */ nop /* E20974 802B7864 46006300 */ add.s $f12, $f12, $f0 /* E20978 802B7868 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* E2097C 802B786C 44810000 */ mtc1 $at, $f0 /* E20980 802B7870 00000000 */ nop /* E20984 802B7874 460C003E */ c.le.s $f0, $f12 /* E20988 802B7878 00000000 */ nop /* E2098C 802B787C 45030001 */ bc1tl .L802B7884 /* E20990 802B7880 46006301 */ sub.s $f12, $f12, $f0 .L802B7884: /* E20994 802B7884 8C82001C */ lw $v0, 0x1C($a0) /* E20998 802B7888 E48C000C */ swc1 $f12, 0xC($a0) /* E2099C 802B788C 2442FFE7 */ addiu $v0, $v0, -0x19 /* E209A0 802B7890 04410002 */ bgez $v0, .L802B789C /* E209A4 802B7894 AC82001C */ sw $v0, 0x1C($a0) /* E209A8 802B7898 AC80001C */ sw $zero, 0x1C($a0) .L802B789C: /* E209AC 802B789C 3C01428C */ lui $at, (0x428C0000 >> 16) /* E209B0 802B78A0 44810000 */ mtc1 $at, $f0 /* E209B4 802B78A4 00000000 */ nop /* E209B8 802B78A8 460C003E */ c.le.s $f0, $f12 /* E209BC 802B78AC 00000000 */ nop /* E209C0 802B78B0 45000008 */ bc1f .L802B78D4 /* E209C4 802B78B4 00000000 */ nop /* E209C8 802B78B8 3C0142DC */ lui $at, (0x42DC0000 >> 16) /* E209CC 802B78BC 44810000 */ mtc1 $at, $f0 /* E209D0 802B78C0 00000000 */ nop /* E209D4 802B78C4 4600603E */ c.le.s $f12, $f0 /* E209D8 802B78C8 00000000 */ nop /* E209DC 802B78CC 4501000F */ bc1t .L802B790C /* E209E0 802B78D0 00000000 */ nop .L802B78D4: /* E209E4 802B78D4 3C01437A */ lui $at, (0x437A0000 >> 16) /* E209E8 802B78D8 44810000 */ mtc1 $at, $f0 /* E209EC 802B78DC 00000000 */ nop /* E209F0 802B78E0 460C003E */ c.le.s $f0, $f12 /* E209F4 802B78E4 00000000 */ nop /* E209F8 802B78E8 4500000C */ bc1f .L802B791C /* E209FC 802B78EC 00000000 */ nop /* E20A00 802B78F0 3C014391 */ lui $at, (0x43910000 >> 16) /* E20A04 802B78F4 44810000 */ mtc1 $at, $f0 /* E20A08 802B78F8 00000000 */ nop /* E20A0C 802B78FC 4600603E */ c.le.s $f12, $f0 /* E20A10 802B7900 00000000 */ nop /* E20A14 802B7904 45000005 */ bc1f .L802B791C /* E20A18 802B7908 00000000 */ nop .L802B790C: /* E20A1C 802B790C 3C02802B */ lui $v0, %hi(func_802B79C8) D_802B7910: /* E20A20 802B7910 244279C8 */ addiu $v0, $v0, %lo(func_802B79C8) /* E20A24 802B7914 3C018011 */ lui $at, %hi(InteractNotificationCallback) /* E20A28 802B7918 AC22C958 */ sw $v0, %lo(InteractNotificationCallback)($at) .L802B791C: /* E20A2C 802B791C 0C0ADC00 */ jal appendGfx_ispy_icon /* E20A30 802B7920 00000000 */ nop /* E20A34 802B7924 0040802D */ daddu $s0, $v0, $zero .L802B7928: /* E20A38 802B7928 3C02802B */ lui $v0, %hi(D_802B7CB8) /* E20A3C 802B792C 8C427CB8 */ lw $v0, %lo(D_802B7CB8)($v0) D_802B7930: /* E20A40 802B7930 A0500024 */ sb $s0, 0x24($v0) /* E20A44 802B7934 0C0ADD14 */ jal should_continue_inspect /* E20A48 802B7938 823000B4 */ lb $s0, 0xB4($s1) /* E20A4C 802B793C 1040000A */ beqz $v0, .L802B7968 /* E20A50 802B7940 00000000 */ nop /* E20A54 802B7944 82220015 */ lb $v0, 0x15($s1) /* E20A58 802B7948 14400007 */ bnez $v0, .L802B7968 /* E20A5C 802B794C 00000000 */ nop /* E20A60 802B7950 8E220000 */ lw $v0, 0x0($s1) /* E20A64 802B7954 30420020 */ andi $v0, $v0, 0x20 /* E20A68 802B7958 14400003 */ bnez $v0, .L802B7968 /* E20A6C 802B795C 2E020003 */ sltiu $v0, $s0, 0x3 /* E20A70 802B7960 14400005 */ bnez $v0, .L802B7978 /* E20A74 802B7964 00000000 */ nop .L802B7968: /* E20A78 802B7968 3C03802B */ lui $v1, %hi(D_802B7CB8) /* E20A7C 802B796C 8C637CB8 */ lw $v1, %lo(D_802B7CB8)($v1) /* E20A80 802B7970 24020003 */ addiu $v0, $zero, 0x3 /* E20A84 802B7974 A0620023 */ sb $v0, 0x23($v1) .L802B7978: /* E20A88 802B7978 862400C6 */ lh $a0, 0xC6($s1) /* E20A8C 802B797C 962200C6 */ lhu $v0, 0xC6($s1) /* E20A90 802B7980 0480000C */ bltz $a0, .L802B79B4 /* E20A94 802B7984 30424000 */ andi $v0, $v0, 0x4000 /* E20A98 802B7988 1040000A */ beqz $v0, .L802B79B4 /* E20A9C 802B798C 00000000 */ nop /* E20AA0 802B7990 0C04417A */ jal get_entity_by_index /* E20AA4 802B7994 00000000 */ nop /* E20AA8 802B7998 8C420000 */ lw $v0, 0x0($v0) /* E20AAC 802B799C 30421000 */ andi $v0, $v0, 0x1000 /* E20AB0 802B79A0 14400004 */ bnez $v0, .L802B79B4 /* E20AB4 802B79A4 24020003 */ addiu $v0, $zero, 0x3 D_802B79A8: /* E20AB8 802B79A8 3C03802B */ lui $v1, %hi(D_802B7CB8) /* E20ABC 802B79AC 8C637CB8 */ lw $v1, %lo(D_802B7CB8)($v1) D_802B79B0: /* E20AC0 802B79B0 A0620023 */ sb $v0, 0x23($v1) .L802B79B4: /* E20AC4 802B79B4 8FBF0018 */ lw $ra, 0x18($sp) D_802B79B8: /* E20AC8 802B79B8 8FB10014 */ lw $s1, 0x14($sp) /* E20ACC 802B79BC 8FB00010 */ lw $s0, 0x10($sp) D_802B79C0: /* E20AD0 802B79C0 03E00008 */ jr $ra /* E20AD4 802B79C4 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void interact_inspect_update(void) { PlayerStatus* playerStatus = &gPlayerStatus; s32 brightness = 255; f32 angle; s32 actionState; update_inspect_icon_pos(); switch (InspectIconPtr->state) { case INSPECT_ICON_APPEAR: InspectIconPtr->yaw = 0.0f; InspectIconPtr->scale += 0.05; if (InspectIconPtr->scale >= 0.55) { InspectIconPtr->scale = 0.55f; InspectIconPtr->state++; InspectIconPtr->holdTime = 12; } break; case INSPECT_ICON_HOLD: InspectIconPtr->yaw = 0.0f; InspectIconPtr->holdTime--; if (InspectIconPtr->holdTime <= 0) { InspectIconPtr->state++; } break; case INSPECT_ICON_IDLE: angle = InspectIconPtr->yaw; angle += 10.0f; if (angle >= 360.0f) { angle -= 360.0f; } InspectIconPtr->yaw = angle; brightness = N(GetIconBrightnessForAngle)(angle); break; case INSPECT_ICON_VANISH: angle = InspectIconPtr->yaw; angle += 25.0f; if (angle >= 360.0f) { angle -= 360.0f; } InspectIconPtr->yaw = angle; InspectIconPtr->alpha -= 25; if (InspectIconPtr->alpha < 0) { InspectIconPtr->alpha = 0; } if ((angle >= 70.0f && angle <= 110.0f) || (angle >= 250.0f && angle <= 290.0f)) { // only dimiss when the icon is rotated away from view InteractNotificationCallback = interact_inspect_dismiss; } brightness = N(GetIconBrightnessForAngle)(angle); break; } InspectIconPtr->brightness = brightness; actionState = playerStatus->actionState; if (!should_continue_inspect() || (playerStatus->inputDisabledCount != 0) || (playerStatus->flags & PS_FLAG_PAUSED) || !(actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN) ) { InspectIconPtr->state = INSPECT_ICON_VANISH; } if ((playerStatus->interactingWithID >= 0) && (playerStatus->interactingWithID & COLLISION_WITH_ENTITY_BIT) && !(get_entity_by_index(playerStatus->interactingWithID)->flags & ENTITY_FLAG_SHOWS_INSPECT_PROMPT) ) { InspectIconPtr->state = INSPECT_ICON_VANISH; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel get_current_partner_id /* 7E538 800E5088 3C028011 */ lui $v0, %hi(gPlayerData + 0x12) /* 7E53C 800E508C 8042F2A2 */ lb $v0, %lo(gPlayerData + 0x12)($v0) /* 7E540 800E5090 03E00008 */ jr $ra /* 7E544 800E5094 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: if (get_current_partner_id() == PARTNER_BOW) { playerStatus->position.x += playerStatus->pushVelocity.x; playerStatus->position.y += playerStatus->pushVelocity.y; playerStatus->position.z += playerStatus->pushVelocity.z; if (playerStatus->pushVelocity.x != 0.0f || playerStatus->pushVelocity.y != 0.0f || playerStatus->pushVelocity.z != 0.0f) { gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x; gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y; gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z; if (playerStatus->alpha1 != 128) { collision_check_player_intersecting_world(0, 0, atan2(0.0f, 0.0f, playerStatus->pushVelocity.x, playerStatus->pushVelocity.z)); } } } break; case ACTION_STATE_SPIN_POUND: case ACTION_STATE_TORNADO_POUND: playerStatus->position.x += playerStatus->pushVelocity.x; playerStatus->position.y += playerStatus->pushVelocity.y; playerStatus->position.z += playerStatus->pushVelocity.z; if (playerStatus->pushVelocity.x != 0.0f || playerStatus->pushVelocity.y != 0.0f || playerStatus->pushVelocity.z != 0.0f) { gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x; gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y; gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z; } if (playerStatus->pushVelocity.x != 0.0f || playerStatus->pushVelocity.y != 0.0f || playerStatus->pushVelocity.z != 0.0f) { collision_check_player_intersecting_world(0, 0, playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw); } break; case ACTION_STATE_HAMMER: playerStatus->position.x += playerStatus->pushVelocity.x; playerStatus->position.y += playerStatus->pushVelocity.y; playerStatus->position.z += playerStatus->pushVelocity.z; if (playerStatus->pushVelocity.x != 0.0f || playerStatus->pushVelocity.y != 0.0f || playerStatus->pushVelocity.z != 0.0f) { gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x; gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y; gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z; } playerX = playerStatus->position.x; playerY = playerStatus->position.y; playerZ = playerStatus->position.z; if (playerStatus->currentSpeed != 0.0f) { yaw = playerStatus->targetYaw; } else { yaw = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw; } collisionStatus->currentWall = player_test_move_with_slipping(playerStatus, &playerX, &playerY, &playerZ, playerStatus->colliderDiameter * 0.5f, yaw); if (playerStatus->pushVelocity.x != 0.0f || playerStatus->pushVelocity.y != 0.0f || playerStatus->pushVelocity.z != 0.0f) { collision_check_player_intersecting_world(0, 0, playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw); } break; default: if (!(playerStatus->flags & PS_FLAG_FLYING)) { f32 new_var; speed = 0.0f; if (!(playerStatus->flags & (PS_FLAG_SCRIPTED_FALL | PS_FLAG_INPUT_DISABLED))) { player_input_to_move_vector(&yaw, &speed); if (!(playerStatus->animFlags & PA_FLAG_SPINNING)) { speed *= 0.03125f; if (!(playerStatus->flags & (PS_FLAG_FALLING | PS_FLAG_JUMPING))) { speed *= 0.25; } if (playerStatus->actionState == ACTION_STATE_LAUNCH) { speed *= 1.5; } if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) { speed *= 0.5f; } } sin_cos_rad(DEG_TO_RAD(yaw), &sinTheta, &cosTheta); if (playerStatus->actionState == ACTION_STATE_PUSHING_BLOCK) { if (fabsf(sinTheta) > fabsf(cosTheta)) { xBump = speed * sinTheta; zBump = 0.0f; } else { xBump = 0.0f; zBump = -speed * cosTheta; } } else if (!(playerStatus->animFlags & PA_FLAG_SPINNING)) { xBump = speed * sinTheta; zBump = -speed * cosTheta; } else { xBump = 0.0f; zBump = 0.0f; } sin_cos_rad(DEG_TO_RAD(playerStatus->targetYaw), &sinTheta, &cosTheta); speed = playerStatus->currentSpeed; if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) { speed *= 0.5f; } playerX = xBump + (speed * sinTheta); playerZ = zBump - (speed * cosTheta); yaw = atan2(0.0f, 0.0f, playerX, playerZ); speed = sqrtf(SQ(playerX) + SQ(playerZ)); if (playerStatus->flags & (PS_FLAG_FALLING | PS_FLAG_JUMPING)) { if (speed > playerStatus->runSpeed) { speed = playerStatus->runSpeed; } } } playerStatus->position.x += playerStatus->pushVelocity.x; playerStatus->position.z += playerStatus->pushVelocity.z; if (playerStatus->timeInAir == 0) { playerStatus->position.y += playerStatus->pushVelocity.y; } if ( playerStatus->pushVelocity.x != 0.0f || playerStatus->pushVelocity.y != 0.0f || playerStatus->pushVelocity.z != 0.0f) { gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x; gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y; gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z; } playerX = playerStatus->position.x; playerY = playerStatus->position.y; playerZ = playerStatus->position.z; result = player_test_move_with_slipping(playerStatus, &playerX, &playerY, &playerZ, playerStatus->colliderDiameter * 0.5f, playerStatus->targetYaw); if (speed == 0.0f && result < 0) { yaw2 = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw; sin_cos_rad(DEG_TO_RAD(yaw2 + 180.0f), &sinTheta, &cosTheta); playerX = playerStatus->position.x + (sinTheta * playerStatus->colliderDiameter * 0.5f); playerY = playerStatus->position.y; playerZ = playerStatus->position.z - (cosTheta * playerStatus->colliderDiameter * 0.5f); result = player_test_move_with_slipping(playerStatus, &playerX, &playerY, &playerZ, playerStatus->colliderDiameter, yaw2); } collisionStatus->currentWall = result; if (!(playerStatus->flags & PS_FLAG_MOVEMENT_LOCKED) && playerStatus->actionState != ACTION_STATE_HAMMER) { if (speed == 0.0f) { collision_check_player_intersecting_world(0, 0, playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw); break; } playerX = playerStatus->position.x; playerZ = playerStatus->position.z; playerY = playerStatus->position.y; yaw2 = yaw; if (speed > 4.0f) { result = player_test_move_with_slipping(playerStatus, &playerX, &playerY, &playerZ, 4.0f, yaw2); if (result < 0) { result = player_test_move_with_slipping(playerStatus, &playerX, &playerY, &playerZ, speed - 4.0f, yaw2); } collisionStatus->pushingAgainstWall = result; } else { collisionStatus->pushingAgainstWall = player_test_move_with_slipping(playerStatus, &playerX, &playerY, &playerZ, speed, yaw2); } test1X = playerX; test1Y = playerY; test1Z = playerZ; yaw = clamp_angle(yaw2 - 35.0); test1 = player_test_lateral_overlap(0, playerStatus, &test1X, &test1Y, &test1Z, 0.0f, yaw); test2X = playerX; test2Z = playerY; test2Y = playerZ; yaw = clamp_angle(yaw2 + 35.0); test2 = player_test_lateral_overlap(0, playerStatus, &test2X, &test2Z, &test2Y, 0.0f, yaw); if (test1 < 0) { if (test2 < 0) { playerStatus->position.x = playerX; playerStatus->position.z = playerZ; } else { playerStatus->position.x = test1X; playerStatus->position.z = test1Z; } } else if (test2 < 0) { playerStatus->position.x = test2X; playerStatus->position.z = test2Y; } if (playerStatus->enableCollisionOverlapsCheck == 0) { if (playerStatus->animFlags & PA_FLAG_SPINNING) { yaw2 = playerStatus->targetYaw; } else { yaw2 = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw; } if (collision_check_player_intersecting_world(0, 0, yaw2) < 0) { collision_check_player_intersecting_world(1, playerStatus->colliderHeight * 0.75f, yaw2); } } } } break; case ACTION_STATE_LANDING_ON_SWITCH: case ACTION_STATE_LAND: case ACTION_STATE_STEP_DOWN_LAND: case ACTION_STATE_TORNADO_JUMP: case ACTION_STATE_SLIDING: case ACTION_STATE_HIT_FIRE: case ACTION_STATE_HIT_LAVA: case ACTION_STATE_USE_SNEAKY_PARASOL: case ACTION_STATE_USE_SPRING: break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel IdleRunToGoal /* 1A8B44 8027A264 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 1A8B48 8027A268 AFB20020 */ sw $s2, 0x20($sp) /* 1A8B4C 8027A26C 0080902D */ daddu $s2, $a0, $zero /* 1A8B50 8027A270 AFBF0024 */ sw $ra, 0x24($sp) /* 1A8B54 8027A274 AFB1001C */ sw $s1, 0x1C($sp) /* 1A8B58 8027A278 AFB00018 */ sw $s0, 0x18($sp) /* 1A8B5C 8027A27C F7BA0040 */ sdc1 $f26, 0x40($sp) /* 1A8B60 8027A280 F7B80038 */ sdc1 $f24, 0x38($sp) /* 1A8B64 8027A284 F7B60030 */ sdc1 $f22, 0x30($sp) /* 1A8B68 8027A288 F7B40028 */ sdc1 $f20, 0x28($sp) /* 1A8B6C 8027A28C 8E51000C */ lw $s1, 0xC($s2) /* 1A8B70 8027A290 54A00001 */ bnel $a1, $zero, .L8027A298 /* 1A8B74 8027A294 AE400070 */ sw $zero, 0x70($s2) .L8027A298: /* 1A8B78 8027A298 8E420070 */ lw $v0, 0x70($s2) /* 1A8B7C 8027A29C 14400055 */ bnez $v0, .L8027A3F4 /* 1A8B80 8027A2A0 00000000 */ nop /* 1A8B84 8027A2A4 8E250000 */ lw $a1, 0x0($s1) /* 1A8B88 8027A2A8 26310004 */ addiu $s1, $s1, 0x4 /* 1A8B8C 8027A2AC 0C0B1EAF */ jal evt_get_variable /* 1A8B90 8027A2B0 0240202D */ daddu $a0, $s2, $zero /* 1A8B94 8027A2B4 0040202D */ daddu $a0, $v0, $zero /* 1A8B98 8027A2B8 2402FF81 */ addiu $v0, $zero, -0x7F /* 1A8B9C 8027A2BC 14820002 */ bne $a0, $v0, .L8027A2C8 /* 1A8BA0 8027A2C0 00000000 */ nop /* 1A8BA4 8027A2C4 8E440148 */ lw $a0, 0x148($s2) .L8027A2C8: /* 1A8BA8 8027A2C8 0C09A75B */ jal get_actor /* 1A8BAC 8027A2CC 00000000 */ nop /* 1A8BB0 8027A2D0 0040802D */ daddu $s0, $v0, $zero /* 1A8BB4 8027A2D4 AE500074 */ sw $s0, 0x74($s2) /* 1A8BB8 8027A2D8 8E250000 */ lw $a1, 0x0($s1) /* 1A8BBC 8027A2DC 0C0B1EAF */ jal evt_get_variable /* 1A8BC0 8027A2E0 0240202D */ daddu $a0, $s2, $zero /* 1A8BC4 8027A2E4 C61600D4 */ lwc1 $f22, 0xD4($s0) /* 1A8BC8 8027A2E8 C61800DC */ lwc1 $f24, 0xDC($s0) /* 1A8BCC 8027A2EC C6000144 */ lwc1 $f0, 0x144($s0) /* 1A8BD0 8027A2F0 C614014C */ lwc1 $f20, 0x14C($s0) /* 1A8BD4 8027A2F4 C60200D8 */ lwc1 $f2, 0xD8($s0) /* 1A8BD8 8027A2F8 4406B000 */ mfc1 $a2, $f22 /* 1A8BDC 8027A2FC 4407C000 */ mfc1 $a3, $f24 /* 1A8BE0 8027A300 261100C8 */ addiu $s1, $s0, 0xC8 /* 1A8BE4 8027A304 A6020120 */ sh $v0, 0x120($s0) /* 1A8BE8 8027A308 E60000C8 */ swc1 $f0, 0xC8($s0) /* 1A8BEC 8027A30C C6000148 */ lwc1 $f0, 0x148($s0) /* 1A8BF0 8027A310 C61A00C8 */ lwc1 $f26, 0xC8($s0) /* 1A8BF4 8027A314 4600A386 */ mov.s $f14, $f20 /* 1A8BF8 8027A318 E61400D0 */ swc1 $f20, 0xD0($s0) /* 1A8BFC 8027A31C E61600E0 */ swc1 $f22, 0xE0($s0) /* 1A8C00 8027A320 E60200E4 */ swc1 $f2, 0xE4($s0) /* 1A8C04 8027A324 E61800E8 */ swc1 $f24, 0xE8($s0) /* 1A8C08 8027A328 4600D306 */ mov.s $f12, $f26 /* 1A8C0C 8027A32C 0C00A720 */ jal atan2 /* 1A8C10 8027A330 E60000CC */ swc1 $f0, 0xCC($s0) /* 1A8C14 8027A334 4600D306 */ mov.s $f12, $f26 /* 1A8C18 8027A338 4406B000 */ mfc1 $a2, $f22 /* 1A8C1C 8027A33C 4407C000 */ mfc1 $a3, $f24 /* 1A8C20 8027A340 4600A386 */ mov.s $f14, $f20 /* 1A8C24 8027A344 0C00A7B5 */ jal dist2D /* 1A8C28 8027A348 E6000110 */ swc1 $f0, 0x110($s0) /* 1A8C2C 8027A34C 86020120 */ lh $v0, 0x120($s0) /* 1A8C30 8027A350 46000086 */ mov.s $f2, $f0 /* 1A8C34 8027A354 14400018 */ bnez $v0, .L8027A3B8 /* 1A8C38 8027A358 E6020114 */ swc1 $f2, 0x114($s0) /* 1A8C3C 8027A35C C6000108 */ lwc1 $f0, 0x108($s0) /* 1A8C40 8027A360 46001003 */ div.s $f0, $f2, $f0 /* 1A8C44 8027A364 4600020D */ trunc.w.s $f8, $f0 /* 1A8C48 8027A368 44024000 */ mfc1 $v0, $f8 /* 1A8C4C 8027A36C 00000000 */ nop /* 1A8C50 8027A370 A6020120 */ sh $v0, 0x120($s0) /* 1A8C54 8027A374 00021400 */ sll $v0, $v0, 16 /* 1A8C58 8027A378 14400002 */ bnez $v0, .L8027A384 /* 1A8C5C 8027A37C 24020001 */ addiu $v0, $zero, 0x1 /* 1A8C60 8027A380 A6020120 */ sh $v0, 0x120($s0) .L8027A384: /* 1A8C64 8027A384 86020120 */ lh $v0, 0x120($s0) /* 1A8C68 8027A388 C6020108 */ lwc1 $f2, 0x108($s0) /* 1A8C6C 8027A38C 44823000 */ mtc1 $v0, $f6 /* 1A8C70 8027A390 00000000 */ nop /* 1A8C74 8027A394 468031A0 */ cvt.s.w $f6, $f6 /* 1A8C78 8027A398 46023102 */ mul.s $f4, $f6, $f2 /* 1A8C7C 8027A39C 00000000 */ nop /* 1A8C80 8027A3A0 C6000114 */ lwc1 $f0, 0x114($s0) /* 1A8C84 8027A3A4 46040001 */ sub.s $f0, $f0, $f4 /* 1A8C88 8027A3A8 46060003 */ div.s $f0, $f0, $f6 /* 1A8C8C 8027A3AC 46001080 */ add.s $f2, $f2, $f0 /* 1A8C90 8027A3B0 0809E8F3 */ j .L8027A3CC /* 1A8C94 8027A3B4 E6020108 */ swc1 $f2, 0x108($s0) .L8027A3B8: /* 1A8C98 8027A3B8 44820000 */ mtc1 $v0, $f0 /* 1A8C9C 8027A3BC 00000000 */ nop /* 1A8CA0 8027A3C0 46800020 */ cvt.s.w $f0, $f0 /* 1A8CA4 8027A3C4 46001003 */ div.s $f0, $f2, $f0 /* 1A8CA8 8027A3C8 E6000108 */ swc1 $f0, 0x108($s0) .L8027A3CC: /* 1A8CAC 8027A3CC 860201B4 */ lh $v0, 0x1B4($s0) /* 1A8CB0 8027A3D0 04420002 */ bltzl $v0, .L8027A3DC /* 1A8CB4 8027A3D4 00021027 */ nor $v0, $zero, $v0 /* 1A8CB8 8027A3D8 24420001 */ addiu $v0, $v0, 0x1 .L8027A3DC: /* 1A8CBC 8027A3DC 44820000 */ mtc1 $v0, $f0 /* 1A8CC0 8027A3E0 00000000 */ nop /* 1A8CC4 8027A3E4 46800020 */ cvt.s.w $f0, $f0 /* 1A8CC8 8027A3E8 E620004C */ swc1 $f0, 0x4C($s1) /* 1A8CCC 8027A3EC 24020001 */ addiu $v0, $zero, 0x1 /* 1A8CD0 8027A3F0 AE420070 */ sw $v0, 0x70($s2) .L8027A3F4: /* 1A8CD4 8027A3F4 8E500074 */ lw $s0, 0x74($s2) /* 1A8CD8 8027A3F8 261100C8 */ addiu $s1, $s0, 0xC8 /* 1A8CDC 8027A3FC 8E050108 */ lw $a1, 0x108($s0) /* 1A8CE0 8027A400 8E060110 */ lw $a2, 0x110($s0) /* 1A8CE4 8027A404 0C099096 */ jal add_xz_vec3f_copy2 /* 1A8CE8 8027A408 0220202D */ daddu $a0, $s1, $zero /* 1A8CEC 8027A40C C6020108 */ lwc1 $f2, 0x108($s0) /* 1A8CF0 8027A410 3C014080 */ lui $at, (0x40800000 >> 16) /* 1A8CF4 8027A414 44810000 */ mtc1 $at, $f0 /* 1A8CF8 8027A418 00000000 */ nop /* 1A8CFC 8027A41C 4600103C */ c.lt.s $f2, $f0 /* 1A8D00 8027A420 00000000 */ nop /* 1A8D04 8027A424 45000007 */ bc1f .L8027A444 /* 1A8D08 8027A428 0000202D */ daddu $a0, $zero, $zero /* 1A8D0C 8027A42C C6000110 */ lwc1 $f0, 0x110($s0) /* 1A8D10 8027A430 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A8D14 8027A434 8E0500C8 */ lw $a1, 0xC8($s0) /* 1A8D18 8027A438 8E0600CC */ lw $a2, 0xCC($s0) /* 1A8D1C 8027A43C 0809E917 */ j .L8027A45C /* 1A8D20 8027A440 8E0700D0 */ lw $a3, 0xD0($s0) .L8027A444: /* 1A8D24 8027A444 C6000110 */ lwc1 $f0, 0x110($s0) /* 1A8D28 8027A448 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A8D2C 8027A44C 8E0500C8 */ lw $a1, 0xC8($s0) /* 1A8D30 8027A450 8E0600CC */ lw $a2, 0xCC($s0) /* 1A8D34 8027A454 8E0700D0 */ lw $a3, 0xD0($s0) /* 1A8D38 8027A458 24040001 */ addiu $a0, $zero, 0x1 .L8027A45C: /* 1A8D3C 8027A45C 0C0990BC */ jal play_movement_dust_effects /* 1A8D40 8027A460 00000000 */ nop /* 1A8D44 8027A464 C6200000 */ lwc1 $f0, 0x0($s1) /* 1A8D48 8027A468 E6000144 */ swc1 $f0, 0x144($s0) /* 1A8D4C 8027A46C C6200008 */ lwc1 $f0, 0x8($s1) /* 1A8D50 8027A470 E600014C */ swc1 $f0, 0x14C($s0) /* 1A8D54 8027A474 96220058 */ lhu $v0, 0x58($s1) /* 1A8D58 8027A478 2442FFFF */ addiu $v0, $v0, -0x1 /* 1A8D5C 8027A47C A6220058 */ sh $v0, 0x58($s1) /* 1A8D60 8027A480 00021400 */ sll $v0, $v0, 16 /* 1A8D64 8027A484 1C40000D */ bgtz $v0, .L8027A4BC /* 1A8D68 8027A488 0000102D */ daddu $v0, $zero, $zero /* 1A8D6C 8027A48C C6200018 */ lwc1 $f0, 0x18($s1) /* 1A8D70 8027A490 8E04019C */ lw $a0, 0x19C($s0) /* 1A8D74 8027A494 E6000144 */ swc1 $f0, 0x144($s0) /* 1A8D78 8027A498 C6200020 */ lwc1 $f0, 0x20($s1) /* 1A8D7C 8027A49C 10800006 */ beqz $a0, .L8027A4B8 /* 1A8D80 8027A4A0 E600014C */ swc1 $f0, 0x14C($s0) /* 1A8D84 8027A4A4 8E0201A0 */ lw $v0, 0x1A0($s0) /* 1A8D88 8027A4A8 14400004 */ bnez $v0, .L8027A4BC /* 1A8D8C 8027A4AC 24020001 */ addiu $v0, $zero, 0x1 /* 1A8D90 8027A4B0 0C0154F0 */ jal snd_stop_sound /* 1A8D94 8027A4B4 00000000 */ nop .L8027A4B8: /* 1A8D98 8027A4B8 24020001 */ addiu $v0, $zero, 0x1 .L8027A4BC: /* 1A8D9C 8027A4BC 8FBF0024 */ lw $ra, 0x24($sp) /* 1A8DA0 8027A4C0 8FB20020 */ lw $s2, 0x20($sp) /* 1A8DA4 8027A4C4 8FB1001C */ lw $s1, 0x1C($sp) /* 1A8DA8 8027A4C8 8FB00018 */ lw $s0, 0x18($sp) /* 1A8DAC 8027A4CC D7BA0040 */ ldc1 $f26, 0x40($sp) /* 1A8DB0 8027A4D0 D7B80038 */ ldc1 $f24, 0x38($sp) /* 1A8DB4 8027A4D4 D7B60030 */ ldc1 $f22, 0x30($sp) /* 1A8DB8 8027A4D8 D7B40028 */ ldc1 $f20, 0x28($sp) /* 1A8DBC 8027A4DC 03E00008 */ jr $ra /* 1A8DC0 8027A4E0 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: ApiStatus IdleRunToGoal(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor; ActorMovement* movement; f32 posX, posY, posZ; f32 goalX, goalY, goalZ; s32 actorID; if (isInitialCall) { script->functionTemp[0] = FALSE; } if (!script->functionTemp[0]) { actorID = evt_get_variable(script, *args++); if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } script->functionTempPtr[1] = actor = get_actor(actorID); movement = &actor->fly; movement->flyTime = evt_get_variable(script, *args++); movement->currentPos.x = actor->currentPos.x; movement->currentPos.y = actor->currentPos.y; movement->currentPos.z = actor->currentPos.z; goalX = movement->goalPos.x; goalY = movement->goalPos.y; goalZ = movement->goalPos.z; posX = movement->currentPos.x; posY = movement->currentPos.y; posZ = movement->currentPos.z; movement->unk_18.x = goalX; movement->unk_18.y = goalY; movement->unk_18.z = goalZ; movement->angle = atan2(posX, posZ, goalX, goalZ); movement->distance = dist2D(posX, posZ, goalX, goalZ); if (movement->flyTime == 0) { movement->flyTime = movement->distance / movement->speed; if (movement->flyTime == 0) { movement->flyTime = 1; } // this simplifies to: flyMotion->speed = flyMotion->distance / flyMotion->flyTime movement->speed += (movement->distance - movement->flyTime * movement->speed) / movement->flyTime; } else { movement->speed = movement->distance / movement->flyTime; } if (actor->actorTypeData1b[0] >= 0) { movement->distance = actor->actorTypeData1b[0] + 1; } else { movement->distance = ~actor->actorTypeData1b[0]; } script->functionTemp[0] = TRUE; } actor = script->functionTempPtr[1]; movement = &actor->fly; add_xz_vec3f_copy2(&movement->currentPos, movement->speed, movement->angle); if (movement->speed < 4.0f) { play_movement_dust_effects(0, movement->currentPos.x, movement->currentPos.y, movement->currentPos.z, movement->angle); } else { play_movement_dust_effects(1, movement->currentPos.x, movement->currentPos.y, movement->currentPos.z, movement->angle); } actor->currentPos.x = movement->currentPos.x; actor->currentPos.z = movement->currentPos.z; movement->flyTime--; if (movement->flyTime > 0) { return ApiStatus_BLOCK; } actor->currentPos.x = movement->unk_18.x; actor->currentPos.z = movement->unk_18.z; if (actor->actorTypeData1[0] != 0 && actor->actorTypeData1[1] == 0) { snd_stop_sound(actor->actorTypeData1[0]); } return ApiStatus_DONE1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel action_hammer_play_hit_fx /* E24F18 802B6048 27BDFFA8 */ addiu $sp, $sp, -0x58 .L802B604C: /* E24F1C 802B604C AFB3002C */ sw $s3, 0x2C($sp) .L802B6050: /* E24F20 802B6050 AFB40030 */ sw $s4, 0x30($sp) /* E24F24 802B6054 3C148011 */ lui $s4, %hi(gPlayerStatus) .L802B6058: /* E24F28 802B6058 2694EFC8 */ addiu $s4, $s4, %lo(gPlayerStatus) /* E24F2C 802B605C 3C038011 */ lui $v1, %hi(gPlayerData + 0x1) glabel action_update_sliding /* E24F30 802B6060 8063F291 */ lb $v1, %lo(gPlayerData + 0x1)($v1) /* E24F34 802B6064 24020002 */ addiu $v0, $zero, 0x2 .L802B6068: /* E24F38 802B6068 AFBF0034 */ sw $ra, 0x34($sp) /* E24F3C 802B606C AFB20028 */ sw $s2, 0x28($sp) /* E24F40 802B6070 AFB10024 */ sw $s1, 0x24($sp) .L802B6074: /* E24F44 802B6074 AFB00020 */ sw $s0, 0x20($sp) /* E24F48 802B6078 F7BA0050 */ sdc1 $f26, 0x50($sp) glabel .L802B607C /* E24F4C 802B607C F7B80048 */ sdc1 $f24, 0x48($sp) .L802B6080: /* E24F50 802B6080 F7B60040 */ sdc1 $f22, 0x40($sp) /* E24F54 802B6084 F7B40038 */ sdc1 $f20, 0x38($sp) /* E24F58 802B6088 14620008 */ bne $v1, $v0, .L802B60AC .L802B608C: /* E24F5C 802B608C 0080982D */ daddu $s3, $a0, $zero .L802B6090: /* E24F60 802B6090 3C013F99 */ lui $at, (0x3F99999A >> 16) .L802B6094: /* E24F64 802B6094 3421999A */ ori $at, $at, (0x3F99999A & 0xFFFF) /* E24F68 802B6098 4481C000 */ mtc1 $at, $f24 glabel action_update_state_23 /* E24F6C 802B609C 24120001 */ addiu $s2, $zero, 0x1 /* E24F70 802B60A0 2411001C */ addiu $s1, $zero, 0x1C glabel action_update_use_spinning_flower /* E24F74 802B60A4 080AD83A */ j .L802B60E8 .L802B60A8: /* E24F78 802B60A8 2410211A */ addiu $s0, $zero, 0x211A .L802B60AC: /* E24F7C 802B60AC 24020001 */ addiu $v0, $zero, 0x1 /* E24F80 802B60B0 14620008 */ bne $v1, $v0, .L802B60D4 glabel action_update_jump /* E24F84 802B60B4 24120001 */ addiu $s2, $zero, 0x1 /* E24F88 802B60B8 3C013F4C */ lui $at, (0x3F4CCCCD >> 16) /* E24F8C 802B60BC 3421CCCD */ ori $at, $at, (0x3F4CCCCD & 0xFFFF) /* E24F90 802B60C0 4481C000 */ mtc1 $at, $f24 /* E24F94 802B60C4 0040902D */ daddu $s2, $v0, $zero .L802B60C8: /* E24F98 802B60C8 24110010 */ addiu $s1, $zero, 0x10 /* E24F9C 802B60CC 080AD83A */ j .L802B60E8 glabel .L802B60D0 /* E24FA0 802B60D0 24102119 */ addiu $s0, $zero, 0x2119 .L802B60D4: /* E24FA4 802B60D4 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) /* E24FA8 802B60D8 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) /* E24FAC 802B60DC 4481C000 */ mtc1 $at, $f24 /* E24FB0 802B60E0 24110004 */ addiu $s1, $zero, 0x4 /* E24FB4 802B60E4 24102118 */ addiu $s0, $zero, 0x2118 .L802B60E8: /* E24FB8 802B60E8 0C0394D2 */ jal func_800E5348 .L802B60EC: /* E24FBC 802B60EC 00000000 */ nop .L802B60F0: /* E24FC0 802B60F0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) glabel .L802B60F4 /* E24FC4 802B60F4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* E24FC8 802B60F8 44811000 */ mtc1 $at, $f2 /* E24FCC 802B60FC 00000000 */ nop .L802B6100: /* E24FD0 802B6100 46020502 */ mul.s $f20, $f0, $f2 .L802B6104: /* E24FD4 802B6104 00000000 */ nop .L802B6108: /* E24FD8 802B6108 3C0143B4 */ lui $at, (0x43B40000 >> 16) glabel .L802B610C /* E24FDC 802B610C 44810000 */ mtc1 $at, $f0 .L802B6110: /* E24FE0 802B6110 00000000 */ nop /* E24FE4 802B6114 4600A503 */ div.s $f20, $f20, $f0 .L802B6118: /* E24FE8 802B6118 0C00A85B */ jal sin_rad /* E24FEC 802B611C 4600A306 */ mov.s $f12, $f20 glabel action_update_parasol /* E24FF0 802B6120 3C0141C8 */ lui $at, (0x41C80000 >> 16) .L802B6124: /* E24FF4 802B6124 44811000 */ mtc1 $at, $f2 .L802B6128: /* E24FF8 802B6128 00000000 */ nop /* E24FFC 802B612C 46020582 */ mul.s $f22, $f0, $f2 /* E25000 802B6130 00000000 */ nop glabel .L802B6134 /* E25004 802B6134 0C00A874 */ jal cos_rad /* E25008 802B6138 4600A306 */ mov.s $f12, $f20 .L802B613C: /* E2500C 802B613C 3C01C1C8 */ lui $at, (0xC1C80000 >> 16) .L802B6140: /* E25010 802B6140 44811000 */ mtc1 $at, $f2 .L802B6144: /* E25014 802B6144 00000000 */ nop /* E25018 802B6148 46020082 */ mul.s $f2, $f0, $f2 .L802B614C: /* E2501C 802B614C 00000000 */ nop .L802B6150: /* E25020 802B6150 06610008 */ bgez $s3, .L802B6174 .L802B6154: /* E25024 802B6154 24130003 */ addiu $s3, $zero, 0x3 .L802B6158: /* E25028 802B6158 C6800028 */ lwc1 $f0, 0x28($s4) .L802B615C: /* E2502C 802B615C 24130006 */ addiu $s3, $zero, 0x6 /* E25030 802B6160 46160680 */ add.s $f26, $f0, $f22 .L802B6164: /* E25034 802B6164 C6800030 */ lwc1 $f0, 0x30($s4) .L802B6168: /* E25038 802B6168 C694002C */ lwc1 $f20, 0x2C($s4) /* E2503C 802B616C 080AD86D */ j .L802B61B4 glabel .L802B6170 /* E25040 802B6170 46020580 */ add.s $f22, $f0, $f2 glabel .L802B6174 /* E25044 802B6174 3C02802B */ lui $v0, %hi(HammerHit) /* E25048 802B6178 8C426DB0 */ lw $v0, %lo(HammerHit)($v0) .L802B617C: /* E2504C 802B617C C4400000 */ lwc1 $f0, 0x0($v0) .L802B6180: /* E25050 802B6180 46160680 */ add.s $f26, $f0, $f22 glabel .L802B6184 /* E25054 802B6184 C4400008 */ lwc1 $f0, 0x8($v0) .L802B6188: /* E25058 802B6188 868300B0 */ lh $v1, 0xB0($s4) .L802B618C: /* E2505C 802B618C 46020580 */ add.s $f22, $f0, $f2 .L802B6190: /* E25060 802B6190 C4420004 */ lwc1 $f2, 0x4($v0) .L802B6194: /* E25064 802B6194 44830000 */ mtc1 $v1, $f0 glabel func_802B6198 /* E25068 802B6198 00000000 */ nop /* E2506C 802B619C 46800020 */ cvt.s.w $f0, $f0 .L802B61A0: /* E25070 802B61A0 46001080 */ add.s $f2, $f2, $f0 .L802B61A4: /* E25074 802B61A4 3C0140A0 */ lui $at, (0x40A00000 >> 16) .L802B61A8: /* E25078 802B61A8 44810000 */ mtc1 $at, $f0 .L802B61AC: /* E2507C 802B61AC 24110001 */ addiu $s1, $zero, 0x1 .L802B61B0: /* E25080 802B61B0 46001501 */ sub.s $f20, $f2, $f0 .L802B61B4: /* E25084 802B61B4 0000202D */ daddu $a0, $zero, $zero /* E25088 802B61B8 24050002 */ addiu $a1, $zero, 0x2 /* E2508C 802B61BC 4407C000 */ mfc1 $a3, $f24 glabel func_802B61C0 /* E25090 802B61C0 0C0B2D72 */ jal exec_ShakeCamX /* E25094 802B61C4 0240302D */ daddu $a2, $s2, $zero .L802B61C8: /* E25098 802B61C8 0000202D */ daddu $a0, $zero, $zero .L802B61CC: /* E2509C 802B61CC 44910000 */ mtc1 $s1, $f0 /* E250A0 802B61D0 00000000 */ nop .L802B61D4: /* E250A4 802B61D4 46800020 */ cvt.s.w $f0, $f0 .L802B61D8: /* E250A8 802B61D8 26430003 */ addiu $v1, $s2, 0x3 .L802B61DC: /* E250AC 802B61DC 00031040 */ sll $v0, $v1, 1 /* E250B0 802B61E0 4405D000 */ mfc1 $a1, $f26 glabel func_802B61E4 /* E250B4 802B61E4 4406A000 */ mfc1 $a2, $f20 .L802B61E8: /* E250B8 802B61E8 4407B000 */ mfc1 $a3, $f22 .L802B61EC: /* E250BC 802B61EC 00431021 */ addu $v0, $v0, $v1 .L802B61F0: /* E250C0 802B61F0 E7A00010 */ swc1 $f0, 0x10($sp) .L802B61F4: /* E250C4 802B61F4 AFB30014 */ sw $s3, 0x14($sp) .L802B61F8: /* E250C8 802B61F8 AFA00018 */ sw $zero, 0x18($sp) .L802B61FC: /* E250CC 802B61FC 0C01C0DC */ jal fx_smoke_impact .L802B6200: /* E250D0 802B6200 AFA2001C */ sw $v0, 0x1C($sp) .L802B6204: /* E250D4 802B6204 0C03A752 */ jal is_ability_active glabel .L802B6208 /* E250D8 802B6208 2404000F */ addiu $a0, $zero, 0xF /* E250DC 802B620C 2443FFFF */ addiu $v1, $v0, -0x1 .L802B6210: /* E250E0 802B6210 2C620006 */ sltiu $v0, $v1, 0x6 .L802B6214: /* E250E4 802B6214 10400011 */ beqz $v0, .L802B625C glabel .L802B6218 /* E250E8 802B6218 00031080 */ sll $v0, $v1, 2 /* E250EC 802B621C 3C01802B */ lui $at, %hi(jtbl_802B6DF0) .L802B6220: /* E250F0 802B6220 00220821 */ addu $at, $at, $v0 .L802B6224: /* E250F4 802B6224 8C226DF0 */ lw $v0, %lo(jtbl_802B6DF0)($at) glabel .L802B6228 /* E250F8 802B6228 00400008 */ jr $v0 .L802B622C: /* E250FC 802B622C 00000000 */ nop glabel action_update_step_up_peach /* E25100 802B6230 080AD897 */ j .L802B625C /* E25104 802B6234 24100372 */ addiu $s0, $zero, 0x372 glabel .L802B6238 /* E25108 802B6238 080AD897 */ j .L802B625C glabel .L802B623C /* E2510C 802B623C 241000F1 */ addiu $s0, $zero, 0xF1 glabel .L802B6240 /* E25110 802B6240 080AD897 */ j .L802B625C glabel .L802B6244 /* E25114 802B6244 241000DC */ addiu $s0, $zero, 0xDC glabel .L802B6248 /* E25118 802B6248 080AD897 */ j .L802B625C /* E2511C 802B624C 24102072 */ addiu $s0, $zero, 0x2072 glabel .L802B6250 /* E25120 802B6250 080AD897 */ j .L802B625C .L802B6254: /* E25124 802B6254 24102073 */ addiu $s0, $zero, 0x2073 glabel .L802B6258 /* E25128 802B6258 2410205B */ addiu $s0, $zero, 0x205B .L802B625C: /* E2512C 802B625C 0200202D */ daddu $a0, $s0, $zero /* E25130 802B6260 0C052736 */ jal sfx_play_sound_at_player /* E25134 802B6264 0000282D */ daddu $a1, $zero, $zero .L802B6268: /* E25138 802B6268 24040100 */ addiu $a0, $zero, 0x100 .L802B626C: /* E2513C 802B626C 0C00A3C2 */ jal start_rumble /* E25140 802B6270 24050032 */ addiu $a1, $zero, 0x32 .L802B6274: /* E25144 802B6274 8FBF0034 */ lw $ra, 0x34($sp) glabel .L802B6278 /* E25148 802B6278 8FB40030 */ lw $s4, 0x30($sp) /* E2514C 802B627C 8FB3002C */ lw $s3, 0x2C($sp) .L802B6280: /* E25150 802B6280 8FB20028 */ lw $s2, 0x28($sp) .L802B6284: /* E25154 802B6284 8FB10024 */ lw $s1, 0x24($sp) glabel action_update_run /* E25158 802B6288 8FB00020 */ lw $s0, 0x20($sp) /* E2515C 802B628C D7BA0050 */ ldc1 $f26, 0x50($sp) .L802B6290: /* E25160 802B6290 D7B80048 */ ldc1 $f24, 0x48($sp) glabel func_802B6294 /* E25164 802B6294 D7B60040 */ ldc1 $f22, 0x40($sp) glabel .L802B6298 /* E25168 802B6298 D7B40038 */ ldc1 $f20, 0x38($sp) /* E2516C 802B629C 03E00008 */ jr $ra /* E25170 802B62A0 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void action_hammer_play_hit_fx(s32 hitID) { PlayerStatus* playerStatus = &gPlayerStatus; f32 shakeAmt; s32 time; s32 radius; s32 soundID; f32 theta, sinTheta, cosTheta; s32 numParticles; f32 x, y, z; if (gPlayerData.hammerLevel == 2) { shakeAmt = 1.2f; time = 1; radius = 28; soundID = SOUND_211A; } else if (gPlayerData.hammerLevel == 1) { shakeAmt = 0.8f; time = 1; radius = 16; soundID = SOUND_2119; } else { shakeAmt = 0.4f; time = 1; radius = 4; soundID = SOUND_2118; } theta = DEG_TO_RAD(func_800E5348()); sinTheta = sin_rad(theta) * 25.0f; cosTheta = cos_rad(theta) * -25.0f; if (hitID < 0) { numParticles = 6; x = playerStatus->position.x + sinTheta; y = playerStatus->position.y; z = playerStatus->position.z + cosTheta; } else { numParticles = 3; x = HammerHit->hitPos.x + sinTheta; y = HammerHit->hitPos.y + playerStatus->colliderHeight - 5.0f; z = HammerHit->hitPos.z + cosTheta; radius = 1; } exec_ShakeCamX(0, 2, time, shakeAmt); fx_smoke_impact(0, x, y, z, radius, numParticles, 0, (time + 3) * 3); switch (is_ability_active(ABILITY_ATTACK_FX)) { case 1: soundID = SOUND_372; break; case 2: soundID = SOUND_F1; break; case 3: soundID = SOUND_DC; break; case 4: soundID = SOUND_2072; break; case 5: soundID = SOUND_2073; break; case 6: soundID = SOUND_205B; break; } sfx_play_sound_at_player(soundID, SOUND_SPACE_MODE_0); start_rumble(256, 50); }
### RAW ASSEMBLY INSTRUCTIONS: glabel energy_shockwave_appendGfx /* 375224 E00723D4 27BDFF50 */ addiu $sp, $sp, -0xB0 /* 375228 E00723D8 3C03DB06 */ lui $v1, (0xDB060024 >> 16) /* 37522C E00723DC 34630024 */ ori $v1, $v1, (0xDB060024 & 0xFFFF) /* 375230 E00723E0 3C05FFB3 */ lui $a1, (0xFFB31E00 >> 16) /* 375234 E00723E4 AFB10094 */ sw $s1, 0x94($sp) /* 375238 E00723E8 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 37523C E00723EC 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 375240 E00723F0 34A51E00 */ ori $a1, $a1, (0xFFB31E00 & 0xFFFF) /* 375244 E00723F4 AFB500A4 */ sw $s5, 0xA4($sp) /* 375248 E00723F8 3C15E700 */ lui $s5, (0xE7000000 >> 16) /* 37524C E00723FC AFBF00A8 */ sw $ra, 0xA8($sp) /* 375250 E0072400 AFB400A0 */ sw $s4, 0xA0($sp) /* 375254 E0072404 AFB3009C */ sw $s3, 0x9C($sp) /* 375258 E0072408 AFB20098 */ sw $s2, 0x98($sp) /* 37525C E007240C AFB00090 */ sw $s0, 0x90($sp) /* 375260 E0072410 8E280000 */ lw $t0, 0x0($s1) /* 375264 E0072414 3C014080 */ lui $at, (0x40800000 >> 16) /* 375268 E0072418 44812000 */ mtc1 $at, $f4 /* 37526C E007241C 0100102D */ daddu $v0, $t0, $zero /* 375270 E0072420 25080008 */ addiu $t0, $t0, 0x8 /* 375274 E0072424 AE280000 */ sw $t0, 0x0($s1) /* 375278 E0072428 8C90000C */ lw $s0, 0xC($a0) /* 37527C E007242C 3C14DE00 */ lui $s4, (0xDE000000 >> 16) /* 375280 E0072430 AC550000 */ sw $s5, 0x0($v0) /* 375284 E0072434 AC400004 */ sw $zero, 0x4($v0) /* 375288 E0072438 25020008 */ addiu $v0, $t0, 0x8 /* 37528C E007243C AE220000 */ sw $v0, 0x0($s1) /* 375290 E0072440 25020010 */ addiu $v0, $t0, 0x10 /* 375294 E0072444 AD030000 */ sw $v1, 0x0($t0) /* 375298 E0072448 AE220000 */ sw $v0, 0x0($s1) /* 37529C E007244C 8C830010 */ lw $v1, 0x10($a0) /* 3752A0 E0072450 25020018 */ addiu $v0, $t0, 0x18 /* 3752A4 E0072454 AE220000 */ sw $v0, 0x0($s1) /* 3752A8 E0072458 8C63001C */ lw $v1, 0x1C($v1) /* 3752AC E007245C 3C020900 */ lui $v0, %hi(D_09000E60_40E0F0) /* 3752B0 E0072460 24420E60 */ addiu $v0, $v0, %lo(D_09000E60_40E0F0) /* 3752B4 E0072464 AD02000C */ sw $v0, 0xC($t0) /* 3752B8 E0072468 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3752BC E007246C AD020010 */ sw $v0, 0x10($t0) /* 3752C0 E0072470 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3752C4 E0072474 AD140008 */ sw $s4, 0x8($t0) /* 3752C8 E0072478 00621821 */ addu $v1, $v1, $v0 /* 3752CC E007247C AD030004 */ sw $v1, 0x4($t0) /* 3752D0 E0072480 92030027 */ lbu $v1, 0x27($s0) /* 3752D4 E0072484 25020020 */ addiu $v0, $t0, 0x20 /* 3752D8 E0072488 AE220000 */ sw $v0, 0x0($s1) /* 3752DC E007248C 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3752E0 E0072490 AD020018 */ sw $v0, 0x18($t0) /* 3752E4 E0072494 00651825 */ or $v1, $v1, $a1 /* 3752E8 E0072498 AD030014 */ sw $v1, 0x14($t0) /* 3752EC E007249C 92020050 */ lbu $v0, 0x50($s0) /* 3752F0 E00724A0 92040051 */ lbu $a0, 0x51($s0) /* 3752F4 E00724A4 92030052 */ lbu $v1, 0x52($s0) /* 3752F8 E00724A8 00021600 */ sll $v0, $v0, 24 /* 3752FC E00724AC 00042400 */ sll $a0, $a0, 16 /* 375300 E00724B0 00441025 */ or $v0, $v0, $a0 /* 375304 E00724B4 00031A00 */ sll $v1, $v1, 8 /* 375308 E00724B8 00431025 */ or $v0, $v0, $v1 /* 37530C E00724BC 34420080 */ ori $v0, $v0, 0x80 /* 375310 E00724C0 AD02001C */ sw $v0, 0x1C($t0) /* 375314 E00724C4 C6020030 */ lwc1 $f2, 0x30($s0) /* 375318 E00724C8 46041082 */ mul.s $f2, $f2, $f4 /* 37531C E00724CC 00000000 */ nop /* 375320 E00724D0 3C130001 */ lui $s3, (0x11630 >> 16) /* 375324 E00724D4 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 375328 E00724D8 C6000034 */ lwc1 $f0, 0x34($s0) /* 37532C E00724DC 3C07F200 */ lui $a3, (0xF2000000 >> 16) /* 375330 E00724E0 46040002 */ mul.s $f0, $f0, $f4 /* 375334 E00724E4 00000000 */ nop /* 375338 E00724E8 27A40010 */ addiu $a0, $sp, 0x10 /* 37533C E00724EC 25020028 */ addiu $v0, $t0, 0x28 /* 375340 E00724F0 AE220000 */ sw $v0, 0x0($s1) /* 375344 E00724F4 4600118D */ trunc.w.s $f6, $f2 /* 375348 E00724F8 44023000 */ mfc1 $v0, $f6 /* 37534C E00724FC 4600018D */ trunc.w.s $f6, $f0 /* 375350 E0072500 44063000 */ mfc1 $a2, $f6 /* 375354 E0072504 30450FFF */ andi $a1, $v0, 0xFFF /* 375358 E0072508 00052B00 */ sll $a1, $a1, 12 /* 37535C E007250C 30C30FFF */ andi $v1, $a2, 0xFFF /* 375360 E0072510 00671825 */ or $v1, $v1, $a3 /* 375364 E0072514 00A32825 */ or $a1, $a1, $v1 /* 375368 E0072518 244200FC */ addiu $v0, $v0, 0xFC /* 37536C E007251C C6000038 */ lwc1 $f0, 0x38($s0) /* 375370 E0072520 30420FFF */ andi $v0, $v0, 0xFFF /* 375374 E0072524 46040002 */ mul.s $f0, $f0, $f4 /* 375378 E0072528 00000000 */ nop /* 37537C E007252C 00021300 */ sll $v0, $v0, 12 /* 375380 E0072530 24C600FC */ addiu $a2, $a2, 0xFC /* 375384 E0072534 C602003C */ lwc1 $f2, 0x3C($s0) /* 375388 E0072538 30C60FFF */ andi $a2, $a2, 0xFFF /* 37538C E007253C 46041082 */ mul.s $f2, $f2, $f4 /* 375390 E0072540 00000000 */ nop /* 375394 E0072544 00461025 */ or $v0, $v0, $a2 /* 375398 E0072548 AD050020 */ sw $a1, 0x20($t0) /* 37539C E007254C AD020024 */ sw $v0, 0x24($t0) /* 3753A0 E0072550 4600018D */ trunc.w.s $f6, $f0 /* 3753A4 E0072554 44053000 */ mfc1 $a1, $f6 /* 3753A8 E0072558 4600118D */ trunc.w.s $f6, $f2 /* 3753AC E007255C 44063000 */ mfc1 $a2, $f6 /* 3753B0 E0072560 30A30FFF */ andi $v1, $a1, 0xFFF /* 3753B4 E0072564 00031B00 */ sll $v1, $v1, 12 /* 3753B8 E0072568 30C20FFF */ andi $v0, $a2, 0xFFF /* 3753BC E007256C 00471025 */ or $v0, $v0, $a3 /* 3753C0 E0072570 00621825 */ or $v1, $v1, $v0 /* 3753C4 E0072574 24A5007C */ addiu $a1, $a1, 0x7C /* 3753C8 E0072578 30A50FFF */ andi $a1, $a1, 0xFFF /* 3753CC E007257C 00052B00 */ sll $a1, $a1, 12 /* 3753D0 E0072580 24C6007C */ addiu $a2, $a2, 0x7C /* 3753D4 E0072584 30C60FFF */ andi $a2, $a2, 0xFFF /* 3753D8 E0072588 3C020100 */ lui $v0, (0x1000000 >> 16) /* 3753DC E007258C 00C23025 */ or $a2, $a2, $v0 /* 3753E0 E0072590 00A62825 */ or $a1, $a1, $a2 /* 3753E4 E0072594 AD030028 */ sw $v1, 0x28($t0) /* 3753E8 E0072598 AD05002C */ sw $a1, 0x2C($t0) /* 3753EC E007259C 8E050004 */ lw $a1, 0x4($s0) /* 3753F0 E00725A0 8E060008 */ lw $a2, 0x8($s0) /* 3753F4 E00725A4 8E07000C */ lw $a3, 0xC($s0) /* 3753F8 E00725A8 25080030 */ addiu $t0, $t0, 0x30 /* 3753FC E00725AC 0C080108 */ jal shim_guTranslateF /* 375400 E00725B0 AE280000 */ sw $t0, 0x0($s1) /* 375404 E00725B4 8E05001C */ lw $a1, 0x1C($s0) /* 375408 E00725B8 27B00050 */ addiu $s0, $sp, 0x50 /* 37540C E00725BC 0200202D */ daddu $a0, $s0, $zero /* 375410 E00725C0 00A0302D */ daddu $a2, $a1, $zero /* 375414 E00725C4 0C080110 */ jal shim_guScaleF /* 375418 E00725C8 00A0382D */ daddu $a3, $a1, $zero /* 37541C E00725CC 0200202D */ daddu $a0, $s0, $zero /* 375420 E00725D0 27A50010 */ addiu $a1, $sp, 0x10 /* 375424 E00725D4 0C080114 */ jal shim_guMtxCatF /* 375428 E00725D8 00A0302D */ daddu $a2, $a1, $zero /* 37542C E00725DC 27A40010 */ addiu $a0, $sp, 0x10 /* 375430 E00725E0 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 375434 E00725E4 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 375438 E00725E8 3C12800A */ lui $s2, %hi(gDisplayContext) /* 37543C E00725EC 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 375440 E00725F0 96050000 */ lhu $a1, 0x0($s0) /* 375444 E00725F4 8E420000 */ lw $v0, 0x0($s2) /* 375448 E00725F8 00052980 */ sll $a1, $a1, 6 /* 37544C E00725FC 00B32821 */ addu $a1, $a1, $s3 /* 375450 E0072600 0C080118 */ jal shim_guMtxF2L /* 375454 E0072604 00452821 */ addu $a1, $v0, $a1 /* 375458 E0072608 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 37545C E007260C 8E240000 */ lw $a0, 0x0($s1) /* 375460 E0072610 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 375464 E0072614 0080282D */ daddu $a1, $a0, $zero /* 375468 E0072618 24840008 */ addiu $a0, $a0, 0x8 /* 37546C E007261C AE240000 */ sw $a0, 0x0($s1) /* 375470 E0072620 96020000 */ lhu $v0, 0x0($s0) /* 375474 E0072624 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 375478 E0072628 ACA30000 */ sw $v1, 0x0($a1) /* 37547C E007262C 24430001 */ addiu $v1, $v0, 0x1 /* 375480 E0072630 3042FFFF */ andi $v0, $v0, 0xFFFF /* 375484 E0072634 00021180 */ sll $v0, $v0, 6 /* 375488 E0072638 A6030000 */ sh $v1, 0x0($s0) /* 37548C E007263C 8E430000 */ lw $v1, 0x0($s2) /* 375490 E0072640 00531021 */ addu $v0, $v0, $s3 /* 375494 E0072644 00621821 */ addu $v1, $v1, $v0 /* 375498 E0072648 24820008 */ addiu $v0, $a0, 0x8 /* 37549C E007264C ACA30004 */ sw $v1, 0x4($a1) /* 3754A0 E0072650 AE220000 */ sw $v0, 0x0($s1) /* 3754A4 E0072654 3C020900 */ lui $v0, %hi(D_09000DC0_40E050) /* 3754A8 E0072658 24420DC0 */ addiu $v0, $v0, %lo(D_09000DC0_40E050) /* 3754AC E007265C AC820004 */ sw $v0, 0x4($a0) /* 3754B0 E0072660 24820010 */ addiu $v0, $a0, 0x10 /* 3754B4 E0072664 AC940000 */ sw $s4, 0x0($a0) /* 3754B8 E0072668 AE220000 */ sw $v0, 0x0($s1) /* 3754BC E007266C 24020040 */ addiu $v0, $zero, 0x40 /* 3754C0 E0072670 AC82000C */ sw $v0, 0xC($a0) /* 3754C4 E0072674 24820018 */ addiu $v0, $a0, 0x18 /* 3754C8 E0072678 AC860008 */ sw $a2, 0x8($a0) /* 3754CC E007267C AE220000 */ sw $v0, 0x0($s1) /* 3754D0 E0072680 AC950010 */ sw $s5, 0x10($a0) /* 3754D4 E0072684 AC800014 */ sw $zero, 0x14($a0) /* 3754D8 E0072688 8FBF00A8 */ lw $ra, 0xA8($sp) /* 3754DC E007268C 8FB500A4 */ lw $s5, 0xA4($sp) /* 3754E0 E0072690 8FB400A0 */ lw $s4, 0xA0($sp) /* 3754E4 E0072694 8FB3009C */ lw $s3, 0x9C($sp) /* 3754E8 E0072698 8FB20098 */ lw $s2, 0x98($sp) /* 3754EC E007269C 8FB10094 */ lw $s1, 0x94($sp) /* 3754F0 E00726A0 8FB00090 */ lw $s0, 0x90($sp) /* 3754F4 E00726A4 03E00008 */ jr $ra /* 3754F8 E00726A8 27BD00B0 */ addiu $sp, $sp, 0xB0 /* 3754FC E00726AC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void energy_shockwave_appendGfx(void* effect) { EnergyShockwaveFXData* data = ((EffectInstance*)effect)->data.energyShockwave; Matrix4f sp10; Matrix4f sp50; s32 uls; s32 ult; s32 uls2; s32 ult2; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09000E60_376370); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 179, 30, data->unk_24); gDPSetEnvColor(gMainGfxPos++, data->unk_50, data->unk_51, data->unk_52, 128); uls = data->unk_30 * 4; ult = data->unk_34 * 4; uls2 = data->unk_38 * 4; ult2 = data->unk_3C * 4; gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 252, ult + 252); gDPSetTileSize(gMainGfxPos++, 1, uls2, ult2, uls2 + 124, ult2 + 124); shim_guTranslateF(sp10, data->unk_04, data->unk_08, data->unk_0C); shim_guScaleF(sp50, data->unk_1C, data->unk_1C, data->unk_1C); shim_guMtxCatF(sp50, sp10, sp10); shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09000DC0_3762D0); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel shiny_flare_appendGfx /* 3D7470 E00DA230 27BDFF48 */ addiu $sp, $sp, -0xB8 /* 3D7474 E00DA234 0080302D */ daddu $a2, $a0, $zero /* 3D7478 E00DA238 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3D747C E00DA23C 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3D7480 E00DA240 27A40010 */ addiu $a0, $sp, 0x10 /* 3D7484 E00DA244 AFB600A8 */ sw $s6, 0xA8($sp) /* 3D7488 E00DA248 3C160001 */ lui $s6, (0x11630 >> 16) /* 3D748C E00DA24C AFB3009C */ sw $s3, 0x9C($sp) /* 3D7490 E00DA250 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 3D7494 E00DA254 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 3D7498 E00DA258 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 3D749C E00DA25C AFBF00AC */ sw $ra, 0xAC($sp) /* 3D74A0 E00DA260 AFB500A4 */ sw $s5, 0xA4($sp) /* 3D74A4 E00DA264 AFB400A0 */ sw $s4, 0xA0($sp) /* 3D74A8 E00DA268 AFB20098 */ sw $s2, 0x98($sp) /* 3D74AC E00DA26C AFB10094 */ sw $s1, 0x94($sp) /* 3D74B0 E00DA270 AFB00090 */ sw $s0, 0x90($sp) /* 3D74B4 E00DA274 F7B400B0 */ sdc1 $f20, 0xB0($sp) /* 3D74B8 E00DA278 8E650000 */ lw $a1, 0x0($s3) /* 3D74BC E00DA27C 8CD2000C */ lw $s2, 0xC($a2) /* 3D74C0 E00DA280 00A0182D */ daddu $v1, $a1, $zero /* 3D74C4 E00DA284 24A50008 */ addiu $a1, $a1, 0x8 /* 3D74C8 E00DA288 AE650000 */ sw $a1, 0x0($s3) /* 3D74CC E00DA28C 8E550024 */ lw $s5, 0x24($s2) /* 3D74D0 E00DA290 C6540028 */ lwc1 $f20, 0x28($s2) /* 3D74D4 E00DA294 C640002C */ lwc1 $f0, 0x2C($s2) /* 3D74D8 E00DA298 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3D74DC E00DA29C AC620000 */ sw $v0, 0x0($v1) /* 3D74E0 E00DA2A0 AC600004 */ sw $zero, 0x4($v1) /* 3D74E4 E00DA2A4 ACA70000 */ sw $a3, 0x0($a1) /* 3D74E8 E00DA2A8 8CC30010 */ lw $v1, 0x10($a2) /* 3D74EC E00DA2AC 24A20008 */ addiu $v0, $a1, 0x8 /* 3D74F0 E00DA2B0 AE620000 */ sw $v0, 0x0($s3) /* 3D74F4 E00DA2B4 8C62001C */ lw $v0, 0x1C($v1) /* 3D74F8 E00DA2B8 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3D74FC E00DA2BC 4600A502 */ mul.s $f20, $f20, $f0 /* 3D7500 E00DA2C0 00000000 */ nop /* 3D7504 E00DA2C4 00431021 */ addu $v0, $v0, $v1 /* 3D7508 E00DA2C8 3C03800B */ lui $v1, %hi(gCameras) /* 3D750C E00DA2CC 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 3D7510 E00DA2D0 ACA20004 */ sw $v0, 0x4($a1) /* 3D7514 E00DA2D4 8E450004 */ lw $a1, 0x4($s2) /* 3D7518 E00DA2D8 8E460008 */ lw $a2, 0x8($s2) /* 3D751C E00DA2DC 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 3D7520 E00DA2E0 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 3D7524 E00DA2E4 8E47000C */ lw $a3, 0xC($s2) /* 3D7528 E00DA2E8 00028880 */ sll $s1, $v0, 2 /* 3D752C E00DA2EC 02228821 */ addu $s1, $s1, $v0 /* 3D7530 E00DA2F0 00118880 */ sll $s1, $s1, 2 /* 3D7534 E00DA2F4 02228823 */ subu $s1, $s1, $v0 /* 3D7538 E00DA2F8 001110C0 */ sll $v0, $s1, 3 /* 3D753C E00DA2FC 02228821 */ addu $s1, $s1, $v0 /* 3D7540 E00DA300 001188C0 */ sll $s1, $s1, 3 /* 3D7544 E00DA304 0C080108 */ jal shim_guTranslateF /* 3D7548 E00DA308 02238821 */ addu $s1, $s1, $v1 /* 3D754C E00DA30C 27B00050 */ addiu $s0, $sp, 0x50 /* 3D7550 E00DA310 4405A000 */ mfc1 $a1, $f20 /* 3D7554 E00DA314 0200202D */ daddu $a0, $s0, $zero /* 3D7558 E00DA318 00A0302D */ daddu $a2, $a1, $zero /* 3D755C E00DA31C 0C080110 */ jal shim_guScaleF /* 3D7560 E00DA320 00A0382D */ daddu $a3, $a1, $zero /* 3D7564 E00DA324 0200202D */ daddu $a0, $s0, $zero /* 3D7568 E00DA328 27A50010 */ addiu $a1, $sp, 0x10 /* 3D756C E00DA32C 0C080114 */ jal shim_guMtxCatF /* 3D7570 E00DA330 00A0302D */ daddu $a2, $a1, $zero /* 3D7574 E00DA334 27A40010 */ addiu $a0, $sp, 0x10 /* 3D7578 E00DA338 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3D757C E00DA33C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3D7580 E00DA340 3C14800A */ lui $s4, %hi(gDisplayContext) /* 3D7584 E00DA344 2694A674 */ addiu $s4, $s4, %lo(gDisplayContext) /* 3D7588 E00DA348 96050000 */ lhu $a1, 0x0($s0) /* 3D758C E00DA34C 8E820000 */ lw $v0, 0x0($s4) /* 3D7590 E00DA350 00052980 */ sll $a1, $a1, 6 /* 3D7594 E00DA354 00B62821 */ addu $a1, $a1, $s6 /* 3D7598 E00DA358 0C080118 */ jal shim_guMtxF2L /* 3D759C E00DA35C 00452821 */ addu $a1, $v0, $a1 /* 3D75A0 E00DA360 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3D75A4 E00DA364 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3D75A8 E00DA368 3C06DA38 */ lui $a2, (0xDA380001 >> 16) /* 3D75AC E00DA36C 34C60001 */ ori $a2, $a2, (0xDA380001 & 0xFFFF) /* 3D75B0 E00DA370 3C092AAA */ lui $t1, (0x2AAAAAAB >> 16) /* 3D75B4 E00DA374 3529AAAB */ ori $t1, $t1, (0x2AAAAAAB & 0xFFFF) /* 3D75B8 E00DA378 3C08DE00 */ lui $t0, (0xDE000000 >> 16) /* 3D75BC E00DA37C 32B500FF */ andi $s5, $s5, 0xFF /* 3D75C0 E00DA380 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 3D75C4 E00DA384 8E650000 */ lw $a1, 0x0($s3) /* 3D75C8 E00DA388 96020000 */ lhu $v0, 0x0($s0) /* 3D75CC E00DA38C 00A0202D */ daddu $a0, $a1, $zero /* 3D75D0 E00DA390 24A50008 */ addiu $a1, $a1, 0x8 /* 3D75D4 E00DA394 AE650000 */ sw $a1, 0x0($s3) /* 3D75D8 E00DA398 AC830000 */ sw $v1, 0x0($a0) /* 3D75DC E00DA39C 24430001 */ addiu $v1, $v0, 0x1 /* 3D75E0 E00DA3A0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3D75E4 E00DA3A4 00021180 */ sll $v0, $v0, 6 /* 3D75E8 E00DA3A8 A6030000 */ sh $v1, 0x0($s0) /* 3D75EC E00DA3AC 8E830000 */ lw $v1, 0x0($s4) /* 3D75F0 E00DA3B0 00561021 */ addu $v0, $v0, $s6 /* 3D75F4 E00DA3B4 00621821 */ addu $v1, $v1, $v0 /* 3D75F8 E00DA3B8 24A20008 */ addiu $v0, $a1, 0x8 /* 3D75FC E00DA3BC AC830004 */ sw $v1, 0x4($a0) /* 3D7600 E00DA3C0 AE620000 */ sw $v0, 0x0($s3) /* 3D7604 E00DA3C4 24A20010 */ addiu $v0, $a1, 0x10 /* 3D7608 E00DA3C8 ACA60000 */ sw $a2, 0x0($a1) /* 3D760C E00DA3CC AE620000 */ sw $v0, 0x0($s3) /* 3D7610 E00DA3D0 8E230204 */ lw $v1, 0x204($s1) /* 3D7614 E00DA3D4 3C020900 */ lui $v0, %hi(D_09000240_4152A0) /* 3D7618 E00DA3D8 24420240 */ addiu $v0, $v0, %lo(D_09000240_4152A0) /* 3D761C E00DA3DC ACA2000C */ sw $v0, 0xC($a1) /* 3D7620 E00DA3E0 24A20018 */ addiu $v0, $a1, 0x18 /* 3D7624 E00DA3E4 3C06FA00 */ lui $a2, (0xFA000000 >> 16) /* 3D7628 E00DA3E8 ACA80008 */ sw $t0, 0x8($a1) /* 3D762C E00DA3EC AE620000 */ sw $v0, 0x0($s3) /* 3D7630 E00DA3F0 ACA60010 */ sw $a2, 0x10($a1) /* 3D7634 E00DA3F4 ACA30004 */ sw $v1, 0x4($a1) /* 3D7638 E00DA3F8 9242001B */ lbu $v0, 0x1B($s2) /* 3D763C E00DA3FC 9244001F */ lbu $a0, 0x1F($s2) /* 3D7640 E00DA400 92430023 */ lbu $v1, 0x23($s2) /* 3D7644 E00DA404 00021600 */ sll $v0, $v0, 24 /* 3D7648 E00DA408 00042400 */ sll $a0, $a0, 16 /* 3D764C E00DA40C 00441025 */ or $v0, $v0, $a0 /* 3D7650 E00DA410 00031A00 */ sll $v1, $v1, 8 /* 3D7654 E00DA414 00431025 */ or $v0, $v0, $v1 /* 3D7658 E00DA418 00551025 */ or $v0, $v0, $s5 /* 3D765C E00DA41C ACA20014 */ sw $v0, 0x14($a1) /* 3D7660 E00DA420 8E420014 */ lw $v0, 0x14($s2) /* 3D7664 E00DA424 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 3D7668 E00DA428 00022040 */ sll $a0, $v0, 1 /* 3D766C E00DA42C 00822021 */ addu $a0, $a0, $v0 /* 3D7670 E00DA430 00890018 */ mult $a0, $t1 /* 3D7674 E00DA434 24A20020 */ addiu $v0, $a1, 0x20 /* 3D7678 E00DA438 AE620000 */ sw $v0, 0x0($s3) /* 3D767C E00DA43C 000417C3 */ sra $v0, $a0, 31 /* 3D7680 E00DA440 ACA60018 */ sw $a2, 0x18($a1) /* 3D7684 E00DA444 00005010 */ mfhi $t2 /* 3D7688 E00DA448 000A1883 */ sra $v1, $t2, 2 /* 3D768C E00DA44C 00621823 */ subu $v1, $v1, $v0 /* 3D7690 E00DA450 00031040 */ sll $v0, $v1, 1 /* 3D7694 E00DA454 00431021 */ addu $v0, $v0, $v1 /* 3D7698 E00DA458 000210C0 */ sll $v0, $v0, 3 /* 3D769C E00DA45C 00822023 */ subu $a0, $a0, $v0 /* 3D76A0 E00DA460 3C03E00E */ lui $v1, (0xE00E0000 >> 16) /* 3D76A4 E00DA464 00641821 */ addu $v1, $v1, $a0 /* 3D76A8 E00DA468 9063A500 */ lbu $v1, -0x5B00($v1) /* 3D76AC E00DA46C 3C06E00E */ lui $a2, (0xE00E0000 >> 16) /* 3D76B0 E00DA470 00C43021 */ addu $a2, $a2, $a0 /* 3D76B4 E00DA474 90C6A501 */ lbu $a2, -0x5AFF($a2) /* 3D76B8 E00DA478 3C01E00E */ lui $at, (0xE00E0000 >> 16) /* 3D76BC E00DA47C 00240821 */ addu $at, $at, $a0 /* 3D76C0 E00DA480 9024A502 */ lbu $a0, -0x5AFE($at) /* 3D76C4 E00DA484 24A20028 */ addiu $v0, $a1, 0x28 /* 3D76C8 E00DA488 AE620000 */ sw $v0, 0x0($s3) /* 3D76CC E00DA48C 3C020900 */ lui $v0, %hi(D_090002E0_415340) /* 3D76D0 E00DA490 244202E0 */ addiu $v0, $v0, %lo(D_090002E0_415340) /* 3D76D4 E00DA494 ACA20024 */ sw $v0, 0x24($a1) /* 3D76D8 E00DA498 24A20030 */ addiu $v0, $a1, 0x30 /* 3D76DC E00DA49C ACA80020 */ sw $t0, 0x20($a1) /* 3D76E0 E00DA4A0 AE620000 */ sw $v0, 0x0($s3) /* 3D76E4 E00DA4A4 24020040 */ addiu $v0, $zero, 0x40 /* 3D76E8 E00DA4A8 ACA70028 */ sw $a3, 0x28($a1) /* 3D76EC E00DA4AC ACA2002C */ sw $v0, 0x2C($a1) /* 3D76F0 E00DA4B0 00031E00 */ sll $v1, $v1, 24 /* 3D76F4 E00DA4B4 00063400 */ sll $a2, $a2, 16 /* 3D76F8 E00DA4B8 00661825 */ or $v1, $v1, $a2 /* 3D76FC E00DA4BC 00042200 */ sll $a0, $a0, 8 /* 3D7700 E00DA4C0 00641825 */ or $v1, $v1, $a0 /* 3D7704 E00DA4C4 00751825 */ or $v1, $v1, $s5 /* 3D7708 E00DA4C8 ACA3001C */ sw $v1, 0x1C($a1) /* 3D770C E00DA4CC 8FBF00AC */ lw $ra, 0xAC($sp) /* 3D7710 E00DA4D0 8FB600A8 */ lw $s6, 0xA8($sp) /* 3D7714 E00DA4D4 8FB500A4 */ lw $s5, 0xA4($sp) /* 3D7718 E00DA4D8 8FB400A0 */ lw $s4, 0xA0($sp) /* 3D771C E00DA4DC 8FB3009C */ lw $s3, 0x9C($sp) /* 3D7720 E00DA4E0 8FB20098 */ lw $s2, 0x98($sp) /* 3D7724 E00DA4E4 8FB10094 */ lw $s1, 0x94($sp) /* 3D7728 E00DA4E8 8FB00090 */ lw $s0, 0x90($sp) /* 3D772C E00DA4EC D7B400B0 */ ldc1 $f20, 0xB0($sp) /* 3D7730 E00DA4F0 03E00008 */ jr $ra /* 3D7734 E00DA4F4 27BD00B8 */ addiu $sp, $sp, 0xB8 /* 3D7738 E00DA4F8 00000000 */ nop /* 3D773C E00DA4FC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void shiny_flare_appendGfx(void* effect) { ShinyFlareFXData* data = ((EffectInstance*)effect)->data.shinyFlare; Camera* camera = &gCameras[gCurrentCameraID]; s32 unk_24 = data->unk_24; f32 scale = data->unk_28 * data->unk_2C; s32 idx; Matrix4f sp10; Matrix4f sp50; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp10, data->pos.x, data->pos.y, data->pos.z); shim_guScaleF(sp50, scale, scale, scale); shim_guMtxCatF(sp50, sp10, sp10); shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09000240_3D79B0); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, unk_24); idx = data->lifeTime * 3; gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E00DA500[idx % ARRAY_COUNT(D_E00DA500) ], D_E00DA500[idx % ARRAY_COUNT(D_E00DA500) + 1], D_E00DA500[idx % ARRAY_COUNT(D_E00DA500) + 2], unk_24); gSPDisplayList(gMainGfxPos++, D_090002E0_3D7A50); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel cloud_trail_appendGfx /* 32F284 E0016454 27BDFF28 */ addiu $sp, $sp, -0xD8 /* 32F288 E0016458 AFB600B8 */ sw $s6, 0xB8($sp) /* 32F28C E001645C 0080B02D */ daddu $s6, $a0, $zero /* 32F290 E0016460 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 32F294 E0016464 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 32F298 E0016468 AFB300AC */ sw $s3, 0xAC($sp) /* 32F29C E001646C 0000982D */ daddu $s3, $zero, $zero /* 32F2A0 E0016470 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 32F2A4 E0016474 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 32F2A8 E0016478 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 32F2AC E001647C AFBF00C4 */ sw $ra, 0xC4($sp) /* 32F2B0 E0016480 AFBE00C0 */ sw $fp, 0xC0($sp) /* 32F2B4 E0016484 AFB700BC */ sw $s7, 0xBC($sp) /* 32F2B8 E0016488 AFB500B4 */ sw $s5, 0xB4($sp) /* 32F2BC E001648C AFB400B0 */ sw $s4, 0xB0($sp) /* 32F2C0 E0016490 AFB200A8 */ sw $s2, 0xA8($sp) /* 32F2C4 E0016494 AFB100A4 */ sw $s1, 0xA4($sp) /* 32F2C8 E0016498 AFB000A0 */ sw $s0, 0xA0($sp) /* 32F2CC E001649C F7B600D0 */ sdc1 $f22, 0xD0($sp) /* 32F2D0 E00164A0 F7B400C8 */ sdc1 $f20, 0xC8($sp) /* 32F2D4 E00164A4 8CC30000 */ lw $v1, 0x0($a2) /* 32F2D8 E00164A8 8ED2000C */ lw $s2, 0xC($s6) /* 32F2DC E00164AC 0060202D */ daddu $a0, $v1, $zero /* 32F2E0 E00164B0 24630008 */ addiu $v1, $v1, 0x8 /* 32F2E4 E00164B4 ACC30000 */ sw $v1, 0x0($a2) /* 32F2E8 E00164B8 AC820000 */ sw $v0, 0x0($a0) /* 32F2EC E00164BC AC800004 */ sw $zero, 0x4($a0) /* 32F2F0 E00164C0 AC650000 */ sw $a1, 0x0($v1) /* 32F2F4 E00164C4 8EC40010 */ lw $a0, 0x10($s6) /* 32F2F8 E00164C8 24620008 */ addiu $v0, $v1, 0x8 /* 32F2FC E00164CC ACC20000 */ sw $v0, 0x0($a2) /* 32F300 E00164D0 8C84001C */ lw $a0, 0x1C($a0) /* 32F304 E00164D4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 32F308 E00164D8 AC620008 */ sw $v0, 0x8($v1) /* 32F30C E00164DC 3C020900 */ lui $v0, %hi(D_090000E0_415140) /* 32F310 E00164E0 244200E0 */ addiu $v0, $v0, %lo(D_090000E0_415140) /* 32F314 E00164E4 AC62000C */ sw $v0, 0xC($v1) /* 32F318 E00164E8 3C028000 */ lui $v0, (0x80000000 >> 16) /* 32F31C E00164EC 00822021 */ addu $a0, $a0, $v0 /* 32F320 E00164F0 AC640004 */ sw $a0, 0x4($v1) /* 32F324 E00164F4 8EC20008 */ lw $v0, 0x8($s6) /* 32F328 E00164F8 24630010 */ addiu $v1, $v1, 0x10 /* 32F32C E00164FC 18400070 */ blez $v0, .LE00166C0 /* 32F330 E0016500 ACC30000 */ sw $v1, 0x0($a2) /* 32F334 E0016504 27B10060 */ addiu $s1, $sp, 0x60 /* 32F338 E0016508 3C1E800A */ lui $fp, %hi(gDisplayContext) /* 32F33C E001650C 27DEA674 */ addiu $fp, $fp, %lo(gDisplayContext) /* 32F340 E0016510 3C178007 */ lui $s7, %hi(gMatrixListPos) /* 32F344 E0016514 26F741F0 */ addiu $s7, $s7, %lo(gMatrixListPos) /* 32F348 E0016518 3C150001 */ lui $s5, (0x11630 >> 16) /* 32F34C E001651C 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 32F350 E0016520 00C0A02D */ daddu $s4, $a2, $zero /* 32F354 E0016524 26500008 */ addiu $s0, $s2, 0x8 /* 32F358 E0016528 4480A000 */ mtc1 $zero, $f20 /* 32F35C E001652C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 32F360 E0016530 4481B000 */ mtc1 $at, $f22 .LE0016534: /* 32F364 E0016534 8E420000 */ lw $v0, 0x0($s2) /* 32F368 E0016538 5040005C */ beql $v0, $zero, .LE00166AC /* 32F36C E001653C 26730001 */ addiu $s3, $s3, 0x1 /* 32F370 E0016540 3C09800B */ lui $t1, %hi(gCameras) /* 32F374 E0016544 25291D80 */ addiu $t1, $t1, %lo(gCameras) /* 32F378 E0016548 4405A000 */ mfc1 $a1, $f20 /* 32F37C E001654C 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 32F380 E0016550 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 32F384 E0016554 4407A000 */ mfc1 $a3, $f20 /* 32F388 E0016558 00031080 */ sll $v0, $v1, 2 /* 32F38C E001655C 00431021 */ addu $v0, $v0, $v1 /* 32F390 E0016560 00021080 */ sll $v0, $v0, 2 /* 32F394 E0016564 00431023 */ subu $v0, $v0, $v1 /* 32F398 E0016568 000218C0 */ sll $v1, $v0, 3 /* 32F39C E001656C 00431021 */ addu $v0, $v0, $v1 /* 32F3A0 E0016570 000210C0 */ sll $v0, $v0, 3 /* 32F3A4 E0016574 00491021 */ addu $v0, $v0, $t1 /* 32F3A8 E0016578 C442006C */ lwc1 $f2, 0x6C($v0) /* 32F3AC E001657C E7B60010 */ swc1 $f22, 0x10($sp) /* 32F3B0 E0016580 C6000004 */ lwc1 $f0, 0x4($s0) /* 32F3B4 E0016584 46001087 */ neg.s $f2, $f2 /* 32F3B8 E0016588 E7A00014 */ swc1 $f0, 0x14($sp) /* 32F3BC E001658C C6000008 */ lwc1 $f0, 0x8($s0) /* 32F3C0 E0016590 44061000 */ mfc1 $a2, $f2 /* 32F3C4 E0016594 E7A00018 */ swc1 $f0, 0x18($sp) /* 32F3C8 E0016598 C600000C */ lwc1 $f0, 0xC($s0) /* 32F3CC E001659C 27A40020 */ addiu $a0, $sp, 0x20 /* 32F3D0 E00165A0 0C080180 */ jal shim_guPositionF /* 32F3D4 E00165A4 E7A0001C */ swc1 $f0, 0x1C($sp) /* 32F3D8 E00165A8 8E050014 */ lw $a1, 0x14($s0) /* 32F3DC E00165AC 8E060018 */ lw $a2, 0x18($s0) /* 32F3E0 E00165B0 8E07001C */ lw $a3, 0x1C($s0) /* 32F3E4 E00165B4 0C080110 */ jal shim_guScaleF /* 32F3E8 E00165B8 0220202D */ daddu $a0, $s1, $zero /* 32F3EC E00165BC 0220202D */ daddu $a0, $s1, $zero /* 32F3F0 E00165C0 27A50020 */ addiu $a1, $sp, 0x20 /* 32F3F4 E00165C4 0C080114 */ jal shim_guMtxCatF /* 32F3F8 E00165C8 00A0302D */ daddu $a2, $a1, $zero /* 32F3FC E00165CC E7B60010 */ swc1 $f22, 0x10($sp) /* 32F400 E00165D0 8E050010 */ lw $a1, 0x10($s0) /* 32F404 E00165D4 4406A000 */ mfc1 $a2, $f20 /* 32F408 E00165D8 4407A000 */ mfc1 $a3, $f20 /* 32F40C E00165DC 0C080104 */ jal shim_guRotateF /* 32F410 E00165E0 0220202D */ daddu $a0, $s1, $zero /* 32F414 E00165E4 0220202D */ daddu $a0, $s1, $zero /* 32F418 E00165E8 27A50020 */ addiu $a1, $sp, 0x20 /* 32F41C E00165EC 0C080114 */ jal shim_guMtxCatF /* 32F420 E00165F0 00A0302D */ daddu $a2, $a1, $zero /* 32F424 E00165F4 27A40020 */ addiu $a0, $sp, 0x20 /* 32F428 E00165F8 96E50000 */ lhu $a1, 0x0($s7) /* 32F42C E00165FC 8FC20000 */ lw $v0, 0x0($fp) /* 32F430 E0016600 00052980 */ sll $a1, $a1, 6 /* 32F434 E0016604 00B52821 */ addu $a1, $a1, $s5 /* 32F438 E0016608 0C080118 */ jal shim_guMtxF2L /* 32F43C E001660C 00452821 */ addu $a1, $v0, $a1 /* 32F440 E0016610 3C077060 */ lui $a3, (0x70601800 >> 16) /* 32F444 E0016614 34E71800 */ ori $a3, $a3, (0x70601800 & 0xFFFF) /* 32F448 E0016618 3C08D838 */ lui $t0, (0xD8380002 >> 16) /* 32F44C E001661C 35080002 */ ori $t0, $t0, (0xD8380002 & 0xFFFF) /* 32F450 E0016620 8E840000 */ lw $a0, 0x0($s4) /* 32F454 E0016624 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 32F458 E0016628 0080302D */ daddu $a2, $a0, $zero /* 32F45C E001662C 24840008 */ addiu $a0, $a0, 0x8 /* 32F460 E0016630 AE840000 */ sw $a0, 0x0($s4) /* 32F464 E0016634 ACC20000 */ sw $v0, 0x0($a2) /* 32F468 E0016638 92050000 */ lbu $a1, 0x0($s0) /* 32F46C E001663C 96E30000 */ lhu $v1, 0x0($s7) /* 32F470 E0016640 24820008 */ addiu $v0, $a0, 0x8 /* 32F474 E0016644 AE820000 */ sw $v0, 0x0($s4) /* 32F478 E0016648 24620001 */ addiu $v0, $v1, 0x1 /* 32F47C E001664C A6E20000 */ sh $v0, 0x0($s7) /* 32F480 E0016650 24820010 */ addiu $v0, $a0, 0x10 /* 32F484 E0016654 AE820000 */ sw $v0, 0x0($s4) /* 32F488 E0016658 24820018 */ addiu $v0, $a0, 0x18 /* 32F48C E001665C 00A72825 */ or $a1, $a1, $a3 /* 32F490 E0016660 AE820000 */ sw $v0, 0x0($s4) /* 32F494 E0016664 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 32F498 E0016668 3063FFFF */ andi $v1, $v1, 0xFFFF /* 32F49C E001666C 00031980 */ sll $v1, $v1, 6 /* 32F4A0 E0016670 ACC50004 */ sw $a1, 0x4($a2) /* 32F4A4 E0016674 AC820000 */ sw $v0, 0x0($a0) /* 32F4A8 E0016678 8FC20000 */ lw $v0, 0x0($fp) /* 32F4AC E001667C 00751821 */ addu $v1, $v1, $s5 /* 32F4B0 E0016680 AC880010 */ sw $t0, 0x10($a0) /* 32F4B4 E0016684 00431021 */ addu $v0, $v0, $v1 /* 32F4B8 E0016688 AC820004 */ sw $v0, 0x4($a0) /* 32F4BC E001668C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 32F4C0 E0016690 AC820008 */ sw $v0, 0x8($a0) /* 32F4C4 E0016694 3C020900 */ lui $v0, %hi(D_090001B8_415218) /* 32F4C8 E0016698 244201B8 */ addiu $v0, $v0, %lo(D_090001B8_415218) /* 32F4CC E001669C AC82000C */ sw $v0, 0xC($a0) /* 32F4D0 E00166A0 24020040 */ addiu $v0, $zero, 0x40 /* 32F4D4 E00166A4 AC820014 */ sw $v0, 0x14($a0) /* 32F4D8 E00166A8 26730001 */ addiu $s3, $s3, 0x1 .LE00166AC: /* 32F4DC E00166AC 26100050 */ addiu $s0, $s0, 0x50 /* 32F4E0 E00166B0 8EC20008 */ lw $v0, 0x8($s6) /* 32F4E4 E00166B4 0262102A */ slt $v0, $s3, $v0 /* 32F4E8 E00166B8 1440FF9E */ bnez $v0, .LE0016534 /* 32F4EC E00166BC 26520050 */ addiu $s2, $s2, 0x50 .LE00166C0: /* 32F4F0 E00166C0 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 32F4F4 E00166C4 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 32F4F8 E00166C8 8C620000 */ lw $v0, 0x0($v1) /* 32F4FC E00166CC 0040202D */ daddu $a0, $v0, $zero /* 32F500 E00166D0 24420008 */ addiu $v0, $v0, 0x8 /* 32F504 E00166D4 AC620000 */ sw $v0, 0x0($v1) /* 32F508 E00166D8 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 32F50C E00166DC AC820000 */ sw $v0, 0x0($a0) /* 32F510 E00166E0 AC800004 */ sw $zero, 0x4($a0) /* 32F514 E00166E4 8FBF00C4 */ lw $ra, 0xC4($sp) /* 32F518 E00166E8 8FBE00C0 */ lw $fp, 0xC0($sp) /* 32F51C E00166EC 8FB700BC */ lw $s7, 0xBC($sp) /* 32F520 E00166F0 8FB600B8 */ lw $s6, 0xB8($sp) /* 32F524 E00166F4 8FB500B4 */ lw $s5, 0xB4($sp) /* 32F528 E00166F8 8FB400B0 */ lw $s4, 0xB0($sp) /* 32F52C E00166FC 8FB300AC */ lw $s3, 0xAC($sp) /* 32F530 E0016700 8FB200A8 */ lw $s2, 0xA8($sp) /* 32F534 E0016704 8FB100A4 */ lw $s1, 0xA4($sp) /* 32F538 E0016708 8FB000A0 */ lw $s0, 0xA0($sp) /* 32F53C E001670C D7B600D0 */ ldc1 $f22, 0xD0($sp) /* 32F540 E0016710 D7B400C8 */ ldc1 $f20, 0xC8($sp) /* 32F544 E0016714 03E00008 */ jr $ra /* 32F548 E0016718 27BD00D8 */ addiu $sp, $sp, 0xD8 /* 32F54C E001671C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void cloud_trail_appendGfx(void* effect) { EffectInstance* effectTemp = effect; CloudTrailFXData* part = effectTemp->data.cloudTrail; Matrix4f sp20; Matrix4f sp60; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data)); gSPDisplayList(gMainGfxPos++, D_090000E0_32ED30); for (i = 0; i < effectTemp->numParts; i++, part++) { if (part->alive) { shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, part->unk_0C, part->unk_10, part->unk_14); shim_guScaleF(sp60, part->unk_1C, part->unk_20, part->unk_24); shim_guMtxCatF(sp60, sp20, sp20); shim_guRotateF(sp60, part->unk_18, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gDPSetPrimColor(gMainGfxPos++, 0, 0, 112, 96, 24, part->alpha); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090001B8_32EE08); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel snowflake_appendGfx /* 330C1C E001C30C 27BDFE70 */ addiu $sp, $sp, -0x190 /* 330C20 E001C310 0080302D */ daddu $a2, $a0, $zero /* 330C24 E001C314 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 330C28 E001C318 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 330C2C E001C31C 27A40018 */ addiu $a0, $sp, 0x18 /* 330C30 E001C320 AFB70174 */ sw $s7, 0x174($sp) /* 330C34 E001C324 3C170001 */ lui $s7, (0x11630 >> 16) /* 330C38 E001C328 AFB1015C */ sw $s1, 0x15C($sp) /* 330C3C E001C32C 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 330C40 E001C330 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 330C44 E001C334 AFBF017C */ sw $ra, 0x17C($sp) /* 330C48 E001C338 AFBE0178 */ sw $fp, 0x178($sp) /* 330C4C E001C33C AFB60170 */ sw $s6, 0x170($sp) /* 330C50 E001C340 AFB5016C */ sw $s5, 0x16C($sp) /* 330C54 E001C344 AFB40168 */ sw $s4, 0x168($sp) /* 330C58 E001C348 AFB30164 */ sw $s3, 0x164($sp) /* 330C5C E001C34C AFB20160 */ sw $s2, 0x160($sp) /* 330C60 E001C350 AFB00158 */ sw $s0, 0x158($sp) /* 330C64 E001C354 F7B60188 */ sdc1 $f22, 0x188($sp) /* 330C68 E001C358 F7B40180 */ sdc1 $f20, 0x180($sp) /* 330C6C E001C35C 8E230000 */ lw $v1, 0x0($s1) /* 330C70 E001C360 36F71630 */ ori $s7, $s7, (0x11630 & 0xFFFF) /* 330C74 E001C364 0060282D */ daddu $a1, $v1, $zero /* 330C78 E001C368 24630008 */ addiu $v1, $v1, 0x8 /* 330C7C E001C36C AE230000 */ sw $v1, 0x0($s1) /* 330C80 E001C370 8CD6000C */ lw $s6, 0xC($a2) /* 330C84 E001C374 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 330C88 E001C378 ACA20000 */ sw $v0, 0x0($a1) /* 330C8C E001C37C ACA00004 */ sw $zero, 0x4($a1) /* 330C90 E001C380 AC670000 */ sw $a3, 0x0($v1) /* 330C94 E001C384 8CC50010 */ lw $a1, 0x10($a2) /* 330C98 E001C388 24620008 */ addiu $v0, $v1, 0x8 /* 330C9C E001C38C AE220000 */ sw $v0, 0x0($s1) /* 330CA0 E001C390 3C020900 */ lui $v0, %hi(D_09000900_415960) /* 330CA4 E001C394 24420900 */ addiu $v0, $v0, %lo(D_09000900_415960) /* 330CA8 E001C398 8CA5001C */ lw $a1, 0x1C($a1) /* 330CAC E001C39C 3C0ADE00 */ lui $t2, (0xDE000000 >> 16) /* 330CB0 E001C3A0 AC62000C */ sw $v0, 0xC($v1) /* 330CB4 E001C3A4 3C028000 */ lui $v0, (0x80000000 >> 16) /* 330CB8 E001C3A8 AC6A0008 */ sw $t2, 0x8($v1) /* 330CBC E001C3AC 00A22821 */ addu $a1, $a1, $v0 /* 330CC0 E001C3B0 AC650004 */ sw $a1, 0x4($v1) /* 330CC4 E001C3B4 8EC50000 */ lw $a1, 0x0($s6) /* 330CC8 E001C3B8 8EC60004 */ lw $a2, 0x4($s6) /* 330CCC E001C3BC 8EC70008 */ lw $a3, 0x8($s6) /* 330CD0 E001C3C0 24630010 */ addiu $v1, $v1, 0x10 /* 330CD4 E001C3C4 0C080108 */ jal shim_guTranslateF /* 330CD8 E001C3C8 AE230000 */ sw $v1, 0x0($s1) /* 330CDC E001C3CC 27B000D8 */ addiu $s0, $sp, 0xD8 /* 330CE0 E001C3D0 4480A000 */ mtc1 $zero, $f20 /* 330CE4 E001C3D4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 330CE8 E001C3D8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 330CEC E001C3DC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 330CF0 E001C3E0 4481B000 */ mtc1 $at, $f22 /* 330CF4 E001C3E4 00031080 */ sll $v0, $v1, 2 /* 330CF8 E001C3E8 00431021 */ addu $v0, $v0, $v1 /* 330CFC E001C3EC 00021080 */ sll $v0, $v0, 2 /* 330D00 E001C3F0 00431023 */ subu $v0, $v0, $v1 /* 330D04 E001C3F4 000218C0 */ sll $v1, $v0, 3 /* 330D08 E001C3F8 00431021 */ addu $v0, $v0, $v1 /* 330D0C E001C3FC 000210C0 */ sll $v0, $v0, 3 /* 330D10 E001C400 4406A000 */ mfc1 $a2, $f20 /* 330D14 E001C404 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 330D18 E001C408 00220821 */ addu $at, $at, $v0 /* 330D1C E001C40C C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 330D20 E001C410 4407B000 */ mfc1 $a3, $f22 /* 330D24 E001C414 46000007 */ neg.s $f0, $f0 /* 330D28 E001C418 44050000 */ mfc1 $a1, $f0 /* 330D2C E001C41C 0200202D */ daddu $a0, $s0, $zero /* 330D30 E001C420 0C080104 */ jal shim_guRotateF /* 330D34 E001C424 E7B40010 */ swc1 $f20, 0x10($sp) /* 330D38 E001C428 0200202D */ daddu $a0, $s0, $zero /* 330D3C E001C42C 27A50018 */ addiu $a1, $sp, 0x18 /* 330D40 E001C430 27B40118 */ addiu $s4, $sp, 0x118 /* 330D44 E001C434 0C080114 */ jal shim_guMtxCatF /* 330D48 E001C438 0280302D */ daddu $a2, $s4, $zero /* 330D4C E001C43C 0280202D */ daddu $a0, $s4, $zero /* 330D50 E001C440 3C128007 */ lui $s2, %hi(gMatrixListPos) /* 330D54 E001C444 265241F0 */ addiu $s2, $s2, %lo(gMatrixListPos) /* 330D58 E001C448 3C15800A */ lui $s5, %hi(gDisplayContext) /* 330D5C E001C44C 26B5A674 */ addiu $s5, $s5, %lo(gDisplayContext) /* 330D60 E001C450 96450000 */ lhu $a1, 0x0($s2) /* 330D64 E001C454 8EA20000 */ lw $v0, 0x0($s5) /* 330D68 E001C458 00052980 */ sll $a1, $a1, 6 /* 330D6C E001C45C 00B72821 */ addu $a1, $a1, $s7 /* 330D70 E001C460 0C080118 */ jal shim_guMtxF2L /* 330D74 E001C464 00452821 */ addu $a1, $v0, $a1 /* 330D78 E001C468 3C1EDA38 */ lui $fp, (0xDA380000 >> 16) /* 330D7C E001C46C 27B30058 */ addiu $s3, $sp, 0x58 /* 330D80 E001C470 8E280000 */ lw $t0, 0x0($s1) /* 330D84 E001C474 4406B000 */ mfc1 $a2, $f22 /* 330D88 E001C478 4407A000 */ mfc1 $a3, $f20 /* 330D8C E001C47C 96490000 */ lhu $t1, 0x0($s2) /* 330D90 E001C480 0100202D */ daddu $a0, $t0, $zero /* 330D94 E001C484 25080008 */ addiu $t0, $t0, 0x8 /* 330D98 E001C488 3122FFFF */ andi $v0, $t1, 0xFFFF /* 330D9C E001C48C 00021180 */ sll $v0, $v0, 6 /* 330DA0 E001C490 00571021 */ addu $v0, $v0, $s7 /* 330DA4 E001C494 AC9E0000 */ sw $fp, 0x0($a0) /* 330DA8 E001C498 8EA30000 */ lw $v1, 0x0($s5) /* 330DAC E001C49C 25290001 */ addiu $t1, $t1, 0x1 /* 330DB0 E001C4A0 00621821 */ addu $v1, $v1, $v0 /* 330DB4 E001C4A4 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 330DB8 E001C4A8 AC830004 */ sw $v1, 0x4($a0) /* 330DBC E001C4AC AD020000 */ sw $v0, 0x0($t0) /* 330DC0 E001C4B0 240200FF */ addiu $v0, $zero, 0xFF /* 330DC4 E001C4B4 AD020004 */ sw $v0, 0x4($t0) /* 330DC8 E001C4B8 E7B40010 */ swc1 $f20, 0x10($sp) /* 330DCC E001C4BC 8EC50018 */ lw $a1, 0x18($s6) /* 330DD0 E001C4C0 0260202D */ daddu $a0, $s3, $zero /* 330DD4 E001C4C4 AE280000 */ sw $t0, 0x0($s1) /* 330DD8 E001C4C8 25080008 */ addiu $t0, $t0, 0x8 /* 330DDC E001C4CC A6490000 */ sh $t1, 0x0($s2) /* 330DE0 E001C4D0 0C080104 */ jal shim_guRotateF /* 330DE4 E001C4D4 AE280000 */ sw $t0, 0x0($s1) /* 330DE8 E001C4D8 27B00098 */ addiu $s0, $sp, 0x98 /* 330DEC E001C4DC E7B40010 */ swc1 $f20, 0x10($sp) /* 330DF0 E001C4E0 8EC5001C */ lw $a1, 0x1C($s6) /* 330DF4 E001C4E4 4406A000 */ mfc1 $a2, $f20 /* 330DF8 E001C4E8 4407B000 */ mfc1 $a3, $f22 /* 330DFC E001C4EC 0C080104 */ jal shim_guRotateF /* 330E00 E001C4F0 0200202D */ daddu $a0, $s0, $zero /* 330E04 E001C4F4 0260202D */ daddu $a0, $s3, $zero /* 330E08 E001C4F8 0200282D */ daddu $a1, $s0, $zero /* 330E0C E001C4FC 0C080114 */ jal shim_guMtxCatF /* 330E10 E001C500 0280302D */ daddu $a2, $s4, $zero /* 330E14 E001C504 0280202D */ daddu $a0, $s4, $zero /* 330E18 E001C508 96450000 */ lhu $a1, 0x0($s2) /* 330E1C E001C50C 8EA20000 */ lw $v0, 0x0($s5) /* 330E20 E001C510 00052980 */ sll $a1, $a1, 6 /* 330E24 E001C514 00B72821 */ addu $a1, $a1, $s7 /* 330E28 E001C518 0C080118 */ jal shim_guMtxF2L /* 330E2C E001C51C 00452821 */ addu $a1, $v0, $a1 /* 330E30 E001C520 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 330E34 E001C524 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 330E38 E001C528 8E240000 */ lw $a0, 0x0($s1) /* 330E3C E001C52C 96420000 */ lhu $v0, 0x0($s2) /* 330E40 E001C530 0080282D */ daddu $a1, $a0, $zero /* 330E44 E001C534 24840008 */ addiu $a0, $a0, 0x8 /* 330E48 E001C538 24430001 */ addiu $v1, $v0, 0x1 /* 330E4C E001C53C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 330E50 E001C540 00021180 */ sll $v0, $v0, 6 /* 330E54 E001C544 AE240000 */ sw $a0, 0x0($s1) /* 330E58 E001C548 ACBE0000 */ sw $fp, 0x0($a1) /* 330E5C E001C54C A6430000 */ sh $v1, 0x0($s2) /* 330E60 E001C550 8EA30000 */ lw $v1, 0x0($s5) /* 330E64 E001C554 00571021 */ addu $v0, $v0, $s7 /* 330E68 E001C558 00621821 */ addu $v1, $v1, $v0 /* 330E6C E001C55C 24820008 */ addiu $v0, $a0, 0x8 /* 330E70 E001C560 ACA30004 */ sw $v1, 0x4($a1) /* 330E74 E001C564 3C0ADE00 */ lui $t2, (0xDE000000 >> 16) /* 330E78 E001C568 AE220000 */ sw $v0, 0x0($s1) /* 330E7C E001C56C 3C020900 */ lui $v0, %hi(D_090009E8_415A48) /* 330E80 E001C570 244209E8 */ addiu $v0, $v0, %lo(D_090009E8_415A48) /* 330E84 E001C574 AC820004 */ sw $v0, 0x4($a0) /* 330E88 E001C578 24820010 */ addiu $v0, $a0, 0x10 /* 330E8C E001C57C 24030040 */ addiu $v1, $zero, 0x40 /* 330E90 E001C580 AC8A0000 */ sw $t2, 0x0($a0) /* 330E94 E001C584 AE220000 */ sw $v0, 0x0($s1) /* 330E98 E001C588 24820018 */ addiu $v0, $a0, 0x18 /* 330E9C E001C58C AC860008 */ sw $a2, 0x8($a0) /* 330EA0 E001C590 AC83000C */ sw $v1, 0xC($a0) /* 330EA4 E001C594 AE220000 */ sw $v0, 0x0($s1) /* 330EA8 E001C598 AC860010 */ sw $a2, 0x10($a0) /* 330EAC E001C59C AC830014 */ sw $v1, 0x14($a0) /* 330EB0 E001C5A0 8FBF017C */ lw $ra, 0x17C($sp) /* 330EB4 E001C5A4 8FBE0178 */ lw $fp, 0x178($sp) /* 330EB8 E001C5A8 8FB70174 */ lw $s7, 0x174($sp) /* 330EBC E001C5AC 8FB60170 */ lw $s6, 0x170($sp) /* 330EC0 E001C5B0 8FB5016C */ lw $s5, 0x16C($sp) /* 330EC4 E001C5B4 8FB40168 */ lw $s4, 0x168($sp) /* 330EC8 E001C5B8 8FB30164 */ lw $s3, 0x164($sp) /* 330ECC E001C5BC 8FB20160 */ lw $s2, 0x160($sp) /* 330ED0 E001C5C0 8FB1015C */ lw $s1, 0x15C($sp) /* 330ED4 E001C5C4 8FB00158 */ lw $s0, 0x158($sp) /* 330ED8 E001C5C8 D7B60188 */ ldc1 $f22, 0x188($sp) /* 330EDC E001C5CC D7B40180 */ ldc1 $f20, 0x180($sp) /* 330EE0 E001C5D0 03E00008 */ jr $ra /* 330EE4 E001C5D4 27BD0190 */ addiu $sp, $sp, 0x190 /* 330EE8 E001C5D8 00000000 */ nop /* 330EEC E001C5DC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void snowflake_appendGfx(void* effect) { Matrix4f sp18, sp58, sp98, spD8, sp118; EffectInstance* effectTemp = effect; SnowflakeFXData* data = effectTemp->data.snowflake; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09000900_331800); shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z); shim_guRotateF(spD8, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(spD8, sp18, sp118); shim_guMtxF2L(sp118, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 255); shim_guRotateF(sp58, data->unk_18, 1.0f, 0.0f, 0.0f); shim_guRotateF(sp98, data->unk_1C, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp98, sp118); shim_guMtxF2L(sp118, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090009E8_3318E8); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80240FDC /* 16F8BC 80240FDC 27BDFFD8 */ addiu $sp, $sp, -0x28 glabel func_80240FE0 /* 16F8C0 80240FE0 AFB40020 */ sw $s4, 0x20($sp) glabel func_80240FE4 /* 16F8C4 80240FE4 3C14800E */ lui $s4, %hi(gBattleStatus) glabel func_80240FE8 /* 16F8C8 80240FE8 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus) glabel end_00_CharAnim_HoldClearImgFX /* 16F8CC 80240FEC AFB3001C */ sw $s3, 0x1C($sp) glabel func_80240FF0 /* 16F8D0 80240FF0 3C13800B */ lui $s3, %hi(gCurrentEncounter) glabel omo_04_FlyingAI_Jump /* 16F8D4 80240FF4 26730F10 */ addiu $s3, $s3, %lo(gCurrentEncounter) glabel func_80240FF8 /* 16F8D8 80240FF8 AFB00010 */ sw $s0, 0x10($sp) glabel func_80240FFC /* 16F8DC 80240FFC 3C108011 */ lui $s0, %hi(gPlayerData) glabel dead_flo_16_FlyingAI_Wander /* 16F8E0 80241000 2610F290 */ addiu $s0, $s0, %lo(gPlayerData) glabel pra_28_GetItemName /* 16F8E4 80241004 AFBF0024 */ sw $ra, 0x24($sp) glabel func_80241008 /* 16F8E8 80241008 AFB20018 */ sw $s2, 0x18($sp) D_8024100C: /* 16F8EC 8024100C AFB10014 */ sw $s1, 0x14($sp) glabel func_80241010 /* 16F8F0 80241010 8E820004 */ lw $v0, 0x4($s4) glabel func_80241014 /* 16F8F4 80241014 30420040 */ andi $v0, $v0, 0x40 glabel func_80241018 /* 16F8F8 80241018 14400055 */ bnez $v0, mgm_00_GetAvailableGamesCount glabel dead_flo_13_FlyingAI_LosePlayer /* 16F8FC 8024101C 24110003 */ addiu $s1, $zero, 0x3 glabel func_80241020 /* 16F900 80241020 8282008A */ lb $v0, 0x8A($s4) glabel func_80241024 /* 16F904 80241024 10510052 */ beq $v0, $s1, mgm_00_GetAvailableGamesCount glabel UpdateAntiGuyPosition /* 16F908 80241028 24120004 */ addiu $s2, $zero, 0x4 glabel func_8024102C /* 16F90C 8024102C 10520050 */ beq $v0, $s2, mgm_00_GetAvailableGamesCount glabel func_80241030 /* 16F910 80241030 00000000 */ nop .L80241034: /* 16F914 80241034 8202028A */ lb $v0, 0x28A($s0) glabel func_80241038 /* 16F918 80241038 1840004D */ blez $v0, mgm_00_GetAvailableGamesCount glabel func_8024103C /* 16F91C 8024103C 00000000 */ nop glabel func_80241040 /* 16F920 80241040 8602028C */ lh $v0, 0x28C($s0) flo_19_pad_1044: /* 16F924 80241044 1C400039 */ bgtz $v0, func_8024112C glabel .L80241048 /* 16F928 80241048 00000000 */ nop D_8024104C: /* 16F92C 8024104C 0C00A67F */ jal rand_int D_80241050: /* 16F930 80241050 24040064 */ addiu $a0, $zero, 0x64 glabel func_80241054 /* 16F934 80241054 8E63008C */ lw $v1, 0x8C($s3) glabel func_80241058 /* 16F938 80241058 10600018 */ beqz $v1, func_802410BC .L8024105C: /* 16F93C 8024105C 0040202D */ daddu $a0, $v0, $zero glabel omo_04_FlyingAI_ChaseInit /* 16F940 80241060 8C620000 */ lw $v0, 0x0($v1) glabel func_80241064 /* 16F944 80241064 3C030004 */ lui $v1, (0x40000 >> 16) glabel func_80241068 /* 16F948 80241068 00431024 */ and $v0, $v0, $v1 glabel func_8024106C /* 16F94C 8024106C 10400008 */ beqz $v0, mgm_01_OnBreakBlock glabel func_80241070 /* 16F950 80241070 2882002E */ slti $v0, $a0, 0x2E glabel func_80241074 /* 16F954 80241074 14400014 */ bnez $v0, func_802410C8 glabel pra_35_PatrolAI_Move /* 16F958 80241078 24020001 */ addiu $v0, $zero, 0x1 glabel func_8024107C /* 16F95C 8024107C 2882005B */ slti $v0, $a0, 0x5B glabel func_80241080 /* 16F960 80241080 14400016 */ bnez $v0, D_802410DC glabel func_80241084 /* 16F964 80241084 24020002 */ addiu $v0, $zero, 0x2 glabel sam_07_PiranhaPlantAI_10 /* 16F968 80241088 0809043D */ j func_802410F4 glabel func_8024108C /* 16F96C 8024108C A2110289 */ sb $s1, 0x289($s0) glabel mgm_01_OnBreakBlock /* 16F970 80241090 2882001F */ slti $v0, $a0, 0x1F D_80241094: /* 16F974 80241094 1440000C */ bnez $v0, func_802410C8 glabel func_80241098 /* 16F978 80241098 24020001 */ addiu $v0, $zero, 0x1 glabel func_8024109C /* 16F97C 8024109C 2882003D */ slti $v0, $a0, 0x3D D_802410A0: /* 16F980 802410A0 1440000E */ bnez $v0, D_802410DC glabel omo_09_PatrolAI_Move /* 16F984 802410A4 24020002 */ addiu $v0, $zero, 0x2 D_802410A8: /* 16F988 802410A8 28820051 */ slti $v0, $a0, 0x51 D_802410AC: /* 16F98C 802410AC 54400011 */ bnel $v0, $zero, func_802410F4 glabel omo_02_GuardAI_AlertInit /* 16F990 802410B0 A2110289 */ sb $s1, 0x289($s0) glabel func_802410B4 /* 16F994 802410B4 0809043D */ j func_802410F4 glabel func_802410B8 /* 16F998 802410B8 A2120289 */ sb $s2, 0x289($s0) glabel func_802410BC /* 16F99C 802410BC 2882001F */ slti $v0, $a0, 0x1F glabel func_802410C0 /* 16F9A0 802410C0 10400003 */ beqz $v0, func_802410D0 glabel func_802410C4 /* 16F9A4 802410C4 24020001 */ addiu $v0, $zero, 0x1 glabel func_802410C8 /* 16F9A8 802410C8 0809043D */ j func_802410F4 glabel func_802410CC /* 16F9AC 802410CC A2020289 */ sb $v0, 0x289($s0) glabel func_802410D0 /* 16F9B0 802410D0 2882003D */ slti $v0, $a0, 0x3D glabel func_802410D4 /* 16F9B4 802410D4 10400003 */ beqz $v0, func_802410E4_EB9F34 .L802410D8: /* 16F9B8 802410D8 24020002 */ addiu $v0, $zero, 0x2 D_802410DC: /* 16F9BC 802410DC 0809043D */ j func_802410F4 glabel func_802410E0 /* 16F9C0 802410E0 A2020289 */ sb $v0, 0x289($s0) glabel func_802410E4_EB9F34 /* 16F9C4 802410E4 28820051 */ slti $v0, $a0, 0x51 .L802410E8: /* 16F9C8 802410E8 50400002 */ beql $v0, $zero, func_802410F4 glabel func_802410EC /* 16F9CC 802410EC A2120289 */ sb $s2, 0x289($s0) D_802410F0: /* 16F9D0 802410F0 A2110289 */ sb $s1, 0x289($s0) glabel func_802410F4 /* 16F9D4 802410F4 82030289 */ lb $v1, 0x289($s0) D_802410F8: /* 16F9D8 802410F8 24020004 */ addiu $v0, $zero, 0x4 glabel func_802410FC /* 16F9DC 802410FC 10620006 */ beq $v1, $v0, D_80241118 glabel omo_07_PatrolNoAttackAI_Main /* 16F9E0 80241100 2402FFFF */ addiu $v0, $zero, -0x1 glabel func_80241104 /* 16F9E4 80241104 8603028C */ lh $v1, 0x28C($s0) glabel func_80241108 /* 16F9E8 80241108 10620004 */ beq $v1, $v0, func_8024111C glabel func_8024110C /* 16F9EC 8024110C 24040005 */ addiu $a0, $zero, 0x5 glabel func_80241110 /* 16F9F0 80241110 08090447 */ j func_8024111C glabel dead_flo_09_FlyingAI_Chase /* 16F9F4 80241114 00000000 */ nop D_80241118: /* 16F9F8 80241118 24040008 */ addiu $a0, $zero, 0x8 glabel func_8024111C /* 16F9FC 8024111C 0C00A67F */ jal rand_int glabel func_80241120 /* 16FA00 80241120 00000000 */ nop glabel func_80241124 /* 16FA04 80241124 24440005 */ addiu $a0, $v0, 0x5 glabel func_80241128 /* 16FA08 80241128 A604028C */ sh $a0, 0x28C($s0) glabel func_8024112C /* 16FA0C 8024112C 92040289 */ lbu $a0, 0x289($s0) glabel func_80241130 /* 16FA10 80241130 2482FFFD */ addiu $v0, $a0, -0x3 glabel func_80241134 /* 16FA14 80241134 2C420002 */ sltiu $v0, $v0, 0x2 glabel func_80241138 /* 16FA18 80241138 1040000D */ beqz $v0, mgm_00_GetAvailableGamesCount glabel func_8024113C /* 16FA1C 8024113C 00000000 */ nop .L80241140: /* 16FA20 80241140 8602028C */ lh $v0, 0x28C($s0) glabel func_80241144 /* 16FA24 80241144 9603028C */ lhu $v1, 0x28C($s0) glabel .L80241148 /* 16FA28 80241148 28420002 */ slti $v0, $v0, 0x2 glabel func_8024114C /* 16FA2C 8024114C 14400003 */ bnez $v0, func_8024115C glabel func_80241150 /* 16FA30 80241150 2462FFFF */ addiu $v0, $v1, -0x1 glabel func_80241154 /* 16FA34 80241154 0809045C */ j mgm_00_GetAvailableGamesCount glabel pra_37_MeleeHitbox_CanSeePlayer /* 16FA38 80241158 A602028C */ sh $v0, 0x28C($s0) glabel func_8024115C /* 16FA3C 8024115C 9202028A */ lbu $v0, 0x28A($s0) glabel func_80241160 /* 16FA40 80241160 A284008A */ sb $a0, 0x8A($s4) glabel func_80241164 /* 16FA44 80241164 A600028C */ sh $zero, 0x28C($s0) glabel func_80241168 /* 16FA48 80241168 2442FFFF */ addiu $v0, $v0, -0x1 D_8024116C: /* 16FA4C 8024116C A202028A */ sb $v0, 0x28A($s0) glabel mgm_00_GetAvailableGamesCount /* 16FA50 80241170 8FBF0024 */ lw $ra, 0x24($sp) glabel func_80241174 /* 16FA54 80241174 8FB40020 */ lw $s4, 0x20($sp) glabel dead_flo_09_FlyingAI_LosePlayer /* 16FA58 80241178 8FB3001C */ lw $s3, 0x1C($sp) .L8024117C: /* 16FA5C 8024117C 8FB20018 */ lw $s2, 0x18($sp) glabel func_80241180 /* 16FA60 80241180 8FB10014 */ lw $s1, 0x14($sp) .L80241184: /* 16FA64 80241184 8FB00010 */ lw $s0, 0x10($sp) glabel omo_02_GuardAI_ChaseInit /* 16FA68 80241188 03E00008 */ jr $ra D_8024118C: /* 16FA6C 8024118C 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void btl_merlee_on_first_strike(void) { BattleStatus* battleStatus = &gBattleStatus; EncounterStatus* currentEncounter = &gCurrentEncounter; PlayerData* playerData = &gPlayerData; do { if (!(gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) && battleStatus->nextMerleeSpellType != MERLEE_SPELL_EXP_BOOST && battleStatus->nextMerleeSpellType != MERLEE_SPELL_COIN_BOOST && playerData->merleeCastsLeft > 0) { if (playerData->merleeTurnCount <= 0) { s32 temp = rand_int(100); if (currentEncounter->currentEnemy != NULL) { if (currentEncounter->currentEnemy->flags & ACTOR_FLAG_NO_HEALTH_BAR) { if (temp <= 45) { playerData->merleeSpellType = MERLEE_SPELL_1; } else if (temp <= 90) { playerData->merleeSpellType = MERLEE_SPELL_2; } else { playerData->merleeSpellType = MERLEE_SPELL_EXP_BOOST; } } else if (temp <= 30) { playerData->merleeSpellType = MERLEE_SPELL_1; } else if (temp <= 60) { playerData->merleeSpellType = MERLEE_SPELL_2; } else if (temp <= 80) { playerData->merleeSpellType = MERLEE_SPELL_EXP_BOOST; } else { playerData->merleeSpellType = MERLEE_SPELL_COIN_BOOST; } } else if (temp <= 30) { playerData->merleeSpellType = MERLEE_SPELL_1; } else if (temp <= 60) { playerData->merleeSpellType = MERLEE_SPELL_2; } else if (temp <= 80) { playerData->merleeSpellType = MERLEE_SPELL_EXP_BOOST; } else { playerData->merleeSpellType = MERLEE_SPELL_COIN_BOOST; } if (playerData->merleeSpellType != MERLEE_SPELL_COIN_BOOST) { // same outcome either way. has to be written like this, and the check does exist in the code. bug? if (playerData->merleeTurnCount == -1) { temp = rand_int(5) + 5; } else { temp = rand_int(5) + 5; } } else { temp = rand_int(8) + 5; } playerData->merleeTurnCount = temp; } if (playerData->merleeSpellType == MERLEE_SPELL_EXP_BOOST || playerData->merleeSpellType == MERLEE_SPELL_COIN_BOOST) { if (playerData->merleeTurnCount >= 2) { playerData->merleeTurnCount--; } else { battleStatus->nextMerleeSpellType = playerData->merleeSpellType; playerData->merleeTurnCount = 0; playerData->merleeCastsLeft--; } } } } while (0); // TODO: required to match }
### RAW ASSEMBLY INSTRUCTIONS: glabel damage_stars_update /* 342870 E0030730 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 342874 E0030734 AFB40020 */ sw $s4, 0x20($sp) /* 342878 E0030738 0080A02D */ daddu $s4, $a0, $zero /* 34287C E003073C AFBF002C */ sw $ra, 0x2C($sp) /* 342880 E0030740 AFB60028 */ sw $s6, 0x28($sp) /* 342884 E0030744 AFB50024 */ sw $s5, 0x24($sp) /* 342888 E0030748 AFB3001C */ sw $s3, 0x1C($sp) /* 34288C E003074C AFB20018 */ sw $s2, 0x18($sp) /* 342890 E0030750 AFB10014 */ sw $s1, 0x14($sp) /* 342894 E0030754 AFB00010 */ sw $s0, 0x10($sp) /* 342898 E0030758 F7BA0048 */ sdc1 $f26, 0x48($sp) /* 34289C E003075C F7B80040 */ sdc1 $f24, 0x40($sp) /* 3428A0 E0030760 F7B60038 */ sdc1 $f22, 0x38($sp) /* 3428A4 E0030764 F7B40030 */ sdc1 $f20, 0x30($sp) /* 3428A8 E0030768 8E91000C */ lw $s1, 0xC($s4) /* 3428AC E003076C 8E220028 */ lw $v0, 0x28($s1) /* 3428B0 E0030770 2442FFFF */ addiu $v0, $v0, -0x1 /* 3428B4 E0030774 AE220028 */ sw $v0, 0x28($s1) /* 3428B8 E0030778 8E22002C */ lw $v0, 0x2C($s1) /* 3428BC E003077C 8E240028 */ lw $a0, 0x28($s1) /* 3428C0 E0030780 24430001 */ addiu $v1, $v0, 0x1 /* 3428C4 E0030784 04810005 */ bgez $a0, .LE003079C /* 3428C8 E0030788 AE23002C */ sw $v1, 0x2C($s1) /* 3428CC E003078C 0C080128 */ jal shim_remove_effect /* 3428D0 E0030790 0280202D */ daddu $a0, $s4, $zero /* 3428D4 E0030794 0800C27B */ j .LE00309EC /* 3428D8 E0030798 00000000 */ nop .LE003079C: /* 3428DC E003079C 0000902D */ daddu $s2, $zero, $zero /* 3428E0 E00307A0 8E820008 */ lw $v0, 0x8($s4) /* 3428E4 E00307A4 18400091 */ blez $v0, .LE00309EC /* 3428E8 E00307A8 0080982D */ daddu $s3, $a0, $zero /* 3428EC E00307AC 00031040 */ sll $v0, $v1, 1 /* 3428F0 E00307B0 00431021 */ addu $v0, $v0, $v1 /* 3428F4 E00307B4 0002B040 */ sll $s6, $v0, 1 /* 3428F8 E00307B8 2662FFFA */ addiu $v0, $s3, -0x6 /* 3428FC E00307BC 2C55000E */ sltiu $s5, $v0, 0xE /* 342900 E00307C0 2630001C */ addiu $s0, $s1, 0x1C /* 342904 E00307C4 3C01E003 */ lui $at, (0xE0030ED8 >> 16) /* 342908 E00307C8 D43A0ED8 */ ldc1 $f26, (0xE0030ED8 & 0xFFFF)($at) /* 34290C E00307CC 3C01E003 */ lui $at, (0xE0030EE0 >> 16) /* 342910 E00307D0 D4340EE0 */ ldc1 $f20, (0xE0030EE0 & 0xFFFF)($at) /* 342914 E00307D4 3C01E003 */ lui $at, (0xE0030EE8 >> 16) /* 342918 E00307D8 D4380EE8 */ ldc1 $f24, (0xE0030EE8 & 0xFFFF)($at) /* 34291C E00307DC 3C01E003 */ lui $at, (0xE0030EF0 >> 16) /* 342920 E00307E0 D4360EF0 */ ldc1 $f22, (0xE0030EF0 & 0xFFFF)($at) .LE00307E4: /* 342924 E00307E4 8E230000 */ lw $v1, 0x0($s1) /* 342928 E00307E8 24020002 */ addiu $v0, $zero, 0x2 /* 34292C E00307EC 14620029 */ bne $v1, $v0, .LE0030894 /* 342930 E00307F0 2A620006 */ slti $v0, $s3, 0x6 /* 342934 E00307F4 44966000 */ mtc1 $s6, $f12 /* 342938 E00307F8 00000000 */ nop /* 34293C E00307FC 0C080144 */ jal shim_cos_deg /* 342940 E0030800 46806320 */ cvt.s.w $f12, $f12 /* 342944 E0030804 C604FFF4 */ lwc1 $f4, -0xC($s0) /* 342948 E0030808 46002121 */ cvt.d.s $f4, $f4 /* 34294C E003080C 463A2102 */ mul.d $f4, $f4, $f26 /* 342950 E0030810 00000000 */ nop /* 342954 E0030814 3C014080 */ lui $at, (0x40800000 >> 16) /* 342958 E0030818 44811000 */ mtc1 $at, $f2 /* 34295C E003081C 00000000 */ nop /* 342960 E0030820 46020002 */ mul.s $f0, $f0, $f2 /* 342964 E0030824 00000000 */ nop /* 342968 E0030828 C602FFFC */ lwc1 $f2, -0x4($s0) /* 34296C E003082C 460010A1 */ cvt.d.s $f2, $f2 /* 342970 E0030830 463A1082 */ mul.d $f2, $f2, $f26 /* 342974 E0030834 00000000 */ nop /* 342978 E0030838 E600FFF8 */ swc1 $f0, -0x8($s0) /* 34297C E003083C 46202120 */ cvt.s.d $f4, $f4 /* 342980 E0030840 E604FFF4 */ swc1 $f4, -0xC($s0) /* 342984 E0030844 46000106 */ mov.s $f4, $f0 /* 342988 E0030848 44800000 */ mtc1 $zero, $f0 /* 34298C E003084C 462010A0 */ cvt.s.d $f2, $f2 /* 342990 E0030850 4600203C */ c.lt.s $f4, $f0 /* 342994 E0030854 00000000 */ nop /* 342998 E0030858 4500004E */ bc1f .LE0030994 /* 34299C E003085C E602FFFC */ swc1 $f2, -0x4($s0) /* 3429A0 E0030860 C6020008 */ lwc1 $f2, 0x8($s0) /* 3429A4 E0030864 468010A1 */ cvt.d.w $f2, $f2 /* 3429A8 E0030868 46381082 */ mul.d $f2, $f2, $f24 /* 3429AC E003086C 00000000 */ nop /* 3429B0 E0030870 C6000004 */ lwc1 $f0, 0x4($s0) /* 3429B4 E0030874 46000021 */ cvt.d.s $f0, $f0 /* 3429B8 E0030878 46340002 */ mul.d $f0, $f0, $f20 /* 3429BC E003087C 00000000 */ nop /* 3429C0 E0030880 4620128D */ trunc.w.d $f10, $f2 /* 3429C4 E0030884 E60A0008 */ swc1 $f10, 0x8($s0) /* 3429C8 E0030888 46200020 */ cvt.s.d $f0, $f0 /* 3429CC E003088C 0800C265 */ j .LE0030994 /* 3429D0 E0030890 E6000004 */ swc1 $f0, 0x4($s0) .LE0030894: /* 3429D4 E0030894 14400013 */ bnez $v0, .LE00308E4 /* 3429D8 E0030898 00000000 */ nop /* 3429DC E003089C C604FFF4 */ lwc1 $f4, -0xC($s0) /* 3429E0 E00308A0 46002121 */ cvt.d.s $f4, $f4 /* 3429E4 E00308A4 46342102 */ mul.d $f4, $f4, $f20 /* 3429E8 E00308A8 00000000 */ nop /* 3429EC E00308AC C602FFF8 */ lwc1 $f2, -0x8($s0) /* 3429F0 E00308B0 460010A1 */ cvt.d.s $f2, $f2 /* 3429F4 E00308B4 46341082 */ mul.d $f2, $f2, $f20 /* 3429F8 E00308B8 00000000 */ nop /* 3429FC E00308BC C600FFFC */ lwc1 $f0, -0x4($s0) /* 342A00 E00308C0 46000021 */ cvt.d.s $f0, $f0 /* 342A04 E00308C4 46340002 */ mul.d $f0, $f0, $f20 /* 342A08 E00308C8 00000000 */ nop /* 342A0C E00308CC 46202120 */ cvt.s.d $f4, $f4 /* 342A10 E00308D0 462010A0 */ cvt.s.d $f2, $f2 /* 342A14 E00308D4 46200020 */ cvt.s.d $f0, $f0 /* 342A18 E00308D8 E604FFF4 */ swc1 $f4, -0xC($s0) /* 342A1C E00308DC E602FFF8 */ swc1 $f2, -0x8($s0) /* 342A20 E00308E0 E600FFFC */ swc1 $f0, -0x4($s0) .LE00308E4: /* 342A24 E00308E4 12A0000B */ beqz $s5, .LE0030914 /* 342A28 E00308E8 2A620005 */ slti $v0, $s3, 0x5 /* 342A2C E00308EC 8E220000 */ lw $v0, 0x0($s1) /* 342A30 E00308F0 54400029 */ bnel $v0, $zero, .LE0030998 /* 342A34 E00308F4 26520001 */ addiu $s2, $s2, 0x1 /* 342A38 E00308F8 C6000004 */ lwc1 $f0, 0x4($s0) /* 342A3C E00308FC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 342A40 E0030900 44811000 */ mtc1 $at, $f2 /* 342A44 E0030904 00000000 */ nop /* 342A48 E0030908 46020000 */ add.s $f0, $f0, $f2 /* 342A4C E003090C 0800C265 */ j .LE0030994 /* 342A50 E0030910 E6000004 */ swc1 $f0, 0x4($s0) .LE0030914: /* 342A54 E0030914 50400020 */ beql $v0, $zero, .LE0030998 /* 342A58 E0030918 26520001 */ addiu $s2, $s2, 0x1 /* 342A5C E003091C C6080008 */ lwc1 $f8, 0x8($s0) /* 342A60 E0030920 46804221 */ cvt.d.w $f8, $f8 /* 342A64 E0030924 46384202 */ mul.d $f8, $f8, $f24 /* 342A68 E0030928 00000000 */ nop /* 342A6C E003092C C6060004 */ lwc1 $f6, 0x4($s0) /* 342A70 E0030930 460031A1 */ cvt.d.s $f6, $f6 /* 342A74 E0030934 46343182 */ mul.d $f6, $f6, $f20 /* 342A78 E0030938 00000000 */ nop /* 342A7C E003093C C604FFF4 */ lwc1 $f4, -0xC($s0) /* 342A80 E0030940 46002121 */ cvt.d.s $f4, $f4 /* 342A84 E0030944 46362102 */ mul.d $f4, $f4, $f22 /* 342A88 E0030948 00000000 */ nop /* 342A8C E003094C C602FFF8 */ lwc1 $f2, -0x8($s0) /* 342A90 E0030950 460010A1 */ cvt.d.s $f2, $f2 /* 342A94 E0030954 46361082 */ mul.d $f2, $f2, $f22 /* 342A98 E0030958 00000000 */ nop /* 342A9C E003095C C600FFFC */ lwc1 $f0, -0x4($s0) /* 342AA0 E0030960 46000021 */ cvt.d.s $f0, $f0 /* 342AA4 E0030964 46360002 */ mul.d $f0, $f0, $f22 /* 342AA8 E0030968 00000000 */ nop /* 342AAC E003096C 4620428D */ trunc.w.d $f10, $f8 /* 342AB0 E0030970 E60A0008 */ swc1 $f10, 0x8($s0) /* 342AB4 E0030974 462031A0 */ cvt.s.d $f6, $f6 /* 342AB8 E0030978 46202120 */ cvt.s.d $f4, $f4 /* 342ABC E003097C 462010A0 */ cvt.s.d $f2, $f2 /* 342AC0 E0030980 46200020 */ cvt.s.d $f0, $f0 /* 342AC4 E0030984 E6060004 */ swc1 $f6, 0x4($s0) /* 342AC8 E0030988 E604FFF4 */ swc1 $f4, -0xC($s0) /* 342ACC E003098C E602FFF8 */ swc1 $f2, -0x8($s0) /* 342AD0 E0030990 E600FFFC */ swc1 $f0, -0x4($s0) .LE0030994: /* 342AD4 E0030994 26520001 */ addiu $s2, $s2, 0x1 .LE0030998: /* 342AD8 E0030998 C608FFE8 */ lwc1 $f8, -0x18($s0) /* 342ADC E003099C C600FFF4 */ lwc1 $f0, -0xC($s0) /* 342AE0 E00309A0 C606FFEC */ lwc1 $f6, -0x14($s0) /* 342AE4 E00309A4 46004200 */ add.s $f8, $f8, $f0 /* 342AE8 E00309A8 C600FFF8 */ lwc1 $f0, -0x8($s0) /* 342AEC E00309AC C604FFF0 */ lwc1 $f4, -0x10($s0) /* 342AF0 E00309B0 46003180 */ add.s $f6, $f6, $f0 /* 342AF4 E00309B4 C600FFFC */ lwc1 $f0, -0x4($s0) /* 342AF8 E00309B8 C6020004 */ lwc1 $f2, 0x4($s0) /* 342AFC E00309BC 46002100 */ add.s $f4, $f4, $f0 /* 342B00 E00309C0 C6000000 */ lwc1 $f0, 0x0($s0) /* 342B04 E00309C4 26310030 */ addiu $s1, $s1, 0x30 /* 342B08 E00309C8 E608FFE8 */ swc1 $f8, -0x18($s0) /* 342B0C E00309CC 46020000 */ add.s $f0, $f0, $f2 /* 342B10 E00309D0 E606FFEC */ swc1 $f6, -0x14($s0) /* 342B14 E00309D4 E604FFF0 */ swc1 $f4, -0x10($s0) /* 342B18 E00309D8 E6000000 */ swc1 $f0, 0x0($s0) /* 342B1C E00309DC 8E820008 */ lw $v0, 0x8($s4) /* 342B20 E00309E0 0242102A */ slt $v0, $s2, $v0 /* 342B24 E00309E4 1440FF7F */ bnez $v0, .LE00307E4 /* 342B28 E00309E8 26100030 */ addiu $s0, $s0, 0x30 .LE00309EC: /* 342B2C E00309EC 8FBF002C */ lw $ra, 0x2C($sp) /* 342B30 E00309F0 8FB60028 */ lw $s6, 0x28($sp) /* 342B34 E00309F4 8FB50024 */ lw $s5, 0x24($sp) /* 342B38 E00309F8 8FB40020 */ lw $s4, 0x20($sp) /* 342B3C E00309FC 8FB3001C */ lw $s3, 0x1C($sp) /* 342B40 E0030A00 8FB20018 */ lw $s2, 0x18($sp) /* 342B44 E0030A04 8FB10014 */ lw $s1, 0x14($sp) /* 342B48 E0030A08 8FB00010 */ lw $s0, 0x10($sp) /* 342B4C E0030A0C D7BA0048 */ ldc1 $f26, 0x48($sp) /* 342B50 E0030A10 D7B80040 */ ldc1 $f24, 0x40($sp) /* 342B54 E0030A14 D7B60038 */ ldc1 $f22, 0x38($sp) /* 342B58 E0030A18 D7B40030 */ ldc1 $f20, 0x30($sp) /* 342B5C E0030A1C 03E00008 */ jr $ra /* 342B60 E0030A20 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void damage_stars_update(EffectInstance* effect) { DamageStarsFXData* part = effect->data.damageStars; s32 unk_28; s32 unk_2C; s32 i; part->unk_28--; part->unk_2C++; if (part->unk_28 < 0) { shim_remove_effect(effect); return; } unk_28 = part->unk_28; unk_2C = part->unk_2C; for (i = 0; i < effect->numParts; i++, part++) { if (part->unk_00 == 2) { part->unk_14 = shim_cos_deg(unk_2C * 6) * 4.0f; part->unk_10 *= 0.94; part->unk_18 *= 0.94; if (part->unk_14 < 0.0f) { part->unk_20 *= 0.8; part->unk_24 *= 0.6; } } else { if (unk_28 >= 6) { part->unk_10 *= 0.8; part->unk_14 *= 0.8; part->unk_18 *= 0.8; } if (unk_28 >= 6 && unk_28 <= 19) { if (part->unk_00 == 0) { part->unk_20 += 1.0f; } } else if (unk_28 < 5) { part->unk_20 *= 0.8; part->unk_24 *= 0.6; part->unk_10 *= 0.7; part->unk_14 *= 0.7; part->unk_18 *= 0.7; } } part->unk_04 += part->unk_10; part->unk_08 += part->unk_14; part->unk_0C += part->unk_18; part->unk_1C += part->unk_20; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel PartnerPowerBounceEnemy /* 1AEB50 80280270 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 1AEB54 80280274 AFB20018 */ sw $s2, 0x18($sp) /* 1AEB58 80280278 0080902D */ daddu $s2, $a0, $zero /* 1AEB5C 8028027C AFBF0024 */ sw $ra, 0x24($sp) /* 1AEB60 80280280 AFB40020 */ sw $s4, 0x20($sp) /* 1AEB64 80280284 AFB3001C */ sw $s3, 0x1C($sp) /* 1AEB68 80280288 AFB10014 */ sw $s1, 0x14($sp) /* 1AEB6C 8028028C AFB00010 */ sw $s0, 0x10($sp) /* 1AEB70 80280290 8E440148 */ lw $a0, 0x148($s2) /* 1AEB74 80280294 0C09A75B */ jal get_actor /* 1AEB78 80280298 8E50000C */ lw $s0, 0xC($s2) /* 1AEB7C 8028029C 8E140000 */ lw $s4, 0x0($s0) /* 1AEB80 802802A0 26100004 */ addiu $s0, $s0, 0x4 /* 1AEB84 802802A4 8E030000 */ lw $v1, 0x0($s0) /* 1AEB88 802802A8 26100004 */ addiu $s0, $s0, 0x4 /* 1AEB8C 802802AC 0240202D */ daddu $a0, $s2, $zero /* 1AEB90 802802B0 3C11800E */ lui $s1, %hi(gBattleStatus) /* 1AEB94 802802B4 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) /* 1AEB98 802802B8 0040982D */ daddu $s3, $v0, $zero /* 1AEB9C 802802BC AE230188 */ sw $v1, 0x188($s1) /* 1AEBA0 802802C0 8E030000 */ lw $v1, 0x0($s0) /* 1AEBA4 802802C4 26100004 */ addiu $s0, $s0, 0x4 /* 1AEBA8 802802C8 AE23018C */ sw $v1, 0x18C($s1) /* 1AEBAC 802802CC 8E030000 */ lw $v1, 0x0($s0) glabel shop_owner_reset_speech /* 1AEBB0 802802D0 26100004 */ addiu $s0, $s0, 0x4 /* 1AEBB4 802802D4 AE230190 */ sw $v1, 0x190($s1) /* 1AEBB8 802802D8 8E050000 */ lw $a1, 0x0($s0) /* 1AEBBC 802802DC 0C0B1EAF */ jal evt_get_variable /* 1AEBC0 802802E0 26100004 */ addiu $s0, $s0, 0x4 /* 1AEBC4 802802E4 A622017E */ sh $v0, 0x17E($s1) /* 1AEBC8 802802E8 8E050000 */ lw $a1, 0x0($s0) /* 1AEBCC 802802EC 26100004 */ addiu $s0, $s0, 0x4 /* 1AEBD0 802802F0 0C0B1EAF */ jal evt_get_variable /* 1AEBD4 802802F4 0240202D */ daddu $a0, $s2, $zero /* 1AEBD8 802802F8 A2220198 */ sb $v0, 0x198($s1) /* 1AEBDC 802802FC 8E100000 */ lw $s0, 0x0($s0) /* 1AEBE0 80280300 24020030 */ addiu $v0, $zero, 0x30 /* 1AEBE4 80280304 32030030 */ andi $v1, $s0, 0x30 /* 1AEBE8 80280308 54620004 */ bnel $v1, $v0, .L8028031C /* 1AEBEC 8028030C 32020010 */ andi $v0, $s0, 0x10 /* 1AEBF0 80280310 8E220000 */ lw $v0, 0x0($s1) /* 1AEBF4 80280314 080A00D7 */ j shop_owner_end_speech /* 1AEBF8 80280318 34420030 */ ori $v0, $v0, 0x30 .L8028031C: /* 1AEBFC 8028031C 10400004 */ beqz $v0, .L80280330 /* 1AEC00 80280320 2403FFDF */ addiu $v1, $zero, -0x21 /* 1AEC04 80280324 8E220000 */ lw $v0, 0x0($s1) /* 1AEC08 80280328 080A00D6 */ j .L80280358 /* 1AEC0C 8028032C 34420010 */ ori $v0, $v0, 0x10 .L80280330: /* 1AEC10 80280330 32020020 */ andi $v0, $s0, 0x20 /* 1AEC14 80280334 10400005 */ beqz $v0, .L8028034C /* 1AEC18 80280338 2403FFEF */ addiu $v1, $zero, -0x11 /* 1AEC1C 8028033C 8E220000 */ lw $v0, 0x0($s1) /* 1AEC20 80280340 00431024 */ and $v0, $v0, $v1 /* 1AEC24 80280344 080A00D7 */ j shop_owner_end_speech /* 1AEC28 80280348 34420020 */ ori $v0, $v0, 0x20 .L8028034C: /* 1AEC2C 8028034C 8E220000 */ lw $v0, 0x0($s1) /* 1AEC30 80280350 00431024 */ and $v0, $v0, $v1 /* 1AEC34 80280354 2403FFDF */ addiu $v1, $zero, -0x21 .L80280358: /* 1AEC38 80280358 00431024 */ and $v0, $v0, $v1 glabel shop_owner_end_speech /* 1AEC3C 8028035C AE220000 */ sw $v0, 0x0($s1) /* 1AEC40 80280360 32020040 */ andi $v0, $s0, 0x40 /* 1AEC44 80280364 10400007 */ beqz $v0, .L80280384 /* 1AEC48 80280368 2404FFBF */ addiu $a0, $zero, -0x41 /* 1AEC4C 8028036C 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AEC50 80280370 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AEC54 80280374 8C620000 */ lw $v0, 0x0($v1) /* 1AEC58 80280378 34420040 */ ori $v0, $v0, 0x40 /* 1AEC5C 8028037C 080A00E6 */ j .L80280398 /* 1AEC60 80280380 AC620000 */ sw $v0, 0x0($v1) .L80280384: /* 1AEC64 80280384 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AEC68 80280388 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AEC6C 8028038C 8C430000 */ lw $v1, 0x0($v0) /* 1AEC70 80280390 00641824 */ and $v1, $v1, $a0 /* 1AEC74 80280394 AC430000 */ sw $v1, 0x0($v0) .L80280398: /* 1AEC78 80280398 32020200 */ andi $v0, $s0, 0x200 /* 1AEC7C 8028039C 10400007 */ beqz $v0, .L802803BC /* 1AEC80 802803A0 2404FDFF */ addiu $a0, $zero, -0x201 /* 1AEC84 802803A4 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AEC88 802803A8 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AEC8C 802803AC 8C620000 */ lw $v0, 0x0($v1) /* 1AEC90 802803B0 34420200 */ ori $v0, $v0, 0x200 /* 1AEC94 802803B4 080A00F4 */ j .L802803D0 /* 1AEC98 802803B8 AC620000 */ sw $v0, 0x0($v1) .L802803BC: /* 1AEC9C 802803BC 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AECA0 802803C0 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AECA4 802803C4 8C430000 */ lw $v1, 0x0($v0) glabel func_802803C8 /* 1AECA8 802803C8 00641824 */ and $v1, $v1, $a0 /* 1AECAC 802803CC AC430000 */ sw $v1, 0x0($v0) .L802803D0: /* 1AECB0 802803D0 32020080 */ andi $v0, $s0, 0x80 /* 1AECB4 802803D4 10400007 */ beqz $v0, .L802803F4 /* 1AECB8 802803D8 2404FF7F */ addiu $a0, $zero, -0x81 /* 1AECBC 802803DC 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AECC0 802803E0 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AECC4 802803E4 8C620000 */ lw $v0, 0x0($v1) /* 1AECC8 802803E8 34420080 */ ori $v0, $v0, 0x80 /* 1AECCC 802803EC 080A0102 */ j .L80280408 /* 1AECD0 802803F0 AC620000 */ sw $v0, 0x0($v1) .L802803F4: /* 1AECD4 802803F4 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AECD8 802803F8 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AECDC 802803FC 8C430000 */ lw $v1, 0x0($v0) .L80280400: /* 1AECE0 80280400 00641824 */ and $v1, $v1, $a0 /* 1AECE4 80280404 AC430000 */ sw $v1, 0x0($v0) .L80280408: /* 1AECE8 80280408 32020800 */ andi $v0, $s0, 0x800 /* 1AECEC 8028040C 10400007 */ beqz $v0, .L8028042C glabel func_80280410 /* 1AECF0 80280410 2404F7FF */ addiu $a0, $zero, -0x801 /* 1AECF4 80280414 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AECF8 80280418 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AECFC 8028041C 8C620000 */ lw $v0, 0x0($v1) /* 1AED00 80280420 34420800 */ ori $v0, $v0, 0x800 /* 1AED04 80280424 080A0110 */ j .L80280440 /* 1AED08 80280428 AC620000 */ sw $v0, 0x0($v1) .L8028042C: /* 1AED0C 8028042C 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AED10 80280430 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AED14 80280434 8C430000 */ lw $v1, 0x0($v0) /* 1AED18 80280438 00641824 */ and $v1, $v1, $a0 /* 1AED1C 8028043C AC430000 */ sw $v1, 0x0($v0) .L80280440: /* 1AED20 80280440 96620428 */ lhu $v0, 0x428($s3) /* 1AED24 80280444 92230193 */ lbu $v1, 0x193($s1) /* 1AED28 80280448 A62201A0 */ sh $v0, 0x1A0($s1) /* 1AED2C 8028044C 92620426 */ lbu $v0, 0x426($s3) /* 1AED30 80280450 A2230194 */ sb $v1, 0x194($s1) /* 1AED34 80280454 306300FF */ andi $v1, $v1, 0xFF /* 1AED38 80280458 A22201A2 */ sb $v0, 0x1A2($s1) /* 1AED3C 8028045C 240200FF */ addiu $v0, $zero, 0xFF /* 1AED40 80280460 50620001 */ beql $v1, $v0, .L80280468 /* 1AED44 80280464 A2200194 */ sb $zero, 0x194($s1) .L80280468: /* 1AED48 80280468 8E220190 */ lw $v0, 0x190($s1) /* 1AED4C 8028046C 30420F00 */ andi $v0, $v0, 0xF00 /* 1AED50 80280470 00021203 */ sra $v0, $v0, 8 /* 1AED54 80280474 0C09F8CA */ jal calc_partner_damage_enemy /* 1AED58 80280478 A2220195 */ sb $v0, 0x195($s1) /* 1AED5C 8028047C 0440000B */ bltz $v0, .L802804AC /* 1AED60 80280480 0240202D */ daddu $a0, $s2, $zero /* 1AED64 80280484 0280282D */ daddu $a1, $s4, $zero /* 1AED68 80280488 0C0B2026 */ jal evt_set_variable /* 1AED6C 8028048C 0040302D */ daddu $a2, $v0, $zero /* 1AED70 80280490 0C0B1069 */ jal does_script_exist_by_ref /* 1AED74 80280494 0240202D */ daddu $a0, $s2, $zero /* 1AED78 80280498 0040182D */ daddu $v1, $v0, $zero /* 1AED7C 8028049C 10600004 */ beqz $v1, .L802804B0 /* 1AED80 802804A0 240200FF */ addiu $v0, $zero, 0xFF /* 1AED84 802804A4 080A012C */ j .L802804B0 /* 1AED88 802804A8 24020002 */ addiu $v0, $zero, 0x2 .L802804AC: /* 1AED8C 802804AC 240200FF */ addiu $v0, $zero, 0xFF .L802804B0: /* 1AED90 802804B0 8FBF0024 */ lw $ra, 0x24($sp) /* 1AED94 802804B4 8FB40020 */ lw $s4, 0x20($sp) /* 1AED98 802804B8 8FB3001C */ lw $s3, 0x1C($sp) /* 1AED9C 802804BC 8FB20018 */ lw $s2, 0x18($sp) /* 1AEDA0 802804C0 8FB10014 */ lw $s1, 0x14($sp) /* 1AEDA4 802804C4 8FB00010 */ lw $s0, 0x10($sp) /* 1AEDA8 802804C8 03E00008 */ jr $ra /* 1AEDAC 802804CC 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus PartnerPowerBounceEnemy(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; Actor* actor = get_actor(script->owner1.enemyID); s32 returnValue = *args++; s32 flags; u8 statusChance; s32 damageResult; battleStatus->currentAttackElement = *args++; battleStatus->currentAttackEventSuppression = *args++; battleStatus->currentAttackStatus = *args++; battleStatus->currentAttackDamage = evt_get_variable(script, *args++); battleStatus->powerBounceCounter = evt_get_variable(script, *args++); flags = *args++; if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) { battleStatus->flags1 |= BS_FLAGS1_10; battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_10) { battleStatus->flags1 |= BS_FLAGS1_10; battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) { battleStatus->flags1 &= ~BS_FLAGS1_10; battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; } else { battleStatus->flags1 &= ~BS_FLAGS1_10; battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } if (flags & BS_FLAGS1_40) { gBattleStatus.flags1 |= BS_FLAGS1_40; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_40; } if (flags & BS_FLAGS1_200) { gBattleStatus.flags1 |= BS_FLAGS1_200; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_200; } if (flags & BS_FLAGS1_80) { gBattleStatus.flags1 |= BS_FLAGS1_80; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_80; } if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) { gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE; } statusChance = battleStatus->currentAttackStatus; battleStatus->currentTargetID = actor->targetActorID; battleStatus->currentTargetPart = actor->targetPartIndex; battleStatus->statusChance = statusChance; if (statusChance == STATUS_KEY_NEVER) { battleStatus->statusChance = 0; } battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8; damageResult = calc_partner_damage_enemy(); if (damageResult < 0) { return ApiStatus_FINISH; } evt_set_variable(script, returnValue, damageResult); if (!does_script_exist_by_ref(script)) { return ApiStatus_FINISH; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_entity_shadow_position /* A8A44 80112344 27BDFFC0 */ addiu $sp, $sp, -0x40 /* A8A48 80112348 AFB10034 */ sw $s1, 0x34($sp) /* A8A4C 8011234C 0080882D */ daddu $s1, $a0, $zero /* A8A50 80112350 AFBF0038 */ sw $ra, 0x38($sp) /* A8A54 80112354 AFB00030 */ sw $s0, 0x30($sp) /* A8A58 80112358 0C044181 */ jal get_shadow_by_index /* A8A5C 8011235C 86240016 */ lh $a0, 0x16($s1) /* A8A60 80112360 0040802D */ daddu $s0, $v0, $zero /* A8A64 80112364 5200009B */ beql $s0, $zero, .L801125D4 /* A8A68 80112368 AE20006C */ sw $zero, 0x6C($s1) /* A8A6C 8011236C 9222000B */ lbu $v0, 0xB($s1) /* A8A70 80112370 2C4200FF */ sltiu $v0, $v0, 0xFF /* A8A74 80112374 10400005 */ beqz $v0, .L8011238C /* A8A78 80112378 3C030080 */ lui $v1, (0x800000 >> 16) /* A8A7C 8011237C 9222000B */ lbu $v0, 0xB($s1) /* A8A80 80112380 00021042 */ srl $v0, $v0, 1 /* A8A84 80112384 080448E9 */ j .L801123A4 /* A8A88 80112388 A2020005 */ sb $v0, 0x5($s0) .L8011238C: /* A8A8C 8011238C 8E020000 */ lw $v0, 0x0($s0) /* A8A90 80112390 00431024 */ and $v0, $v0, $v1 /* A8A94 80112394 10400002 */ beqz $v0, .L801123A0 /* A8A98 80112398 24040080 */ addiu $a0, $zero, 0x80 /* A8A9C 8011239C 240400A0 */ addiu $a0, $zero, 0xA0 .L801123A0: /* A8AA0 801123A0 A2040005 */ sb $a0, 0x5($s0) .L801123A4: /* A8AA4 801123A4 8E220000 */ lw $v0, 0x0($s1) /* A8AA8 801123A8 30420004 */ andi $v0, $v0, 0x4 /* A8AAC 801123AC 1440000A */ bnez $v0, .L801123D8 /* A8AB0 801123B0 27A40018 */ addiu $a0, $sp, 0x18 /* A8AB4 801123B4 8E030000 */ lw $v1, 0x0($s0) /* A8AB8 801123B8 3C020040 */ lui $v0, (0x400000 >> 16) /* A8ABC 801123BC 00621024 */ and $v0, $v1, $v0 /* A8AC0 801123C0 10400084 */ beqz $v0, .L801125D4 /* A8AC4 801123C4 3C02FFBF */ lui $v0, (0xFFBFFFFF >> 16) /* A8AC8 801123C8 3442FFFF */ ori $v0, $v0, (0xFFBFFFFF & 0xFFFF) /* A8ACC 801123CC 00621024 */ and $v0, $v1, $v0 /* A8AD0 801123D0 AE020000 */ sw $v0, 0x0($s0) /* A8AD4 801123D4 27A40018 */ addiu $a0, $sp, 0x18 .L801123D8: /* A8AD8 801123D8 27A20028 */ addiu $v0, $sp, 0x28 /* A8ADC 801123DC 27A5001C */ addiu $a1, $sp, 0x1C /* A8AE0 801123E0 27A60020 */ addiu $a2, $sp, 0x20 /* A8AE4 801123E4 C6200048 */ lwc1 $f0, 0x48($s1) /* A8AE8 801123E8 C622004C */ lwc1 $f2, 0x4C($s1) /* A8AEC 801123EC C6240050 */ lwc1 $f4, 0x50($s1) /* A8AF0 801123F0 27A70024 */ addiu $a3, $sp, 0x24 /* A8AF4 801123F4 E7A00018 */ swc1 $f0, 0x18($sp) /* A8AF8 801123F8 E7A2001C */ swc1 $f2, 0x1C($sp) /* A8AFC 801123FC E7A40020 */ swc1 $f4, 0x20($sp) /* A8B00 80112400 AFA20010 */ sw $v0, 0x10($sp) /* A8B04 80112404 27A2002C */ addiu $v0, $sp, 0x2C /* A8B08 80112408 0C04497A */ jal entity_raycast_down /* A8B0C 8011240C AFA20014 */ sw $v0, 0x14($sp) /* A8B10 80112410 1440000A */ bnez $v0, .L8011243C /* A8B14 80112414 00000000 */ nop /* A8B18 80112418 C7A2002C */ lwc1 $f2, 0x2C($sp) /* A8B1C 8011241C 3C0146FF */ lui $at, (0x46FFFE00 >> 16) /* A8B20 80112420 3421FE00 */ ori $at, $at, (0x46FFFE00 & 0xFFFF) /* A8B24 80112424 44810000 */ mtc1 $at, $f0 /* A8B28 80112428 00000000 */ nop /* A8B2C 8011242C 46001032 */ c.eq.s $f2, $f0 /* A8B30 80112430 00000000 */ nop /* A8B34 80112434 45030001 */ bc1tl .L8011243C /* A8B38 80112438 AFA0002C */ sw $zero, 0x2C($sp) .L8011243C: /* A8B3C 8011243C 8E020000 */ lw $v0, 0x0($s0) /* A8B40 80112440 C7A8002C */ lwc1 $f8, 0x2C($sp) /* A8B44 80112444 30420200 */ andi $v0, $v0, 0x200 /* A8B48 80112448 10400012 */ beqz $v0, .L80112494 /* A8B4C 8011244C 00000000 */ nop /* A8B50 80112450 8622000C */ lh $v0, 0xC($s1) /* A8B54 80112454 3C014354 */ lui $at, (0x43548000 >> 16) /* A8B58 80112458 34218000 */ ori $at, $at, (0x43548000 & 0xFFFF) /* A8B5C 8011245C 44811000 */ mtc1 $at, $f2 /* A8B60 80112460 44820000 */ mtc1 $v0, $f0 /* A8B64 80112464 00000000 */ nop /* A8B68 80112468 46800020 */ cvt.s.w $f0, $f0 /* A8B6C 8011246C 46020003 */ div.s $f0, $f0, $f2 /* A8B70 80112470 E600001C */ swc1 $f0, 0x1C($s0) /* A8B74 80112474 86220010 */ lh $v0, 0x10($s1) /* A8B78 80112478 E7A2002C */ swc1 $f2, 0x2C($sp) /* A8B7C 8011247C 44820000 */ mtc1 $v0, $f0 /* A8B80 80112480 00000000 */ nop /* A8B84 80112484 46800020 */ cvt.s.w $f0, $f0 /* A8B88 80112488 46020003 */ div.s $f0, $f0, $f2 /* A8B8C 8011248C 08044944 */ j .L80112510 /* A8B90 80112490 E6000024 */ swc1 $f0, 0x24($s0) .L80112494: /* A8B94 80112494 3C014316 */ lui $at, (0x43160000 >> 16) /* A8B98 80112498 44810000 */ mtc1 $at, $f0 /* A8B9C 8011249C 3C018015 */ lui $at, %hi(D_8014F940) /* A8BA0 801124A0 D422F940 */ ldc1 $f2, %lo(D_8014F940)($at) /* A8BA4 801124A4 46004003 */ div.s $f0, $f8, $f0 /* A8BA8 801124A8 46000021 */ cvt.d.s $f0, $f0 /* A8BAC 801124AC 46220000 */ add.d $f0, $f0, $f2 /* A8BB0 801124B0 3C018015 */ lui $at, %hi(D_8014F948) /* A8BB4 801124B4 D422F948 */ ldc1 $f2, %lo(D_8014F948)($at) /* A8BB8 801124B8 46220002 */ mul.d $f0, $f0, $f2 /* A8BBC 801124BC 00000000 */ nop /* A8BC0 801124C0 8622000C */ lh $v0, 0xC($s1) /* A8BC4 801124C4 C6240054 */ lwc1 $f4, 0x54($s1) /* A8BC8 801124C8 44821000 */ mtc1 $v0, $f2 /* A8BCC 801124CC 00000000 */ nop /* A8BD0 801124D0 468010A0 */ cvt.s.w $f2, $f2 /* A8BD4 801124D4 46200020 */ cvt.s.d $f0, $f0 /* A8BD8 801124D8 46001083 */ div.s $f2, $f2, $f0 /* A8BDC 801124DC 46041082 */ mul.s $f2, $f2, $f4 /* A8BE0 801124E0 00000000 */ nop /* A8BE4 801124E4 E602001C */ swc1 $f2, 0x1C($s0) /* A8BE8 801124E8 86220010 */ lh $v0, 0x10($s1) /* A8BEC 801124EC C624005C */ lwc1 $f4, 0x5C($s1) /* A8BF0 801124F0 44821000 */ mtc1 $v0, $f2 /* A8BF4 801124F4 00000000 */ nop /* A8BF8 801124F8 468010A0 */ cvt.s.w $f2, $f2 /* A8BFC 801124FC 46001083 */ div.s $f2, $f2, $f0 /* A8C00 80112500 46041082 */ mul.s $f2, $f2, $f4 /* A8C04 80112504 00000000 */ nop /* A8C08 80112508 E7A0002C */ swc1 $f0, 0x2C($sp) /* A8C0C 8011250C E6020024 */ swc1 $f2, 0x24($s0) .L80112510: /* A8C10 80112510 C6200048 */ lwc1 $f0, 0x48($s1) /* A8C14 80112514 E6000010 */ swc1 $f0, 0x10($s0) /* A8C18 80112518 C7A6001C */ lwc1 $f6, 0x1C($sp) /* A8C1C 8011251C C6200050 */ lwc1 $f0, 0x50($s1) /* A8C20 80112520 C7A20024 */ lwc1 $f2, 0x24($sp) /* A8C24 80112524 C7A40028 */ lwc1 $f4, 0x28($sp) /* A8C28 80112528 E6060014 */ swc1 $f6, 0x14($s0) /* A8C2C 8011252C E6000018 */ swc1 $f0, 0x18($s0) /* A8C30 80112530 E626006C */ swc1 $f6, 0x6C($s1) /* A8C34 80112534 E6020028 */ swc1 $f2, 0x28($s0) /* A8C38 80112538 E6040030 */ swc1 $f4, 0x30($s0) /* A8C3C 8011253C C6200064 */ lwc1 $f0, 0x64($s1) /* A8C40 80112540 E600002C */ swc1 $f0, 0x2C($s0) /* A8C44 80112544 C620004C */ lwc1 $f0, 0x4C($s1) /* A8C48 80112548 4606003C */ c.lt.s $f0, $f6 /* A8C4C 8011254C 00000000 */ nop /* A8C50 80112550 45000009 */ bc1f .L80112578 /* A8C54 80112554 3C034000 */ lui $v1, (0x40000000 >> 16) /* A8C58 80112558 3C014120 */ lui $at, (0x41200000 >> 16) /* A8C5C 8011255C 44810000 */ mtc1 $at, $f0 /* A8C60 80112560 8E020000 */ lw $v0, 0x0($s0) /* A8C64 80112564 46003000 */ add.s $f0, $f6, $f0 /* A8C68 80112568 00431025 */ or $v0, $v0, $v1 /* A8C6C 8011256C AE020000 */ sw $v0, 0x0($s0) /* A8C70 80112570 08044963 */ j .L8011258C /* A8C74 80112574 E620004C */ swc1 $f0, 0x4C($s1) .L80112578: /* A8C78 80112578 3C03BFFF */ lui $v1, (0xBFFFFFFF >> 16) /* A8C7C 8011257C 8E020000 */ lw $v0, 0x0($s0) /* A8C80 80112580 3463FFFF */ ori $v1, $v1, (0xBFFFFFFF & 0xFFFF) /* A8C84 80112584 00431024 */ and $v0, $v0, $v1 /* A8C88 80112588 AE020000 */ sw $v0, 0x0($s0) .L8011258C: /* A8C8C 8011258C 2404FFFE */ addiu $a0, $zero, -0x2 /* A8C90 80112590 8E030000 */ lw $v1, 0x0($s0) /* A8C94 80112594 96220002 */ lhu $v0, 0x2($s1) /* A8C98 80112598 00641824 */ and $v1, $v1, $a0 /* A8C9C 8011259C 30420001 */ andi $v0, $v0, 0x1 /* A8CA0 801125A0 00621825 */ or $v1, $v1, $v0 /* A8CA4 801125A4 AE030000 */ sw $v1, 0x0($s0) /* A8CA8 801125A8 8E220000 */ lw $v0, 0x0($s1) /* A8CAC 801125AC 30420400 */ andi $v0, $v0, 0x400 /* A8CB0 801125B0 14400008 */ bnez $v0, .L801125D4 /* A8CB4 801125B4 00000000 */ nop /* A8CB8 801125B8 44800000 */ mtc1 $zero, $f0 /* A8CBC 801125BC 00000000 */ nop /* A8CC0 801125C0 46004032 */ c.eq.s $f8, $f0 /* A8CC4 801125C4 00000000 */ nop /* A8CC8 801125C8 45000002 */ bc1f .L801125D4 /* A8CCC 801125CC 34620001 */ ori $v0, $v1, 0x1 /* A8CD0 801125D0 AE020000 */ sw $v0, 0x0($s0) .L801125D4: /* A8CD4 801125D4 8FBF0038 */ lw $ra, 0x38($sp) /* A8CD8 801125D8 8FB10034 */ lw $s1, 0x34($sp) /* A8CDC 801125DC 8FB00030 */ lw $s0, 0x30($sp) /* A8CE0 801125E0 03E00008 */ jr $ra /* A8CE4 801125E4 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void update_entity_shadow_position(Entity* entity) { Shadow* shadow = get_shadow_by_index(entity->shadowIndex); if (shadow != NULL) { f32 rayX; f32 rayY; f32 rayZ; f32 hitYaw; f32 hitPitch; f32 hitLength; f32 origHitLength; if (entity->alpha < 255) { shadow->alpha = entity->alpha / 2; } else { u8 alphaTemp; if (shadow->flags & ENTITY_FLAG_DARK_SHADOW) { alphaTemp = 160; } else { alphaTemp = 128; } shadow->alpha = alphaTemp; } if (!(entity->flags & ENTITY_FLAG_HAS_DYNAMIC_SHADOW)) { if (shadow->flags & ENTITY_FLAG_SHADOW_POS_DIRTY) { shadow->flags &= ~ENTITY_FLAG_SHADOW_POS_DIRTY; } else { return; } } rayX = entity->position.x; rayY = entity->position.y; rayZ = entity->position.z; if (!entity_raycast_down(&rayX, &rayY, &rayZ, &hitYaw, &hitPitch, &hitLength) && hitLength == 32767.0f) { hitLength = 0.0f; } origHitLength = hitLength; if (shadow->flags & ENTITY_FLAG_FIXED_SHADOW_SIZE) { hitLength = 212.5f; shadow->scale.x = entity->aabb.x / hitLength; shadow->scale.z = entity->aabb.z / hitLength; } else { hitLength = ((hitLength / 150.0f) + 0.95) * 250.0; shadow->scale.x = (entity->aabb.x / hitLength) * entity->scale.x; shadow->scale.z = (entity->aabb.z / hitLength) * entity->scale.z; } shadow->position.x = entity->position.x; shadow->position.z = entity->position.z; shadow->position.y = rayY; entity->shadowPosY = rayY; shadow->rotation.x = hitYaw; shadow->rotation.z = hitPitch; shadow->rotation.y = entity->rotation.y; if (entity->position.y < rayY) { shadow->flags |= ENTITY_FLAG_SKIP_UPDATE; entity->position.y = rayY + 10.0f; } else { shadow->flags &= ~ENTITY_FLAG_SKIP_UPDATE; } shadow->flags = (shadow->flags & ~ENTITY_FLAG_HIDDEN) | ((u16)entity->flags & ENTITY_FLAG_HIDDEN); if (!(entity->flags & ENTITY_FLAG_400) && origHitLength == 0.0f) { shadow->flags |= ENTITY_FLAG_HIDDEN; } } else { entity->shadowPosY = 0.0f; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_800F0D80 /* 8A230 800F0D80 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 8A234 800F0D84 F7B60040 */ sdc1 $f22, 0x40($sp) /* 8A238 800F0D88 3C018011 */ lui $at, %hi(D_8010C310) /* 8A23C 800F0D8C D436C310 */ ldc1 $f22, %lo(D_8010C310)($at) /* 8A240 800F0D90 F7B40038 */ sdc1 $f20, 0x38($sp) /* 8A244 800F0D94 3C018011 */ lui $at, %hi(D_8010C318) /* 8A248 800F0D98 D434C318 */ ldc1 $f20, %lo(D_8010C318)($at) /* 8A24C 800F0D9C AFB40020 */ sw $s4, 0x20($sp) /* 8A250 800F0DA0 0000A02D */ daddu $s4, $zero, $zero /* 8A254 800F0DA4 AFBE0030 */ sw $fp, 0x30($sp) /* 8A258 800F0DA8 3C1E8011 */ lui $fp, %hi(D_80109820) /* 8A25C 800F0DAC 27DE9820 */ addiu $fp, $fp, %lo(D_80109820) /* 8A260 800F0DB0 AFB60028 */ sw $s6, 0x28($sp) /* 8A264 800F0DB4 2416007F */ addiu $s6, $zero, 0x7F /* 8A268 800F0DB8 AFB7002C */ sw $s7, 0x2C($sp) /* 8A26C 800F0DBC 3C178011 */ lui $s7, %hi(D_80109800) /* 8A270 800F0DC0 26F79800 */ addiu $s7, $s7, %lo(D_80109800) /* 8A274 800F0DC4 AFB3001C */ sw $s3, 0x1C($sp) /* 8A278 800F0DC8 0280982D */ daddu $s3, $s4, $zero /* 8A27C 800F0DCC AFBF0034 */ sw $ra, 0x34($sp) /* 8A280 800F0DD0 AFB50024 */ sw $s5, 0x24($sp) /* 8A284 800F0DD4 AFB20018 */ sw $s2, 0x18($sp) /* 8A288 800F0DD8 AFB10014 */ sw $s1, 0x14($sp) /* 8A28C 800F0DDC AFB00010 */ sw $s0, 0x10($sp) /* 8A290 800F0DE0 F7BA0050 */ sdc1 $f26, 0x50($sp) /* 8A294 800F0DE4 F7B80048 */ sdc1 $f24, 0x48($sp) .L800F0DE8: /* 8A298 800F0DE8 3C058011 */ lui $a1, %hi(D_8010D000) /* 8A29C 800F0DEC 24A5D000 */ addiu $a1, $a1, %lo(D_8010D000) /* 8A2A0 800F0DF0 02651821 */ addu $v1, $s3, $a1 /* 8A2A4 800F0DF4 90620000 */ lbu $v0, 0x0($v1) /* 8A2A8 800F0DF8 5040007A */ beql $v0, $zero, .L800F0FE4 /* 8A2AC 800F0DFC 26940001 */ addiu $s4, $s4, 0x1 /* 8A2B0 800F0E00 90620001 */ lbu $v0, 0x1($v1) /* 8A2B4 800F0E04 2442FFFF */ addiu $v0, $v0, -0x1 /* 8A2B8 800F0E08 A0620001 */ sb $v0, 0x1($v1) /* 8A2BC 800F0E0C 90620002 */ lbu $v0, 0x2($v1) /* 8A2C0 800F0E10 80640001 */ lb $a0, 0x1($v1) /* 8A2C4 800F0E14 24420001 */ addiu $v0, $v0, 0x1 /* 8A2C8 800F0E18 04810003 */ bgez $a0, .L800F0E28 /* 8A2CC 800F0E1C A0620002 */ sb $v0, 0x2($v1) /* 8A2D0 800F0E20 0803C3F8 */ j .L800F0FE0 /* 8A2D4 800F0E24 A0600000 */ sb $zero, 0x0($v1) .L800F0E28: /* 8A2D8 800F0E28 0080A82D */ daddu $s5, $a0, $zero /* 8A2DC 800F0E2C 24120001 */ addiu $s2, $zero, 0x1 /* 8A2E0 800F0E30 24700034 */ addiu $s0, $v1, 0x34 /* 8A2E4 800F0E34 0000882D */ daddu $s1, $zero, $zero /* 8A2E8 800F0E38 C47A0008 */ lwc1 $f26, 0x8($v1) /* 8A2EC 800F0E3C C478000C */ lwc1 $f24, 0xC($v1) .L800F0E40: /* 8A2F0 800F0E40 9202FFEF */ lbu $v0, -0x11($s0) /* 8A2F4 800F0E44 24420001 */ addiu $v0, $v0, 0x1 /* 8A2F8 800F0E48 A202FFEF */ sb $v0, -0x11($s0) /* 8A2FC 800F0E4C 00021600 */ sll $v0, $v0, 24 /* 8A300 800F0E50 00021603 */ sra $v0, $v0, 24 /* 8A304 800F0E54 2842001E */ slti $v0, $v0, 0x1E /* 8A308 800F0E58 14400006 */ bnez $v0, .L800F0E74 /* 8A30C 800F0E5C 2AA2001E */ slti $v0, $s5, 0x1E /* 8A310 800F0E60 10400003 */ beqz $v0, .L800F0E70 /* 8A314 800F0E64 2402FFE1 */ addiu $v0, $zero, -0x1F /* 8A318 800F0E68 0803C39D */ j .L800F0E74 /* 8A31C 800F0E6C A202FFEF */ sb $v0, -0x11($s0) .L800F0E70: /* 8A320 800F0E70 A200FFEF */ sb $zero, -0x11($s0) .L800F0E74: /* 8A324 800F0E74 8202FFEF */ lb $v0, -0x11($s0) /* 8A328 800F0E78 04420055 */ bltzl $v0, .L800F0FD0 /* 8A32C 800F0E7C 26310002 */ addiu $s1, $s1, 0x2 /* 8A330 800F0E80 14400031 */ bnez $v0, .L800F0F48 /* 8A334 800F0E84 023E1821 */ addu $v1, $s1, $fp /* 8A338 800F0E88 80620000 */ lb $v0, 0x0($v1) /* 8A33C 800F0E8C 44821000 */ mtc1 $v0, $f2 /* 8A340 800F0E90 00000000 */ nop /* 8A344 800F0E94 468010A0 */ cvt.s.w $f2, $f2 /* 8A348 800F0E98 460010A1 */ cvt.d.s $f2, $f2 /* 8A34C 800F0E9C 46361082 */ mul.d $f2, $f2, $f22 /* 8A350 800F0EA0 00000000 */ nop /* 8A354 800F0EA4 80620001 */ lb $v0, 0x1($v1) /* 8A358 800F0EA8 44820000 */ mtc1 $v0, $f0 /* 8A35C 800F0EAC 00000000 */ nop /* 8A360 800F0EB0 46800020 */ cvt.s.w $f0, $f0 /* 8A364 800F0EB4 46000007 */ neg.s $f0, $f0 /* 8A368 800F0EB8 46000021 */ cvt.d.s $f0, $f0 /* 8A36C 800F0EBC 46360002 */ mul.d $f0, $f0, $f22 /* 8A370 800F0EC0 00000000 */ nop /* 8A374 800F0EC4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 8A378 800F0EC8 44812000 */ mtc1 $at, $f4 /* 8A37C 800F0ECC 2404007F */ addiu $a0, $zero, 0x7F /* 8A380 800F0ED0 E61AFFF0 */ swc1 $f26, -0x10($s0) /* 8A384 800F0ED4 E618FFF4 */ swc1 $f24, -0xC($s0) /* 8A388 800F0ED8 E6040000 */ swc1 $f4, 0x0($s0) /* 8A38C 800F0EDC 462010A0 */ cvt.s.d $f2, $f2 /* 8A390 800F0EE0 E602FFF8 */ swc1 $f2, -0x8($s0) /* 8A394 800F0EE4 46200020 */ cvt.s.d $f0, $f0 /* 8A398 800F0EE8 0C00A67F */ jal rand_int /* 8A39C 800F0EEC E600FFFC */ swc1 $f0, -0x4($s0) /* 8A3A0 800F0EF0 A202FFEB */ sb $v0, -0x15($s0) /* 8A3A4 800F0EF4 304400FF */ andi $a0, $v0, 0xFF /* 8A3A8 800F0EF8 0C00A67F */ jal rand_int /* 8A3AC 800F0EFC 02C42023 */ subu $a0, $s6, $a0 /* 8A3B0 800F0F00 A202FFEC */ sb $v0, -0x14($s0) /* 8A3B4 800F0F04 304400FF */ andi $a0, $v0, 0xFF /* 8A3B8 800F0F08 9202FFEB */ lbu $v0, -0x15($s0) /* 8A3BC 800F0F0C 02C42023 */ subu $a0, $s6, $a0 /* 8A3C0 800F0F10 0C00A67F */ jal rand_int /* 8A3C4 800F0F14 00822023 */ subu $a0, $a0, $v0 /* 8A3C8 800F0F18 9203FFEB */ lbu $v1, -0x15($s0) /* 8A3CC 800F0F1C A202FFED */ sb $v0, -0x13($s0) /* 8A3D0 800F0F20 240200FF */ addiu $v0, $zero, 0xFF /* 8A3D4 800F0F24 A202FFEE */ sb $v0, -0x12($s0) /* 8A3D8 800F0F28 9202FFEC */ lbu $v0, -0x14($s0) /* 8A3DC 800F0F2C 24630080 */ addiu $v1, $v1, 0x80 /* 8A3E0 800F0F30 A203FFEB */ sb $v1, -0x15($s0) /* 8A3E4 800F0F34 9203FFED */ lbu $v1, -0x13($s0) /* 8A3E8 800F0F38 24420080 */ addiu $v0, $v0, 0x80 /* 8A3EC 800F0F3C A202FFEC */ sb $v0, -0x14($s0) /* 8A3F0 800F0F40 24630080 */ addiu $v1, $v1, 0x80 /* 8A3F4 800F0F44 A203FFED */ sb $v1, -0x13($s0) .L800F0F48: /* 8A3F8 800F0F48 C600FFF8 */ lwc1 $f0, -0x8($s0) /* 8A3FC 800F0F4C 46000021 */ cvt.d.s $f0, $f0 /* 8A400 800F0F50 46340002 */ mul.d $f0, $f0, $f20 /* 8A404 800F0F54 00000000 */ nop /* 8A408 800F0F58 C602FFFC */ lwc1 $f2, -0x4($s0) /* 8A40C 800F0F5C 460010A1 */ cvt.d.s $f2, $f2 /* 8A410 800F0F60 46341082 */ mul.d $f2, $f2, $f20 /* 8A414 800F0F64 00000000 */ nop /* 8A418 800F0F68 C608FFF0 */ lwc1 $f8, -0x10($s0) /* 8A41C 800F0F6C C604FFF8 */ lwc1 $f4, -0x8($s0) /* 8A420 800F0F70 C606FFF4 */ lwc1 $f6, -0xC($s0) /* 8A424 800F0F74 46044200 */ add.s $f8, $f8, $f4 /* 8A428 800F0F78 C604FFFC */ lwc1 $f4, -0x4($s0) /* 8A42C 800F0F7C 8202FFEF */ lb $v0, -0x11($s0) /* 8A430 800F0F80 46043180 */ add.s $f6, $f6, $f4 /* 8A434 800F0F84 00571021 */ addu $v0, $v0, $s7 /* 8A438 800F0F88 E608FFF0 */ swc1 $f8, -0x10($s0) /* 8A43C 800F0F8C E606FFF4 */ swc1 $f6, -0xC($s0) /* 8A440 800F0F90 46200020 */ cvt.s.d $f0, $f0 /* 8A444 800F0F94 462010A0 */ cvt.s.d $f2, $f2 /* 8A448 800F0F98 E600FFF8 */ swc1 $f0, -0x8($s0) /* 8A44C 800F0F9C E602FFFC */ swc1 $f2, -0x4($s0) /* 8A450 800F0FA0 90420000 */ lbu $v0, 0x0($v0) /* 8A454 800F0FA4 3C018011 */ lui $at, %hi(D_8010C320) /* 8A458 800F0FA8 D422C320 */ ldc1 $f2, %lo(D_8010C320)($at) /* 8A45C 800F0FAC 44820000 */ mtc1 $v0, $f0 /* 8A460 800F0FB0 00000000 */ nop /* 8A464 800F0FB4 46800020 */ cvt.s.w $f0, $f0 /* 8A468 800F0FB8 46000021 */ cvt.d.s $f0, $f0 /* 8A46C 800F0FBC 46220002 */ mul.d $f0, $f0, $f2 /* 8A470 800F0FC0 00000000 */ nop /* 8A474 800F0FC4 46200020 */ cvt.s.d $f0, $f0 /* 8A478 800F0FC8 E6000000 */ swc1 $f0, 0x0($s0) /* 8A47C 800F0FCC 26310002 */ addiu $s1, $s1, 0x2 .L800F0FD0: /* 8A480 800F0FD0 26520001 */ addiu $s2, $s2, 0x1 /* 8A484 800F0FD4 2A420039 */ slti $v0, $s2, 0x39 /* 8A488 800F0FD8 1440FF99 */ bnez $v0, .L800F0E40 /* 8A48C 800F0FDC 2610001C */ addiu $s0, $s0, 0x1C .L800F0FE0: /* 8A490 800F0FE0 26940001 */ addiu $s4, $s4, 0x1 .L800F0FE4: /* 8A494 800F0FE4 1A80FF80 */ blez $s4, .L800F0DE8 /* 8A498 800F0FE8 2673063C */ addiu $s3, $s3, 0x63C /* 8A49C 800F0FEC 8FBF0034 */ lw $ra, 0x34($sp) /* 8A4A0 800F0FF0 8FBE0030 */ lw $fp, 0x30($sp) /* 8A4A4 800F0FF4 8FB7002C */ lw $s7, 0x2C($sp) /* 8A4A8 800F0FF8 8FB60028 */ lw $s6, 0x28($sp) /* 8A4AC 800F0FFC 8FB50024 */ lw $s5, 0x24($sp) /* 8A4B0 800F1000 8FB40020 */ lw $s4, 0x20($sp) /* 8A4B4 800F1004 8FB3001C */ lw $s3, 0x1C($sp) /* 8A4B8 800F1008 8FB20018 */ lw $s2, 0x18($sp) /* 8A4BC 800F100C 8FB10014 */ lw $s1, 0x14($sp) /* 8A4C0 800F1010 8FB00010 */ lw $s0, 0x10($sp) /* 8A4C4 800F1014 D7BA0050 */ ldc1 $f26, 0x50($sp) /* 8A4C8 800F1018 D7B80048 */ ldc1 $f24, 0x48($sp) /* 8A4CC 800F101C D7B60040 */ ldc1 $f22, 0x40($sp) /* 8A4D0 800F1020 D7B40038 */ ldc1 $f20, 0x38($sp) /* 8A4D4 800F1024 03E00008 */ jr $ra /* 8A4D8 800F1028 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void func_800F0D80(void) { Unk8a160Outer* outer; s32 i; s32 j; for (i = 0; i < ARRAY_COUNT(D_8010D000); i++, outer++) { outer = &D_8010D000[i]; if (outer->subs[0].alive) { outer->subs[0].timeLeft--; outer->subs[0].lifetime++; if (outer->subs[0].timeLeft < 0) { outer->subs[0].alive = FALSE; } else { Unk8a160* sub = &outer->subs[0]; s32 baseTimeLeft = sub->timeLeft; f32 baseX = sub->x; f32 baseY = sub->y; sub++; for (j = 1; j < ARRAY_COUNT(outer->subs); j++, sub++) { sub->lodVal++; if (sub->lodVal >= 30) { if (baseTimeLeft < 30) { sub->lodVal = -31; } else { sub->lodVal = 0; } } if (sub->lodVal >= 0) { if (sub->lodVal == 0) { f32 tx = D_80109820[j - 1].x; f32 ty = D_80109820[j - 1].y; u8 t = 127; sub->vel.x = tx * 0.1; sub->vel.y = -ty * 0.1; sub->x = baseX; sub->y = baseY; sub->scale = 1.0f; sub->rgba.r = rand_int(t); sub->rgba.g = rand_int(t - sub->rgba.r); sub->rgba.b = rand_int(t - sub->rgba.g - sub->rgba.r); sub->rgba.a = 255; sub->rgba.r += 128; sub->rgba.g += 128; sub->rgba.b += 128; } sub->x += sub->vel.x; sub->y += sub->vel.y; sub->vel.x *= 0.92; sub->vel.y *= 0.92; sub->scale = (f32) D_80109800[sub->lodVal] * 0.04; } } } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel spr_load_sprite /* 101BFC 802DEB0C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 101C00 802DEB10 AFB50024 */ sw $s5, 0x24($sp) /* 101C04 802DEB14 0080A82D */ daddu $s5, $a0, $zero /* 101C08 802DEB18 AFB40020 */ sw $s4, 0x20($sp) /* 101C0C 802DEB1C 00A0A02D */ daddu $s4, $a1, $zero /* 101C10 802DEB20 AFB60028 */ sw $s6, 0x28($sp) /* 101C14 802DEB24 00C0B02D */ daddu $s6, $a2, $zero /* 101C18 802DEB28 AFBF002C */ sw $ra, 0x2C($sp) /* 101C1C 802DEB2C AFB3001C */ sw $s3, 0x1C($sp) /* 101C20 802DEB30 AFB20018 */ sw $s2, 0x18($sp) /* 101C24 802DEB34 AFB10014 */ sw $s1, 0x14($sp) /* 101C28 802DEB38 12800005 */ beqz $s4, .L802DEB50 /* 101C2C 802DEB3C AFB00010 */ sw $s0, 0x10($sp) /* 101C30 802DEB40 3C13802E */ lui $s3, %hi(D_802E0C64) /* 101C34 802DEB44 8E730C64 */ lw $s3, %lo(D_802E0C64)($s3) /* 101C38 802DEB48 080B7AD7 */ j .L802DEB5C /* 101C3C 802DEB4C 00152080 */ sll $a0, $s5, 2 .L802DEB50: /* 101C40 802DEB50 3C13802E */ lui $s3, %hi(D_802E0C68) /* 101C44 802DEB54 8E730C68 */ lw $s3, %lo(D_802E0C68)($s3) /* 101C48 802DEB58 00152080 */ sll $a0, $s5, 2 .L802DEB5C: /* 101C4C 802DEB5C 02642021 */ addu $a0, $s3, $a0 /* 101C50 802DEB60 3C11802E */ lui $s1, %hi(spr_asset_entry) /* 101C54 802DEB64 2631FEB0 */ addiu $s1, $s1, %lo(spr_asset_entry) /* 101C58 802DEB68 0220282D */ daddu $a1, $s1, $zero /* 101C5C 802DEB6C 0C017D24 */ jal nuPiReadRom /* 101C60 802DEB70 24060008 */ addiu $a2, $zero, 0x8 /* 101C64 802DEB74 8E300004 */ lw $s0, 0x4($s1) /* 101C68 802DEB78 8E220000 */ lw $v0, 0x0($s1) /* 101C6C 802DEB7C 02028023 */ subu $s0, $s0, $v0 /* 101C70 802DEB80 26100007 */ addiu $s0, $s0, 0x7 /* 101C74 802DEB84 2402FFF8 */ addiu $v0, $zero, -0x8 /* 101C78 802DEB88 02028024 */ and $s0, $s0, $v0 /* 101C7C 802DEB8C 0C00AB0A */ jal general_heap_malloc /* 101C80 802DEB90 0200202D */ daddu $a0, $s0, $zero /* 101C84 802DEB94 0040902D */ daddu $s2, $v0, $zero /* 101C88 802DEB98 0240282D */ daddu $a1, $s2, $zero /* 101C8C 802DEB9C 8E240000 */ lw $a0, 0x0($s1) /* 101C90 802DEBA0 0200302D */ daddu $a2, $s0, $zero /* 101C94 802DEBA4 0C017D24 */ jal nuPiReadRom /* 101C98 802DEBA8 02642021 */ addu $a0, $s3, $a0 /* 101C9C 802DEBAC 12C00008 */ beqz $s6, .L802DEBD0 /* 101CA0 802DEBB0 26450004 */ addiu $a1, $s2, 0x4 /* 101CA4 802DEBB4 8CA50000 */ lw $a1, 0x0($a1) /* 101CA8 802DEBB8 3C048035 */ lui $a0, %hi(heap_spriteHead) /* 101CAC 802DEBBC 2484F800 */ addiu $a0, $a0, %lo(heap_spriteHead) /* 101CB0 802DEBC0 0C00A459 */ jal _heap_malloc_tail /* 101CB4 802DEBC4 00000000 */ nop /* 101CB8 802DEBC8 080B7AFA */ j .L802DEBE8 /* 101CBC 802DEBCC 0040882D */ daddu $s1, $v0, $zero .L802DEBD0: /* 101CC0 802DEBD0 8CA50000 */ lw $a1, 0x0($a1) /* 101CC4 802DEBD4 3C048035 */ lui $a0, %hi(heap_spriteHead) /* 101CC8 802DEBD8 2484F800 */ addiu $a0, $a0, %lo(heap_spriteHead) /* 101CCC 802DEBDC 0C00A41B */ jal _heap_malloc /* 101CD0 802DEBE0 00000000 */ nop /* 101CD4 802DEBE4 0040882D */ daddu $s1, $v0, $zero .L802DEBE8: /* 101CD8 802DEBE8 0240202D */ daddu $a0, $s2, $zero /* 101CDC 802DEBEC 0C01BB7C */ jal decode_yay0 /* 101CE0 802DEBF0 0220282D */ daddu $a1, $s1, $zero /* 101CE4 802DEBF4 0C00AB1E */ jal general_heap_free /* 101CE8 802DEBF8 0240202D */ daddu $a0, $s2, $zero /* 101CEC 802DEBFC 2404FFFF */ addiu $a0, $zero, -0x1 /* 101CF0 802DEC00 00111082 */ srl $v0, $s1, 2 /* 101CF4 802DEC04 8E320000 */ lw $s2, 0x0($s1) /* 101CF8 802DEC08 00021080 */ sll $v0, $v0, 2 /* 101CFC 802DEC0C 02429021 */ addu $s2, $s2, $v0 /* 101D00 802DEC10 AE320000 */ sw $s2, 0x0($s1) .L802DEC14: /* 101D04 802DEC14 8E450000 */ lw $a1, 0x0($s2) /* 101D08 802DEC18 10A40008 */ beq $a1, $a0, .L802DEC3C /* 101D0C 802DEC1C 00A22821 */ addu $a1, $a1, $v0 /* 101D10 802DEC20 AE450000 */ sw $a1, 0x0($s2) /* 101D14 802DEC24 8CA30000 */ lw $v1, 0x0($a1) /* 101D18 802DEC28 1680FFFA */ bnez $s4, .L802DEC14 /* 101D1C 802DEC2C 26520004 */ addiu $s2, $s2, 0x4 /* 101D20 802DEC30 00621821 */ addu $v1, $v1, $v0 /* 101D24 802DEC34 080B7B05 */ j .L802DEC14 /* 101D28 802DEC38 ACA30000 */ sw $v1, 0x0($a1) .L802DEC3C: /* 101D2C 802DEC3C 1280002D */ beqz $s4, .L802DECF4 /* 101D30 802DEC40 00151880 */ sll $v1, $s5, 2 /* 101D34 802DEC44 3C13802E */ lui $s3, %hi(PlayerRasterLoadDescBuffer) /* 101D38 802DEC48 2673FEB8 */ addiu $s3, $s3, %lo(PlayerRasterLoadDescBuffer) /* 101D3C 802DEC4C 0260282D */ daddu $a1, $s3, $zero /* 101D40 802DEC50 24060194 */ addiu $a2, $zero, 0x194 /* 101D44 802DEC54 3C12802E */ lui $s2, %hi(PlayerRasterLoadDescNumLoaded) /* 101D48 802DEC58 2652004C */ addiu $s2, $s2, %lo(PlayerRasterLoadDescNumLoaded) /* 101D4C 802DEC5C 8E420000 */ lw $v0, 0x0($s2) /* 101D50 802DEC60 3C04802E */ lui $a0, %hi(PlayerSpriteRasterSets) /* 101D54 802DEC64 24840C20 */ addiu $a0, $a0, %lo(PlayerSpriteRasterSets) /* 101D58 802DEC68 3C01802E */ lui $at, %hi(PlayerRasterLoadDescBeginSpriteIndex) /* 101D5C 802DEC6C 00230821 */ addu $at, $at, $v1 /* 101D60 802DEC70 AC220050 */ sw $v0, %lo(PlayerRasterLoadDescBeginSpriteIndex)($at) /* 101D64 802DEC74 26A20001 */ addiu $v0, $s5, 0x1 /* 101D68 802DEC78 00021080 */ sll $v0, $v0, 2 /* 101D6C 802DEC7C 00441021 */ addu $v0, $v0, $a0 /* 101D70 802DEC80 00641821 */ addu $v1, $v1, $a0 /* 101D74 802DEC84 3C04802E */ lui $a0, %hi(SpriteDataHeader) /* 101D78 802DEC88 8C840C60 */ lw $a0, %lo(SpriteDataHeader)($a0) /* 101D7C 802DEC8C 3C07802E */ lui $a3, %hi(D_802E0C14) /* 101D80 802DEC90 8CE70C14 */ lw $a3, %lo(D_802E0C14)($a3) /* 101D84 802DEC94 8C680000 */ lw $t0, 0x0($v1) /* 101D88 802DEC98 8C420000 */ lw $v0, 0x0($v0) /* 101D8C 802DEC9C 00872021 */ addu $a0, $a0, $a3 /* 101D90 802DECA0 00081880 */ sll $v1, $t0, 2 /* 101D94 802DECA4 00832021 */ addu $a0, $a0, $v1 /* 101D98 802DECA8 0C017D24 */ jal nuPiReadRom /* 101D9C 802DECAC 00488023 */ subu $s0, $v0, $t0 /* 101DA0 802DECB0 1A000010 */ blez $s0, .L802DECF4 /* 101DA4 802DECB4 0000302D */ daddu $a2, $zero, $zero /* 101DA8 802DECB8 3C08802E */ lui $t0, %hi(PlayerRasterLoadDesc) /* 101DAC 802DECBC 25080090 */ addiu $t0, $t0, %lo(PlayerRasterLoadDesc) /* 101DB0 802DECC0 0240382D */ daddu $a3, $s2, $zero /* 101DB4 802DECC4 0260282D */ daddu $a1, $s3, $zero .L802DECC8: /* 101DB8 802DECC8 8CA40000 */ lw $a0, 0x0($a1) /* 101DBC 802DECCC 24A50004 */ addiu $a1, $a1, 0x4 /* 101DC0 802DECD0 8CE30000 */ lw $v1, 0x0($a3) /* 101DC4 802DECD4 24C60001 */ addiu $a2, $a2, 0x1 /* 101DC8 802DECD8 00031080 */ sll $v0, $v1, 2 /* 101DCC 802DECDC 24630001 */ addiu $v1, $v1, 0x1 /* 101DD0 802DECE0 00481021 */ addu $v0, $v0, $t0 /* 101DD4 802DECE4 AC440000 */ sw $a0, 0x0($v0) /* 101DD8 802DECE8 00D0102A */ slt $v0, $a2, $s0 /* 101DDC 802DECEC 1440FFF6 */ bnez $v0, .L802DECC8 /* 101DE0 802DECF0 ACE30000 */ sw $v1, 0x0($a3) .L802DECF4: /* 101DE4 802DECF4 2404FFFF */ addiu $a0, $zero, -0x1 /* 101DE8 802DECF8 00111082 */ srl $v0, $s1, 2 /* 101DEC 802DECFC 8E230004 */ lw $v1, 0x4($s1) /* 101DF0 802DED00 00021080 */ sll $v0, $v0, 2 /* 101DF4 802DED04 00621821 */ addu $v1, $v1, $v0 /* 101DF8 802DED08 AE230004 */ sw $v1, 0x4($s1) .L802DED0C: /* 101DFC 802DED0C 8C650000 */ lw $a1, 0x0($v1) /* 101E00 802DED10 10A40004 */ beq $a1, $a0, .L802DED24 /* 101E04 802DED14 00A22821 */ addu $a1, $a1, $v0 /* 101E08 802DED18 AC650000 */ sw $a1, 0x0($v1) /* 101E0C 802DED1C 080B7B43 */ j .L802DED0C /* 101E10 802DED20 24630004 */ addiu $v1, $v1, 0x4 .L802DED24: /* 101E14 802DED24 0000202D */ daddu $a0, $zero, $zero /* 101E18 802DED28 0080282D */ daddu $a1, $a0, $zero /* 101E1C 802DED2C 0C0B7AA8 */ jal spr_swizzle_anim_offsets /* 101E20 802DED30 0220302D */ daddu $a2, $s1, $zero /* 101E24 802DED34 0220102D */ daddu $v0, $s1, $zero /* 101E28 802DED38 8FBF002C */ lw $ra, 0x2C($sp) /* 101E2C 802DED3C 8FB60028 */ lw $s6, 0x28($sp) /* 101E30 802DED40 8FB50024 */ lw $s5, 0x24($sp) /* 101E34 802DED44 8FB40020 */ lw $s4, 0x20($sp) /* 101E38 802DED48 8FB3001C */ lw $s3, 0x1C($sp) /* 101E3C 802DED4C 8FB20018 */ lw $s2, 0x18($sp) /* 101E40 802DED50 8FB10014 */ lw $s1, 0x14($sp) /* 101E44 802DED54 8FB00010 */ lw $s0, 0x10($sp) /* 101E48 802DED58 03E00008 */ jr $ra /* 101E4C 802DED5C 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: SpriteAnimData* spr_load_sprite(s32 idx, s32 isPlayerSprite, s32 useTailAlloc) { SpriteAnimData* animData; s32 base; s32 i; s32 compressedSize; s32* ptr1; IMG_PTR image; s32 count; s32** data; s32** palettes; if (isPlayerSprite) { base = SpriteDataHeader[1]; } else { base = SpriteDataHeader[2]; } // read current and next sprite offsets, so we can find the difference nuPiReadRom(base + idx * 4, &spr_asset_entry, sizeof(spr_asset_entry)); compressedSize = ALIGN8(spr_asset_entry[1] - spr_asset_entry[0]); data = general_heap_malloc(compressedSize); nuPiReadRom(base + spr_asset_entry[0], data, compressedSize); ptr1 = (s32*)data; // skip 4 bytes: 'YAY0' signature ptr1++; if (useTailAlloc) { animData = _heap_malloc_tail(&heap_spriteHead, *ptr1); } else { animData = _heap_malloc(&heap_spriteHead, *ptr1); } decode_yay0(data, animData); general_heap_free(data); // swizzle raster array data = (s32**)animData->rastersOffset; data = SPR_SWIZZLE(ALIGN4(animData), data); animData->rastersOffset = (SpriteRasterCacheEntry**)data; while (TRUE) { ptr1 = *data; if (ptr1 == PTR_LIST_END) { break; } // swizzle each raster cache entry ptr1 = SPR_SWIZZLE(ALIGN4(animData), ptr1); *data++ = ptr1; image = ((SpriteRasterCacheEntry*)ptr1)->image; if (!isPlayerSprite) { // swizzle image pointer in the cache entry image = SPR_SWIZZLE(ALIGN4(animData), image); *ptr1 = (s32)image; } } if (isPlayerSprite) { PlayerRasterLoadDescBeginSpriteIndex[idx] = PlayerRasterLoadDescNumLoaded; count = PlayerSpriteRasterSets[idx + 1] - PlayerSpriteRasterSets[idx]; // load a range of raster loading desciptors to a buffer and copy contents into PlayerRasterLoadDesc nuPiReadRom(SpriteDataHeader[0] + PlayerRasterHeader.loadDescriptors + sizeof(u32) * PlayerSpriteRasterSets[idx], PlayerRasterLoadDescBuffer, sizeof(PlayerRasterLoadDescBuffer)); for (i = 0; i < count; i++) { PlayerRasterLoadDesc[PlayerRasterLoadDescNumLoaded++] = PlayerRasterLoadDescBuffer[i]; } } // swizzle palettes array palettes = SPR_SWIZZLE(ALIGN4(animData), animData->palettesOffset); animData->palettesOffset = (PAL_PTR*)palettes; while (TRUE) { ptr1 = *palettes; if (ptr1 == PTR_LIST_END) { break; } // swizzle each palette pointer ptr1 = SPR_SWIZZLE(ALIGN4(animData), ptr1); *palettes++ = ptr1; } spr_swizzle_anim_offsets(0, 0, animData); return animData; }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_ItemBlock_replace_with_inactive /* 105A9C 802E421C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 105AA0 802E4220 AFB1001C */ sw $s1, 0x1C($sp) /* 105AA4 802E4224 0080882D */ daddu $s1, $a0, $zero /* 105AA8 802E4228 AFBF0024 */ sw $ra, 0x24($sp) /* 105AAC 802E422C AFB20020 */ sw $s2, 0x20($sp) /* 105AB0 802E4230 AFB00018 */ sw $s0, 0x18($sp) /* 105AB4 802E4234 0C0441A9 */ jal get_entity_type /* 105AB8 802E4238 92240004 */ lbu $a0, 0x4($s1) /* 105ABC 802E423C 3C04802F */ lui $a0, %hi(Entity_InertYellowBlock) /* 105AC0 802E4240 2484A07C */ addiu $a0, $a0, %lo(Entity_InertYellowBlock) /* 105AC4 802E4244 0040182D */ daddu $v1, $v0, $zero /* 105AC8 802E4248 28620015 */ slti $v0, $v1, 0x15 /* 105ACC 802E424C 10400005 */ beqz $v0, .L802E4264 /* 105AD0 802E4250 28620012 */ slti $v0, $v1, 0x12 /* 105AD4 802E4254 14400003 */ bnez $v0, .L802E4264 /* 105AD8 802E4258 00000000 */ nop /* 105ADC 802E425C 3C04802F */ lui $a0, %hi(Entity_InertRedBlock) /* 105AE0 802E4260 2484A0A0 */ addiu $a0, $a0, %lo(Entity_InertRedBlock) .L802E4264: /* 105AE4 802E4264 C6220048 */ lwc1 $f2, 0x48($s1) /* 105AE8 802E4268 C624004C */ lwc1 $f4, 0x4C($s1) /* 105AEC 802E426C C6260050 */ lwc1 $f6, 0x50($s1) /* 105AF0 802E4270 C6200064 */ lwc1 $f0, 0x64($s1) /* 105AF4 802E4274 3C028000 */ lui $v0, (0x80000000 >> 16) /* 105AF8 802E4278 AFA20014 */ sw $v0, 0x14($sp) /* 105AFC 802E427C 4600020D */ trunc.w.s $f8, $f0 /* 105B00 802E4280 E7A80010 */ swc1 $f8, 0x10($sp) /* 105B04 802E4284 4600120D */ trunc.w.s $f8, $f2 /* 105B08 802E4288 44054000 */ mfc1 $a1, $f8 /* 105B0C 802E428C 4600220D */ trunc.w.s $f8, $f4 /* 105B10 802E4290 44064000 */ mfc1 $a2, $f8 /* 105B14 802E4294 4600320D */ trunc.w.s $f8, $f6 /* 105B18 802E4298 44074000 */ mfc1 $a3, $f8 /* 105B1C 802E429C 0C044631 */ jal create_entity /* 105B20 802E42A0 00000000 */ nop /* 105B24 802E42A4 0040902D */ daddu $s2, $v0, $zero /* 105B28 802E42A8 0C04417A */ jal get_entity_by_index /* 105B2C 802E42AC 0240202D */ daddu $a0, $s2, $zero /* 105B30 802E42B0 0040802D */ daddu $s0, $v0, $zero /* 105B34 802E42B4 8E020000 */ lw $v0, 0x0($s0) /* 105B38 802E42B8 34430001 */ ori $v1, $v0, 0x1 /* 105B3C 802E42BC AE030000 */ sw $v1, 0x0($s0) /* 105B40 802E42C0 8E220000 */ lw $v0, 0x0($s1) /* 105B44 802E42C4 3C040004 */ lui $a0, (0x40000 >> 16) /* 105B48 802E42C8 00441024 */ and $v0, $v0, $a0 /* 105B4C 802E42CC 10400002 */ beqz $v0, .L802E42D8 /* 105B50 802E42D0 00641025 */ or $v0, $v1, $a0 /* 105B54 802E42D4 AE020000 */ sw $v0, 0x0($s0) .L802E42D8: /* 105B58 802E42D8 8E220000 */ lw $v0, 0x0($s1) /* 105B5C 802E42DC 30420004 */ andi $v0, $v0, 0x4 /* 105B60 802E42E0 10400004 */ beqz $v0, .L802E42F4 /* 105B64 802E42E4 00000000 */ nop /* 105B68 802E42E8 8E020000 */ lw $v0, 0x0($s0) /* 105B6C 802E42EC 34420004 */ ori $v0, $v0, 0x4 /* 105B70 802E42F0 AE020000 */ sw $v0, 0x0($s0) .L802E42F4: /* 105B74 802E42F4 0C044181 */ jal get_shadow_by_index /* 105B78 802E42F8 86040016 */ lh $a0, 0x16($s0) /* 105B7C 802E42FC 0040282D */ daddu $a1, $v0, $zero /* 105B80 802E4300 3C020040 */ lui $v0, (0x400001 >> 16) /* 105B84 802E4304 34420001 */ ori $v0, $v0, (0x400001 & 0xFFFF) /* 105B88 802E4308 8CA30000 */ lw $v1, 0x0($a1) /* 105B8C 802E430C 0220202D */ daddu $a0, $s1, $zero /* 105B90 802E4310 00621825 */ or $v1, $v1, $v0 /* 105B94 802E4314 0C044AC8 */ jal is_block_on_ground /* 105B98 802E4318 ACA30000 */ sw $v1, 0x0($a1) /* 105B9C 802E431C 92240004 */ lbu $a0, 0x4($s1) /* 105BA0 802E4320 0C0441A9 */ jal get_entity_type /* 105BA4 802E4324 0040802D */ daddu $s0, $v0, $zero /* 105BA8 802E4328 0040182D */ daddu $v1, $v0, $zero /* 105BAC 802E432C 24020012 */ addiu $v0, $zero, 0x12 /* 105BB0 802E4330 10620003 */ beq $v1, $v0, .L802E4340 /* 105BB4 802E4334 24020014 */ addiu $v0, $zero, 0x14 /* 105BB8 802E4338 14620005 */ bne $v1, $v0, .L802E4350 /* 105BBC 802E433C 00000000 */ nop .L802E4340: /* 105BC0 802E4340 3C04802F */ lui $a0, %hi(Entity_HitRedBlock) /* 105BC4 802E4344 2484A660 */ addiu $a0, $a0, %lo(Entity_HitRedBlock) /* 105BC8 802E4348 080B90DA */ j .L802E4368 /* 105BCC 802E434C 00000000 */ nop .L802E4350: /* 105BD0 802E4350 3C04802F */ lui $a0, %hi(Entity_HitFloatingYellowBlock) /* 105BD4 802E4354 2484A63C */ addiu $a0, $a0, %lo(Entity_HitFloatingYellowBlock) /* 105BD8 802E4358 12000003 */ beqz $s0, .L802E4368 /* 105BDC 802E435C 00000000 */ nop /* 105BE0 802E4360 3C04802F */ lui $a0, %hi(Entity_HitGroundedYellowBlock) /* 105BE4 802E4364 2484A618 */ addiu $a0, $a0, %lo(Entity_HitGroundedYellowBlock) .L802E4368: /* 105BE8 802E4368 C6220048 */ lwc1 $f2, 0x48($s1) /* 105BEC 802E436C C624004C */ lwc1 $f4, 0x4C($s1) /* 105BF0 802E4370 C6260050 */ lwc1 $f6, 0x50($s1) /* 105BF4 802E4374 C6200064 */ lwc1 $f0, 0x64($s1) /* 105BF8 802E4378 3C028000 */ lui $v0, (0x80000000 >> 16) /* 105BFC 802E437C AFA20014 */ sw $v0, 0x14($sp) /* 105C00 802E4380 4600020D */ trunc.w.s $f8, $f0 /* 105C04 802E4384 E7A80010 */ swc1 $f8, 0x10($sp) /* 105C08 802E4388 4600120D */ trunc.w.s $f8, $f2 /* 105C0C 802E438C 44054000 */ mfc1 $a1, $f8 /* 105C10 802E4390 4600220D */ trunc.w.s $f8, $f4 /* 105C14 802E4394 44064000 */ mfc1 $a2, $f8 /* 105C18 802E4398 4600320D */ trunc.w.s $f8, $f6 /* 105C1C 802E439C 44074000 */ mfc1 $a3, $f8 /* 105C20 802E43A0 0C044631 */ jal create_entity /* 105C24 802E43A4 00000000 */ nop /* 105C28 802E43A8 0C04417A */ jal get_entity_by_index /* 105C2C 802E43AC 0040202D */ daddu $a0, $v0, $zero /* 105C30 802E43B0 9223000B */ lbu $v1, 0xB($s1) /* 105C34 802E43B4 0040802D */ daddu $s0, $v0, $zero /* 105C38 802E43B8 A203000B */ sb $v1, 0xB($s0) /* 105C3C 802E43BC 8E220000 */ lw $v0, 0x0($s1) /* 105C40 802E43C0 30420001 */ andi $v0, $v0, 0x1 /* 105C44 802E43C4 14400005 */ bnez $v0, .L802E43DC /* 105C48 802E43C8 24020020 */ addiu $v0, $zero, 0x20 /* 105C4C 802E43CC 9222000B */ lbu $v0, 0xB($s1) /* 105C50 802E43D0 2C4200FF */ sltiu $v0, $v0, 0xFF /* 105C54 802E43D4 10400002 */ beqz $v0, .L802E43E0 /* 105C58 802E43D8 24020020 */ addiu $v0, $zero, 0x20 .L802E43DC: /* 105C5C 802E43DC A202000B */ sb $v0, 0xB($s0) .L802E43E0: /* 105C60 802E43E0 8E220000 */ lw $v0, 0x0($s1) /* 105C64 802E43E4 3C030004 */ lui $v1, (0x40000 >> 16) /* 105C68 802E43E8 00431024 */ and $v0, $v0, $v1 /* 105C6C 802E43EC 10400004 */ beqz $v0, .L802E4400 /* 105C70 802E43F0 00000000 */ nop /* 105C74 802E43F4 8E020000 */ lw $v0, 0x0($s0) /* 105C78 802E43F8 00431025 */ or $v0, $v0, $v1 /* 105C7C 802E43FC AE020000 */ sw $v0, 0x0($s0) .L802E4400: /* 105C80 802E4400 8E020040 */ lw $v0, 0x40($s0) /* 105C84 802E4404 A4520012 */ sh $s2, 0x12($v0) /* 105C88 802E4408 8E220000 */ lw $v0, 0x0($s1) /* 105C8C 802E440C 30420004 */ andi $v0, $v0, 0x4 /* 105C90 802E4410 10400004 */ beqz $v0, .L802E4424 /* 105C94 802E4414 2403FEFF */ addiu $v1, $zero, -0x101 /* 105C98 802E4418 8E020000 */ lw $v0, 0x0($s0) /* 105C9C 802E441C 34420004 */ ori $v0, $v0, 0x4 /* 105CA0 802E4420 AE020000 */ sw $v0, 0x0($s0) .L802E4424: /* 105CA4 802E4424 8E220000 */ lw $v0, 0x0($s1) /* 105CA8 802E4428 86240016 */ lh $a0, 0x16($s1) /* 105CAC 802E442C 00431024 */ and $v0, $v0, $v1 /* 105CB0 802E4430 0C044181 */ jal get_shadow_by_index /* 105CB4 802E4434 AE220000 */ sw $v0, 0x0($s1) /* 105CB8 802E4438 0040282D */ daddu $a1, $v0, $zero /* 105CBC 802E443C 3C031000 */ lui $v1, (0x10000001 >> 16) /* 105CC0 802E4440 8CA20000 */ lw $v0, 0x0($a1) /* 105CC4 802E4444 34630001 */ ori $v1, $v1, (0x10000001 & 0xFFFF) /* 105CC8 802E4448 00431025 */ or $v0, $v0, $v1 /* 105CCC 802E444C ACA20000 */ sw $v0, 0x0($a1) /* 105CD0 802E4450 0C044181 */ jal get_shadow_by_index /* 105CD4 802E4454 86040016 */ lh $a0, 0x16($s0) /* 105CD8 802E4458 0040282D */ daddu $a1, $v0, $zero /* 105CDC 802E445C 8CA20000 */ lw $v0, 0x0($a1) /* 105CE0 802E4460 3C030040 */ lui $v1, (0x400000 >> 16) /* 105CE4 802E4464 00431025 */ or $v0, $v0, $v1 /* 105CE8 802E4468 ACA20000 */ sw $v0, 0x0($a1) /* 105CEC 802E446C 8FBF0024 */ lw $ra, 0x24($sp) /* 105CF0 802E4470 8FB20020 */ lw $s2, 0x20($sp) /* 105CF4 802E4474 8FB1001C */ lw $s1, 0x1C($sp) /* 105CF8 802E4478 8FB00018 */ lw $s0, 0x18($sp) /* 105CFC 802E447C 03E00008 */ jr $ra /* 105D00 802E4480 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void entity_ItemBlock_replace_with_inactive(Entity* entity) { s32 entityType = get_entity_type(entity->listIndex); EntityBlueprint* bp = &Entity_InertYellowBlock; s32 childEntityIndex; s32 isBlockOnGround; s32 parentEntityType; BlockData* childData; Entity* childEntity; Shadow* shadow; if (entityType < ENTITY_TYPE_HAMMER1_BLOCK) { bp = &Entity_InertYellowBlock; if (entityType >= ENTITY_TYPE_HIDDEN_RED_BLOCK) { bp = &Entity_InertRedBlock; } } // this child entity is the inert block childEntityIndex = create_entity(bp, (s32)entity->position.x, (s32)entity->position.y, (s32)entity->position.z, (s32)entity->rotation.y, MAKE_ENTITY_END); childEntity = get_entity_by_index(childEntityIndex); childEntity->flags |= ENTITY_FLAG_HIDDEN; if (entity->flags & ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2) { childEntity->flags |= ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2; } if (entity->flags & ENTITY_FLAG_HAS_DYNAMIC_SHADOW) { childEntity->flags |= ENTITY_FLAG_HAS_DYNAMIC_SHADOW; } shadow = get_shadow_by_index(childEntity->shadowIndex); shadow->flags |= (ENTITY_FLAG_SHADOW_POS_DIRTY | ENTITY_FLAG_HIDDEN); isBlockOnGround = is_block_on_ground(entity); parentEntityType = get_entity_type(entity->listIndex); if (parentEntityType == ENTITY_TYPE_HIDDEN_RED_BLOCK || parentEntityType == ENTITY_TYPE_RED_BLOCK) { bp = &Entity_HitRedBlock; } else if (isBlockOnGround != 0) { bp = &Entity_HitGroundedYellowBlock; } else { bp = &Entity_HitFloatingYellowBlock; } // child entity is now the animated block which appears before it turns inert childEntity = get_entity_by_index(create_entity(bp, (s32)entity->position.x, (s32)entity->position.y, (s32)entity->position.z, (s32)entity->rotation.y, MAKE_ENTITY_END)); childEntity->alpha = entity->alpha; if ((entity->flags & ENTITY_FLAG_HIDDEN) || (entity->alpha < 255)) { childEntity->alpha = 32; } if (entity->flags & ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2) { childEntity->flags |= ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2; } childData = childEntity->dataBuf.block; childData->childEntityIndex = childEntityIndex; if (entity->flags & ENTITY_FLAG_HAS_DYNAMIC_SHADOW) { childEntity->flags |= ENTITY_FLAG_HAS_DYNAMIC_SHADOW; } entity->flags &= ~ENTITY_FLAG_HAS_SHADOW; shadow = get_shadow_by_index(entity->shadowIndex); shadow->flags |= (ENTITY_FLAG_FADING_AWAY | ENTITY_FLAG_HIDDEN); shadow = get_shadow_by_index(childEntity->shadowIndex); shadow->flags |= ENTITY_FLAG_SHADOW_POS_DIRTY; }
### RAW ASSEMBLY INSTRUCTIONS: glabel butterflies_update /* 3AAA2C E00AA10C 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 3AAA30 E00AA110 AFBF0014 */ sw $ra, 0x14($sp) /* 3AAA34 E00AA114 AFB00010 */ sw $s0, 0x10($sp) /* 3AAA38 E00AA118 F7BA0030 */ sdc1 $f26, 0x30($sp) /* 3AAA3C E00AA11C F7B80028 */ sdc1 $f24, 0x28($sp) /* 3AAA40 E00AA120 F7B60020 */ sdc1 $f22, 0x20($sp) /* 3AAA44 E00AA124 F7B40018 */ sdc1 $f20, 0x18($sp) /* 3AAA48 E00AA128 8C830000 */ lw $v1, 0x0($a0) /* 3AAA4C E00AA12C 8C90000C */ lw $s0, 0xC($a0) /* 3AAA50 E00AA130 30620010 */ andi $v0, $v1, 0x10 /* 3AAA54 E00AA134 10400005 */ beqz $v0, .LE00AA14C /* 3AAA58 E00AA138 2402FFEF */ addiu $v0, $zero, -0x11 /* 3AAA5C E00AA13C 00621024 */ and $v0, $v1, $v0 /* 3AAA60 E00AA140 AC820000 */ sw $v0, 0x0($a0) /* 3AAA64 E00AA144 24020384 */ addiu $v0, $zero, 0x384 /* 3AAA68 E00AA148 AE020004 */ sw $v0, 0x4($s0) .LE00AA14C: /* 3AAA6C E00AA14C 8E030004 */ lw $v1, 0x4($s0) /* 3AAA70 E00AA150 286203E8 */ slti $v0, $v1, 0x3E8 /* 3AAA74 E00AA154 10400002 */ beqz $v0, .LE00AA160 /* 3AAA78 E00AA158 2462FFFF */ addiu $v0, $v1, -0x1 /* 3AAA7C E00AA15C AE020004 */ sw $v0, 0x4($s0) .LE00AA160: /* 3AAA80 E00AA160 8E020008 */ lw $v0, 0x8($s0) /* 3AAA84 E00AA164 8E030004 */ lw $v1, 0x4($s0) /* 3AAA88 E00AA168 24420001 */ addiu $v0, $v0, 0x1 /* 3AAA8C E00AA16C 04610005 */ bgez $v1, .LE00AA184 /* 3AAA90 E00AA170 AE020008 */ sw $v0, 0x8($s0) /* 3AAA94 E00AA174 0C080128 */ jal shim_remove_effect /* 3AAA98 E00AA178 00000000 */ nop /* 3AAA9C E00AA17C 0802A8E8 */ j .LE00AA3A0 /* 3AAAA0 E00AA180 00000000 */ nop .LE00AA184: /* 3AAAA4 E00AA184 28620010 */ slti $v0, $v1, 0x10 /* 3AAAA8 E00AA188 10400002 */ beqz $v0, .LE00AA194 /* 3AAAAC E00AA18C 00031100 */ sll $v0, $v1, 4 /* 3AAAB0 E00AA190 AE020024 */ sw $v0, 0x24($s0) .LE00AA194: /* 3AAAB4 E00AA194 8E020030 */ lw $v0, 0x30($s0) /* 3AAAB8 E00AA198 2442FFFF */ addiu $v0, $v0, -0x1 /* 3AAABC E00AA19C 1C40006D */ bgtz $v0, .LE00AA354 /* 3AAAC0 E00AA1A0 AE020030 */ sw $v0, 0x30($s0) /* 3AAAC4 E00AA1A4 0C080138 */ jal shim_rand_int /* 3AAAC8 E00AA1A8 24040167 */ addiu $a0, $zero, 0x167 /* 3AAACC E00AA1AC 4482A000 */ mtc1 $v0, $f20 /* 3AAAD0 E00AA1B0 00000000 */ nop /* 3AAAD4 E00AA1B4 4680A520 */ cvt.s.w $f20, $f20 /* 3AAAD8 E00AA1B8 0C080140 */ jal shim_sin_deg /* 3AAADC E00AA1BC 4600A306 */ mov.s $f12, $f20 /* 3AAAE0 E00AA1C0 C6020034 */ lwc1 $f2, 0x34($s0) /* 3AAAE4 E00AA1C4 46001082 */ mul.s $f2, $f2, $f0 /* 3AAAE8 E00AA1C8 00000000 */ nop /* 3AAAEC E00AA1CC C6000038 */ lwc1 $f0, 0x38($s0) /* 3AAAF0 E00AA1D0 C6180018 */ lwc1 $f24, 0x18($s0) /* 3AAAF4 E00AA1D4 4600028D */ trunc.w.s $f10, $f0 /* 3AAAF8 E00AA1D8 44045000 */ mfc1 $a0, $f10 /* 3AAAFC E00AA1DC 0C080138 */ jal shim_rand_int /* 3AAB00 E00AA1E0 4602C600 */ add.s $f24, $f24, $f2 /* 3AAB04 E00AA1E4 4600A306 */ mov.s $f12, $f20 /* 3AAB08 E00AA1E8 C616001C */ lwc1 $f22, 0x1C($s0) /* 3AAB0C E00AA1EC 44820000 */ mtc1 $v0, $f0 /* 3AAB10 E00AA1F0 00000000 */ nop /* 3AAB14 E00AA1F4 46800020 */ cvt.s.w $f0, $f0 /* 3AAB18 E00AA1F8 0C080144 */ jal shim_cos_deg /* 3AAB1C E00AA1FC 4600B580 */ add.s $f22, $f22, $f0 /* 3AAB20 E00AA200 C6020034 */ lwc1 $f2, 0x34($s0) /* 3AAB24 E00AA204 46001082 */ mul.s $f2, $f2, $f0 /* 3AAB28 E00AA208 00000000 */ nop /* 3AAB2C E00AA20C C6140020 */ lwc1 $f20, 0x20($s0) /* 3AAB30 E00AA210 24040064 */ addiu $a0, $zero, 0x64 /* 3AAB34 E00AA214 0C080138 */ jal shim_rand_int /* 3AAB38 E00AA218 4602A500 */ add.s $f20, $f20, $f2 /* 3AAB3C E00AA21C C604000C */ lwc1 $f4, 0xC($s0) /* 3AAB40 E00AA220 4604C601 */ sub.s $f24, $f24, $f4 /* 3AAB44 E00AA224 C6060010 */ lwc1 $f6, 0x10($s0) /* 3AAB48 E00AA228 4606B581 */ sub.s $f22, $f22, $f6 /* 3AAB4C E00AA22C C6080014 */ lwc1 $f8, 0x14($s0) /* 3AAB50 E00AA230 44801000 */ mtc1 $zero, $f2 /* 3AAB54 E00AA234 4608A501 */ sub.s $f20, $f20, $f8 /* 3AAB58 E00AA238 2442000A */ addiu $v0, $v0, 0xA /* 3AAB5C E00AA23C 4602C032 */ c.eq.s $f24, $f2 /* 3AAB60 E00AA240 00000000 */ nop /* 3AAB64 E00AA244 4500001E */ bc1f .LE00AA2C0 /* 3AAB68 E00AA248 AE020030 */ sw $v0, 0x30($s0) /* 3AAB6C E00AA24C 4602B032 */ c.eq.s $f22, $f2 /* 3AAB70 E00AA250 00000000 */ nop /* 3AAB74 E00AA254 4500001A */ bc1f .LE00AA2C0 /* 3AAB78 E00AA258 00000000 */ nop /* 3AAB7C E00AA25C 4602A032 */ c.eq.s $f20, $f2 /* 3AAB80 E00AA260 00000000 */ nop /* 3AAB84 E00AA264 45000016 */ bc1f .LE00AA2C0 /* 3AAB88 E00AA268 00000000 */ nop /* 3AAB8C E00AA26C C6000018 */ lwc1 $f0, 0x18($s0) /* 3AAB90 E00AA270 46040601 */ sub.s $f24, $f0, $f4 /* 3AAB94 E00AA274 C600001C */ lwc1 $f0, 0x1C($s0) /* 3AAB98 E00AA278 46060581 */ sub.s $f22, $f0, $f6 /* 3AAB9C E00AA27C C6000020 */ lwc1 $f0, 0x20($s0) /* 3AABA0 E00AA280 4602C032 */ c.eq.s $f24, $f2 /* 3AABA4 E00AA284 00000000 */ nop /* 3AABA8 E00AA288 4500000D */ bc1f .LE00AA2C0 /* 3AABAC E00AA28C 46080501 */ sub.s $f20, $f0, $f8 /* 3AABB0 E00AA290 4602B032 */ c.eq.s $f22, $f2 /* 3AABB4 E00AA294 00000000 */ nop /* 3AABB8 E00AA298 45000009 */ bc1f .LE00AA2C0 /* 3AABBC E00AA29C 00000000 */ nop /* 3AABC0 E00AA2A0 4602A032 */ c.eq.s $f20, $f2 /* 3AABC4 E00AA2A4 00000000 */ nop /* 3AABC8 E00AA2A8 45000005 */ bc1f .LE00AA2C0 /* 3AABCC E00AA2AC 00000000 */ nop /* 3AABD0 E00AA2B0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3AABD4 E00AA2B4 4481C000 */ mtc1 $at, $f24 /* 3AABD8 E00AA2B8 46001506 */ mov.s $f20, $f2 /* 3AABDC E00AA2BC 46001586 */ mov.s $f22, $f2 .LE00AA2C0: /* 3AABE0 E00AA2C0 4618C002 */ mul.s $f0, $f24, $f24 /* 3AABE4 E00AA2C4 00000000 */ nop /* 3AABE8 E00AA2C8 4616B082 */ mul.s $f2, $f22, $f22 /* 3AABEC E00AA2CC 00000000 */ nop /* 3AABF0 E00AA2D0 4614A102 */ mul.s $f4, $f20, $f20 /* 3AABF4 E00AA2D4 00000000 */ nop /* 3AABF8 E00AA2D8 46020000 */ add.s $f0, $f0, $f2 /* 3AABFC E00AA2DC 46040300 */ add.s $f12, $f0, $f4 /* 3AAC00 E00AA2E0 4480D000 */ mtc1 $zero, $f26 /* 3AAC04 E00AA2E4 00000000 */ nop /* 3AAC08 E00AA2E8 461A6032 */ c.eq.s $f12, $f26 /* 3AAC0C E00AA2EC 00000000 */ nop /* 3AAC10 E00AA2F0 45010007 */ bc1t .LE00AA310 /* 3AAC14 E00AA2F4 00000000 */ nop /* 3AAC18 E00AA2F8 0C080154 */ jal shim_sqrtf /* 3AAC1C E00AA2FC 00000000 */ nop /* 3AAC20 E00AA300 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3AAC24 E00AA304 44811000 */ mtc1 $at, $f2 /* 3AAC28 E00AA308 00000000 */ nop /* 3AAC2C E00AA30C 46001303 */ div.s $f12, $f2, $f0 .LE00AA310: /* 3AAC30 E00AA310 460CC602 */ mul.s $f24, $f24, $f12 /* 3AAC34 E00AA314 00000000 */ nop /* 3AAC38 E00AA318 460CA502 */ mul.s $f20, $f20, $f12 /* 3AAC3C E00AA31C 00000000 */ nop /* 3AAC40 E00AA320 460CB582 */ mul.s $f22, $f22, $f12 /* 3AAC44 E00AA324 00000000 */ nop /* 3AAC48 E00AA328 4600D306 */ mov.s $f12, $f26 /* 3AAC4C E00AA32C E618003C */ swc1 $f24, 0x3C($s0) /* 3AAC50 E00AA330 4600C006 */ mov.s $f0, $f24 /* 3AAC54 E00AA334 4407A000 */ mfc1 $a3, $f20 /* 3AAC58 E00AA338 46000007 */ neg.s $f0, $f0 /* 3AAC5C E00AA33C 44060000 */ mfc1 $a2, $f0 /* 3AAC60 E00AA340 46006386 */ mov.s $f14, $f12 /* 3AAC64 E00AA344 E6160040 */ swc1 $f22, 0x40($s0) /* 3AAC68 E00AA348 0C080148 */ jal shim_atan2 /* 3AAC6C E00AA34C E6140044 */ swc1 $f20, 0x44($s0) /* 3AAC70 E00AA350 E6000028 */ swc1 $f0, 0x28($s0) .LE00AA354: /* 3AAC74 E00AA354 8E03002C */ lw $v1, 0x2C($s0) /* 3AAC78 E00AA358 24620003 */ addiu $v0, $v1, 0x3 /* 3AAC7C E00AA35C AE02002C */ sw $v0, 0x2C($s0) /* 3AAC80 E00AA360 2842001E */ slti $v0, $v0, 0x1E /* 3AAC84 E00AA364 14400002 */ bnez $v0, .LE00AA370 /* 3AAC88 E00AA368 2462FFE5 */ addiu $v0, $v1, -0x1B /* 3AAC8C E00AA36C AE02002C */ sw $v0, 0x2C($s0) .LE00AA370: /* 3AAC90 E00AA370 C606000C */ lwc1 $f6, 0xC($s0) /* 3AAC94 E00AA374 C600003C */ lwc1 $f0, 0x3C($s0) /* 3AAC98 E00AA378 C6040010 */ lwc1 $f4, 0x10($s0) /* 3AAC9C E00AA37C 46003180 */ add.s $f6, $f6, $f0 /* 3AACA0 E00AA380 C6000040 */ lwc1 $f0, 0x40($s0) /* 3AACA4 E00AA384 C6020014 */ lwc1 $f2, 0x14($s0) /* 3AACA8 E00AA388 46002100 */ add.s $f4, $f4, $f0 /* 3AACAC E00AA38C C6000044 */ lwc1 $f0, 0x44($s0) /* 3AACB0 E00AA390 46001080 */ add.s $f2, $f2, $f0 /* 3AACB4 E00AA394 E606000C */ swc1 $f6, 0xC($s0) /* 3AACB8 E00AA398 E6040010 */ swc1 $f4, 0x10($s0) /* 3AACBC E00AA39C E6020014 */ swc1 $f2, 0x14($s0) .LE00AA3A0: /* 3AACC0 E00AA3A0 8FBF0014 */ lw $ra, 0x14($sp) /* 3AACC4 E00AA3A4 8FB00010 */ lw $s0, 0x10($sp) /* 3AACC8 E00AA3A8 D7BA0030 */ ldc1 $f26, 0x30($sp) /* 3AACCC E00AA3AC D7B80028 */ ldc1 $f24, 0x28($sp) /* 3AACD0 E00AA3B0 D7B60020 */ ldc1 $f22, 0x20($sp) /* 3AACD4 E00AA3B4 D7B40018 */ ldc1 $f20, 0x18($sp) /* 3AACD8 E00AA3B8 03E00008 */ jr $ra /* 3AACDC E00AA3BC 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void butterflies_update(EffectInstance* effect) { ButterfliesFXData* temp_s0; f32 temp_f20; f32 temp_f20_2; f32 temp_f22; f32 temp_f24; f32 temp_f4; f32 temp_f6; f32 temp_f8; f32 var_f12; f32 var_f20; f32 var_f22; f32 var_f24; temp_s0 = effect->data.butterflies; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; temp_s0->unk_04 = 900; } if (temp_s0->unk_04 < 1000) { temp_s0->unk_04--; } temp_s0->unk_08 += 1; if (temp_s0->unk_04 < 0) { shim_remove_effect(effect); return; } if (temp_s0->unk_04 < 0x10) { temp_s0->unk_24 = temp_s0->unk_04 * 0x10; } temp_s0->unk_30--; if (temp_s0->unk_30 <= 0) { s32 t; temp_f20 = shim_rand_int(359); temp_f24 = temp_s0->unk_18 + (temp_s0->unk_34 * shim_sin_deg(temp_f20)); temp_f22 = temp_s0->unk_1C + shim_rand_int(temp_s0->unk_38); temp_f20_2 = temp_s0->unk_20 + (temp_s0->unk_34 * shim_cos_deg(temp_f20)); t = shim_rand_int(100) + 10; temp_f4 = temp_s0->unk_0C; temp_f6 = temp_s0->unk_10; temp_f8 = temp_s0->unk_14; var_f24 = temp_f24 - temp_f4; var_f22 = temp_f22 - temp_f6; var_f20 = temp_f20_2 - temp_f8; temp_s0->unk_30 = t; if (var_f24 == 0.0f && var_f22 == 0.0f && var_f20 == 0.0f) { var_f24 = temp_s0->unk_18 - temp_f4; var_f22 = temp_s0->unk_1C - temp_f6; var_f20 = temp_s0->unk_20 - temp_f8; if (var_f24 == 0.0f && var_f22 == 0.0f && var_f20 == 0.0f) { var_f24 = 1.0f; var_f20 = 0.0f; var_f22 = 0.0f; } } var_f12 = SQ(var_f24) + SQ(var_f22) + SQ(var_f20); if (var_f12 != 0.0f) { var_f12 = 1.0f / shim_sqrtf(var_f12); } var_f24 *= var_f12; var_f22 *= var_f12; var_f20 *= var_f12; temp_s0->unk_3C = var_f24; temp_s0->unk_40 = var_f22; temp_s0->unk_44 = var_f20; temp_s0->unk_28 = shim_atan2(0.0f, 0.0f, -temp_s0->unk_3C, temp_s0->unk_44); } temp_s0->unk_2C += 3; if (temp_s0->unk_2C >= 30) { temp_s0->unk_2C -= 30; } temp_s0->unk_0C += temp_s0->unk_3C; temp_s0->unk_10 += temp_s0->unk_40; temp_s0->unk_14 += temp_s0->unk_44; }
### RAW ASSEMBLY INSTRUCTIONS: glabel FallToGoal /* 1A84CC 80279BEC 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 1A84D0 80279BF0 AFB20020 */ sw $s2, 0x20($sp) /* 1A84D4 80279BF4 0080902D */ daddu $s2, $a0, $zero /* 1A84D8 80279BF8 AFBF0024 */ sw $ra, 0x24($sp) /* 1A84DC 80279BFC AFB1001C */ sw $s1, 0x1C($sp) /* 1A84E0 80279C00 AFB00018 */ sw $s0, 0x18($sp) /* 1A84E4 80279C04 F7BE0050 */ sdc1 $f30, 0x50($sp) /* 1A84E8 80279C08 F7BC0048 */ sdc1 $f28, 0x48($sp) /* 1A84EC 80279C0C F7BA0040 */ sdc1 $f26, 0x40($sp) /* 1A84F0 80279C10 F7B80038 */ sdc1 $f24, 0x38($sp) /* 1A84F4 80279C14 F7B60030 */ sdc1 $f22, 0x30($sp) /* 1A84F8 80279C18 F7B40028 */ sdc1 $f20, 0x28($sp) /* 1A84FC 80279C1C 8E51000C */ lw $s1, 0xC($s2) /* 1A8500 80279C20 54A00001 */ bnel $a1, $zero, .L80279C28 /* 1A8504 80279C24 AE400070 */ sw $zero, 0x70($s2) .L80279C28: /* 1A8508 80279C28 8E420070 */ lw $v0, 0x70($s2) /* 1A850C 80279C2C 1440005A */ bnez $v0, .L80279D98 /* 1A8510 80279C30 00000000 */ nop /* 1A8514 80279C34 8E250000 */ lw $a1, 0x0($s1) /* 1A8518 80279C38 26310004 */ addiu $s1, $s1, 0x4 /* 1A851C 80279C3C 0C0B1EAF */ jal evt_get_variable /* 1A8520 80279C40 0240202D */ daddu $a0, $s2, $zero /* 1A8524 80279C44 0040202D */ daddu $a0, $v0, $zero /* 1A8528 80279C48 2402FF81 */ addiu $v0, $zero, -0x7F /* 1A852C 80279C4C 14820002 */ bne $a0, $v0, .L80279C58 /* 1A8530 80279C50 00000000 */ nop /* 1A8534 80279C54 8E440148 */ lw $a0, 0x148($s2) .L80279C58: /* 1A8538 80279C58 0C09A75B */ jal get_actor /* 1A853C 80279C5C 00000000 */ nop /* 1A8540 80279C60 0040802D */ daddu $s0, $v0, $zero /* 1A8544 80279C64 AE500074 */ sw $s0, 0x74($s2) /* 1A8548 80279C68 8E250000 */ lw $a1, 0x0($s1) /* 1A854C 80279C6C 0C0B1EAF */ jal evt_get_variable /* 1A8550 80279C70 0240202D */ daddu $a0, $s2, $zero /* 1A8554 80279C74 C6000148 */ lwc1 $f0, 0x148($s0) /* 1A8558 80279C78 C61A0018 */ lwc1 $f26, 0x18($s0) /* 1A855C 80279C7C C61C0020 */ lwc1 $f28, 0x20($s0) /* 1A8560 80279C80 C614014C */ lwc1 $f20, 0x14C($s0) /* 1A8564 80279C84 C618001C */ lwc1 $f24, 0x1C($s0) /* 1A8568 80279C88 A6020070 */ sh $v0, 0x70($s0) /* 1A856C 80279C8C E6000010 */ swc1 $f0, 0x10($s0) /* 1A8570 80279C90 46000786 */ mov.s $f30, $f0 /* 1A8574 80279C94 4406D000 */ mfc1 $a2, $f26 /* 1A8578 80279C98 4407E000 */ mfc1 $a3, $f28 /* 1A857C 80279C9C C6000144 */ lwc1 $f0, 0x144($s0) /* 1A8580 80279CA0 4600A386 */ mov.s $f14, $f20 /* 1A8584 80279CA4 E6140014 */ swc1 $f20, 0x14($s0) /* 1A8588 80279CA8 E600000C */ swc1 $f0, 0xC($s0) /* 1A858C 80279CAC 46000586 */ mov.s $f22, $f0 /* 1A8590 80279CB0 0C00A720 */ jal atan2 /* 1A8594 80279CB4 4600B306 */ mov.s $f12, $f22 /* 1A8598 80279CB8 4600B306 */ mov.s $f12, $f22 /* 1A859C 80279CBC 4600A386 */ mov.s $f14, $f20 /* 1A85A0 80279CC0 4406D000 */ mfc1 $a2, $f26 /* 1A85A4 80279CC4 4407E000 */ mfc1 $a3, $f28 /* 1A85A8 80279CC8 461EC781 */ sub.s $f30, $f24, $f30 /* 1A85AC 80279CCC 0C00A7B5 */ jal dist2D /* 1A85B0 80279CD0 E6000054 */ swc1 $f0, 0x54($s0) /* 1A85B4 80279CD4 46000086 */ mov.s $f2, $f0 /* 1A85B8 80279CD8 86020070 */ lh $v0, 0x70($s0) /* 1A85BC 80279CDC 2611000C */ addiu $s1, $s0, 0xC /* 1A85C0 80279CE0 14400007 */ bnez $v0, .L80279D00 /* 1A85C4 80279CE4 E6020058 */ swc1 $f2, 0x58($s0) /* 1A85C8 80279CE8 C600004C */ lwc1 $f0, 0x4C($s0) /* 1A85CC 80279CEC 46001003 */ div.s $f0, $f2, $f0 /* 1A85D0 80279CF0 4600018D */ trunc.w.s $f6, $f0 /* 1A85D4 80279CF4 44023000 */ mfc1 $v0, $f6 /* 1A85D8 80279CF8 0809E745 */ j .L80279D14 /* 1A85DC 80279CFC A6020070 */ sh $v0, 0x70($s0) .L80279D00: /* 1A85E0 80279D00 44820000 */ mtc1 $v0, $f0 /* 1A85E4 80279D04 00000000 */ nop /* 1A85E8 80279D08 46800020 */ cvt.s.w $f0, $f0 /* 1A85EC 80279D0C 46001003 */ div.s $f0, $f2, $f0 /* 1A85F0 80279D10 E600004C */ swc1 $f0, 0x4C($s0) .L80279D14: /* 1A85F4 80279D14 86230064 */ lh $v1, 0x64($s1) /* 1A85F8 80279D18 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 1A85FC 80279D1C 44810800 */ mtc1 $at, $f1 /* 1A8600 80279D20 44800000 */ mtc1 $zero, $f0 /* 1A8604 80279D24 00031023 */ negu $v0, $v1 /* 1A8608 80279D28 44821000 */ mtc1 $v0, $f2 /* 1A860C 80279D2C 00000000 */ nop /* 1A8610 80279D30 468010A1 */ cvt.d.w $f2, $f2 /* 1A8614 80279D34 46201082 */ mul.d $f2, $f2, $f0 /* 1A8618 80279D38 00000000 */ nop /* 1A861C 80279D3C AE200044 */ sw $zero, 0x44($s1) /* 1A8620 80279D40 C6240044 */ lwc1 $f4, 0x44($s1) /* 1A8624 80279D44 44830000 */ mtc1 $v1, $f0 /* 1A8628 80279D48 00000000 */ nop /* 1A862C 80279D4C 46800020 */ cvt.s.w $f0, $f0 /* 1A8630 80279D50 4600F003 */ div.s $f0, $f30, $f0 /* 1A8634 80279D54 46040001 */ sub.s $f0, $f0, $f4 /* 1A8638 80279D58 46000021 */ cvt.d.s $f0, $f0 /* 1A863C 80279D5C 46220003 */ div.d $f0, $f0, $f2 /* 1A8640 80279D60 46200020 */ cvt.s.d $f0, $f0 /* 1A8644 80279D64 E620003C */ swc1 $f0, 0x3C($s1) /* 1A8648 80279D68 8E0201AC */ lw $v0, 0x1AC($s0) /* 1A864C 80279D6C 10400009 */ beqz $v0, .L80279D94 /* 1A8650 80279D70 24020001 */ addiu $v0, $zero, 0x1 /* 1A8654 80279D74 C600014C */ lwc1 $f0, 0x14C($s0) /* 1A8658 80279D78 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A865C 80279D7C 8E0401AC */ lw $a0, 0x1AC($s0) /* 1A8660 80279D80 8E060144 */ lw $a2, 0x144($s0) /* 1A8664 80279D84 8E070148 */ lw $a3, 0x148($s0) /* 1A8668 80279D88 0C052757 */ jal sfx_play_sound_at_position /* 1A866C 80279D8C 0000282D */ daddu $a1, $zero, $zero /* 1A8670 80279D90 24020001 */ addiu $v0, $zero, 0x1 .L80279D94: /* 1A8674 80279D94 AE420070 */ sw $v0, 0x70($s2) .L80279D98: /* 1A8678 80279D98 8E500074 */ lw $s0, 0x74($s2) /* 1A867C 80279D9C C6040010 */ lwc1 $f4, 0x10($s0) /* 1A8680 80279DA0 C6000050 */ lwc1 $f0, 0x50($s0) /* 1A8684 80279DA4 8E05004C */ lw $a1, 0x4C($s0) /* 1A8688 80279DA8 46002100 */ add.s $f4, $f4, $f0 /* 1A868C 80279DAC C6020048 */ lwc1 $f2, 0x48($s0) /* 1A8690 80279DB0 8E060054 */ lw $a2, 0x54($s0) /* 1A8694 80279DB4 46020001 */ sub.s $f0, $f0, $f2 /* 1A8698 80279DB8 2604000C */ addiu $a0, $s0, 0xC /* 1A869C 80279DBC E6040010 */ swc1 $f4, 0x10($s0) /* 1A86A0 80279DC0 0C09904A */ jal add_xz_vec3f /* 1A86A4 80279DC4 E6000050 */ swc1 $f0, 0x50($s0) /* 1A86A8 80279DC8 C600000C */ lwc1 $f0, 0xC($s0) /* 1A86AC 80279DCC C6020010 */ lwc1 $f2, 0x10($s0) /* 1A86B0 80279DD0 96020070 */ lhu $v0, 0x70($s0) /* 1A86B4 80279DD4 C6040014 */ lwc1 $f4, 0x14($s0) /* 1A86B8 80279DD8 2442FFFF */ addiu $v0, $v0, -0x1 /* 1A86BC 80279DDC A6020070 */ sh $v0, 0x70($s0) /* 1A86C0 80279DE0 00021400 */ sll $v0, $v0, 16 /* 1A86C4 80279DE4 E6000144 */ swc1 $f0, 0x144($s0) /* 1A86C8 80279DE8 E6020148 */ swc1 $f2, 0x148($s0) /* 1A86CC 80279DEC 18400003 */ blez $v0, .L80279DFC /* 1A86D0 80279DF0 E604014C */ swc1 $f4, 0x14C($s0) /* 1A86D4 80279DF4 0809E78D */ j .L80279E34 /* 1A86D8 80279DF8 0000102D */ daddu $v0, $zero, $zero .L80279DFC: /* 1A86DC 80279DFC C6000054 */ lwc1 $f0, 0x54($s0) /* 1A86E0 80279E00 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A86E4 80279E04 8E050018 */ lw $a1, 0x18($s0) /* 1A86E8 80279E08 8E06001C */ lw $a2, 0x1C($s0) /* 1A86EC 80279E0C 8E070020 */ lw $a3, 0x20($s0) /* 1A86F0 80279E10 0C0990BC */ jal play_movement_dust_effects /* 1A86F4 80279E14 24040002 */ addiu $a0, $zero, 0x2 /* 1A86F8 80279E18 C6000018 */ lwc1 $f0, 0x18($s0) /* 1A86FC 80279E1C C602001C */ lwc1 $f2, 0x1C($s0) /* 1A8700 80279E20 C6040020 */ lwc1 $f4, 0x20($s0) /* 1A8704 80279E24 24020001 */ addiu $v0, $zero, 0x1 /* 1A8708 80279E28 E6000144 */ swc1 $f0, 0x144($s0) /* 1A870C 80279E2C E6020148 */ swc1 $f2, 0x148($s0) /* 1A8710 80279E30 E604014C */ swc1 $f4, 0x14C($s0) .L80279E34: /* 1A8714 80279E34 8FBF0024 */ lw $ra, 0x24($sp) /* 1A8718 80279E38 8FB20020 */ lw $s2, 0x20($sp) /* 1A871C 80279E3C 8FB1001C */ lw $s1, 0x1C($sp) /* 1A8720 80279E40 8FB00018 */ lw $s0, 0x18($sp) /* 1A8724 80279E44 D7BE0050 */ ldc1 $f30, 0x50($sp) /* 1A8728 80279E48 D7BC0048 */ ldc1 $f28, 0x48($sp) /* 1A872C 80279E4C D7BA0040 */ ldc1 $f26, 0x40($sp) /* 1A8730 80279E50 D7B80038 */ ldc1 $f24, 0x38($sp) /* 1A8734 80279E54 D7B60030 */ ldc1 $f22, 0x30($sp) /* 1A8738 80279E58 D7B40028 */ ldc1 $f20, 0x28($sp) /* 1A873C 80279E5C 03E00008 */ jr $ra /* 1A8740 80279E60 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: ApiStatus FallToGoal(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor; ActorState* state; f32 posX, posY, posZ; f32 goalX, goalY, goalZ; if (isInitialCall) { script->functionTemp[0] = 0; } if (script->functionTemp[0] == 0) { s32 actorID = evt_get_variable(script, *args++); if (actorID == ACTOR_SELF) { actorID = script->owner1.enemyID; } actor = get_actor(actorID); state = &actor->state; script->functionTempPtr[1] = actor; actor->state.moveTime = evt_get_variable(script, *args++); actor->state.currentPos.x = actor->currentPos.x; actor->state.currentPos.y = actor->currentPos.y; actor->state.currentPos.z = actor->currentPos.z; posX = actor->state.currentPos.x; posY = actor->state.currentPos.y; posZ = actor->state.currentPos.z; goalX = actor->state.goalPos.x; goalY = actor->state.goalPos.y; goalZ = actor->state.goalPos.z; actor->state.angle = atan2(posX, posZ, goalX, goalZ); actor->state.distance = dist2D(posX, posZ, goalX, goalZ); // make relative posX = (goalX - posX); posY = (goalY - posY); posZ = (goalZ - posZ); if (actor->state.moveTime == 0) { actor->state.moveTime = actor->state.distance / actor->state.speed; } else { actor->state.speed = actor->state.distance / actor->state.moveTime; } state->velocity = 0.0f; state->acceleration = (posY / state->moveTime - state->velocity) / (-state->moveTime * 0.5); if (actor->actorTypeData1[4] != 0) { sfx_play_sound_at_position(actor->actorTypeData1[4], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); } script->functionTemp[0] = 1; } actor = script->functionTempPtr[1]; actor->state.currentPos.y += actor->state.velocity; actor->state.velocity -= actor->state.acceleration; add_xz_vec3f(&actor->state.currentPos, actor->state.speed, actor->state.angle); actor->currentPos.x = actor->state.currentPos.x; actor->currentPos.y = actor->state.currentPos.y; actor->currentPos.z = actor->state.currentPos.z; actor->state.moveTime--; if (actor->state.moveTime <= 0) { play_movement_dust_effects(2, actor->state.goalPos.x, actor->state.goalPos.y, actor->state.goalPos.z, actor->state.angle); actor->currentPos.x = actor->state.goalPos.x; actor->currentPos.y = actor->state.goalPos.y; actor->currentPos.z = actor->state.goalPos.z; return ApiStatus_DONE1; } else { return ApiStatus_BLOCK; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel falling_leaves_update /* 35EAD4 E00581B4 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 35EAD8 E00581B8 AFB3001C */ sw $s3, 0x1C($sp) /* 35EADC E00581BC 0080982D */ daddu $s3, $a0, $zero /* 35EAE0 E00581C0 AFBF0020 */ sw $ra, 0x20($sp) /* 35EAE4 E00581C4 AFB20018 */ sw $s2, 0x18($sp) /* 35EAE8 E00581C8 AFB10014 */ sw $s1, 0x14($sp) /* 35EAEC E00581CC AFB00010 */ sw $s0, 0x10($sp) /* 35EAF0 E00581D0 F7B60030 */ sdc1 $f22, 0x30($sp) /* 35EAF4 E00581D4 F7B40028 */ sdc1 $f20, 0x28($sp) /* 35EAF8 E00581D8 8E65000C */ lw $a1, 0xC($s3) /* 35EAFC E00581DC 8CA2002C */ lw $v0, 0x2C($a1) /* 35EB00 E00581E0 8CB20000 */ lw $s2, 0x0($a1) /* 35EB04 E00581E4 2442FFFB */ addiu $v0, $v0, -0x5 /* 35EB08 E00581E8 2C42000A */ sltiu $v0, $v0, 0xA /* 35EB0C E00581EC 10400007 */ beqz $v0, .LE005820C /* 35EB10 E00581F0 3C020004 */ lui $v0, (0x4F1A0 >> 16) /* 35EB14 E00581F4 16400006 */ bnez $s2, .LE0058210 /* 35EB18 E00581F8 3442F1A0 */ ori $v0, $v0, (0x4F1A0 & 0xFFFF) /* 35EB1C E00581FC 3C028011 */ lui $v0, %hi(gPlayerStatus + 0xB4) /* 35EB20 E0058200 8042F07C */ lb $v0, %lo(gPlayerStatus + 0xB4)($v0) /* 35EB24 E0058204 10400099 */ beqz $v0, .LE005846C /* 35EB28 E0058208 3C020004 */ lui $v0, (0x4F1A0 >> 16) .LE005820C: /* 35EB2C E005820C 3442F1A0 */ ori $v0, $v0, (0x4F1A0 & 0xFFFF) .LE0058210: /* 35EB30 E0058210 8CA30028 */ lw $v1, 0x28($a1) /* 35EB34 E0058214 8CA4002C */ lw $a0, 0x2C($a1) /* 35EB38 E0058218 2463FFFF */ addiu $v1, $v1, -0x1 /* 35EB3C E005821C 24840001 */ addiu $a0, $a0, 0x1 /* 35EB40 E0058220 0044102A */ slt $v0, $v0, $a0 /* 35EB44 E0058224 ACA30028 */ sw $v1, 0x28($a1) /* 35EB48 E0058228 10400003 */ beqz $v0, .LE0058238 /* 35EB4C E005822C ACA4002C */ sw $a0, 0x2C($a1) /* 35EB50 E0058230 24020100 */ addiu $v0, $zero, 0x100 /* 35EB54 E0058234 ACA2002C */ sw $v0, 0x2C($a1) .LE0058238: /* 35EB58 E0058238 8CA40028 */ lw $a0, 0x28($a1) /* 35EB5C E005823C 04810005 */ bgez $a0, .LE0058254 /* 35EB60 E0058240 00000000 */ nop /* 35EB64 E0058244 0C080128 */ jal shim_remove_effect /* 35EB68 E0058248 0260202D */ daddu $a0, $s3, $zero /* 35EB6C E005824C 0801611B */ j .LE005846C /* 35EB70 E0058250 00000000 */ nop .LE0058254: /* 35EB74 E0058254 8CA2002C */ lw $v0, 0x2C($a1) /* 35EB78 E0058258 2842000A */ slti $v0, $v0, 0xA /* 35EB7C E005825C 10400010 */ beqz $v0, .LE00582A0 /* 35EB80 E0058260 240200FF */ addiu $v0, $zero, 0xFF /* 35EB84 E0058264 8CA30024 */ lw $v1, 0x24($a1) /* 35EB88 E0058268 3C01E006 */ lui $at, (0xE0060000 >> 16) /* 35EB8C E005826C D4208780 */ ldc1 $f0, -0x7880($at) /* 35EB90 E0058270 00431023 */ subu $v0, $v0, $v1 /* 35EB94 E0058274 44821000 */ mtc1 $v0, $f2 /* 35EB98 E0058278 00000000 */ nop /* 35EB9C E005827C 468010A1 */ cvt.d.w $f2, $f2 /* 35EBA0 E0058280 46201082 */ mul.d $f2, $f2, $f0 /* 35EBA4 E0058284 00000000 */ nop /* 35EBA8 E0058288 44830000 */ mtc1 $v1, $f0 /* 35EBAC E005828C 00000000 */ nop /* 35EBB0 E0058290 46800021 */ cvt.d.w $f0, $f0 /* 35EBB4 E0058294 46220000 */ add.d $f0, $f0, $f2 /* 35EBB8 E0058298 4620020D */ trunc.w.d $f8, $f0 /* 35EBBC E005829C E4A80024 */ swc1 $f8, 0x24($a1) .LE00582A0: /* 35EBC0 E00582A0 2882000A */ slti $v0, $a0, 0xA /* 35EBC4 E00582A4 10400009 */ beqz $v0, .LE00582CC /* 35EBC8 E00582A8 00000000 */ nop /* 35EBCC E00582AC 3C01E006 */ lui $at, (0xE0060000 >> 16) /* 35EBD0 E00582B0 D4228788 */ ldc1 $f2, -0x7878($at) /* 35EBD4 E00582B4 C4A00024 */ lwc1 $f0, 0x24($a1) /* 35EBD8 E00582B8 46800021 */ cvt.d.w $f0, $f0 /* 35EBDC E00582BC 46220002 */ mul.d $f0, $f0, $f2 /* 35EBE0 E00582C0 00000000 */ nop /* 35EBE4 E00582C4 4620020D */ trunc.w.d $f8, $f0 /* 35EBE8 E00582C8 E4A80024 */ swc1 $f8, 0x24($a1) .LE00582CC: /* 35EBEC E00582CC 8E620008 */ lw $v0, 0x8($s3) /* 35EBF0 E00582D0 24110001 */ addiu $s1, $zero, 0x1 /* 35EBF4 E00582D4 0222102A */ slt $v0, $s1, $v0 /* 35EBF8 E00582D8 10400064 */ beqz $v0, .LE005846C /* 35EBFC E00582DC 24A50034 */ addiu $a1, $a1, 0x34 /* 35EC00 E00582E0 24B00008 */ addiu $s0, $a1, 0x8 /* 35EC04 E00582E4 3C01BD4C */ lui $at, (0xBD4CCCCD >> 16) /* 35EC08 E00582E8 3421CCCD */ ori $at, $at, (0xBD4CCCCD & 0xFFFF) /* 35EC0C E00582EC 4481B000 */ mtc1 $at, $f22 /* 35EC10 E00582F0 3C014120 */ lui $at, (0x41200000 >> 16) /* 35EC14 E00582F4 4481A000 */ mtc1 $at, $f20 .LE00582F8: /* 35EC18 E00582F8 C60C0010 */ lwc1 $f12, 0x10($s0) /* 35EC1C E00582FC 0C080140 */ jal shim_sin_deg /* 35EC20 E0058300 460C6300 */ add.s $f12, $f12, $f12 /* 35EC24 E0058304 3C01E006 */ lui $at, (0xE0060000 >> 16) /* 35EC28 E0058308 D4228790 */ ldc1 $f2, -0x7870($at) /* 35EC2C E005830C 46000021 */ cvt.d.s $f0, $f0 /* 35EC30 E0058310 46220002 */ mul.d $f0, $f0, $f2 /* 35EC34 E0058314 00000000 */ nop /* 35EC38 E0058318 C602000C */ lwc1 $f2, 0xC($s0) /* 35EC3C E005831C 46161080 */ add.s $f2, $f2, $f22 /* 35EC40 E0058320 C6040008 */ lwc1 $f4, 0x8($s0) /* 35EC44 E0058324 46200020 */ cvt.s.d $f0, $f0 /* 35EC48 E0058328 46002000 */ add.s $f0, $f4, $f0 /* 35EC4C E005832C E602000C */ swc1 $f2, 0xC($s0) /* 35EC50 E0058330 16400019 */ bnez $s2, .LE0058398 /* 35EC54 E0058334 E6000008 */ swc1 $f0, 0x8($s0) /* 35EC58 E0058338 3C01E006 */ lui $at, (0xE0060000 >> 16) /* 35EC5C E005833C D4228798 */ ldc1 $f2, -0x7868($at) /* 35EC60 E0058340 46000021 */ cvt.d.s $f0, $f0 /* 35EC64 E0058344 46220002 */ mul.d $f0, $f0, $f2 /* 35EC68 E0058348 00000000 */ nop /* 35EC6C E005834C C60C0010 */ lwc1 $f12, 0x10($s0) /* 35EC70 E0058350 46200020 */ cvt.s.d $f0, $f0 /* 35EC74 E0058354 0C080140 */ jal shim_sin_deg /* 35EC78 E0058358 E6000008 */ swc1 $f0, 0x8($s0) /* 35EC7C E005835C 3C01E006 */ lui $at, (0xE0060000 >> 16) /* 35EC80 E0058360 D42287A0 */ ldc1 $f2, -0x7860($at) /* 35EC84 E0058364 46000021 */ cvt.d.s $f0, $f0 /* 35EC88 E0058368 46220002 */ mul.d $f0, $f0, $f2 /* 35EC8C E005836C 00000000 */ nop /* 35EC90 E0058370 3C01E006 */ lui $at, (0xE0060000 >> 16) /* 35EC94 E0058374 D42487A8 */ ldc1 $f4, -0x7858($at) /* 35EC98 E0058378 C602000C */ lwc1 $f2, 0xC($s0) /* 35EC9C E005837C 46240000 */ add.d $f0, $f0, $f4 /* 35ECA0 E0058380 460010A1 */ cvt.d.s $f2, $f2 /* 35ECA4 E0058384 46201082 */ mul.d $f2, $f2, $f0 /* 35ECA8 E0058388 00000000 */ nop /* 35ECAC E005838C 462010A0 */ cvt.s.d $f2, $f2 /* 35ECB0 E0058390 080160F1 */ j .LE00583C4 /* 35ECB4 E0058394 E602000C */ swc1 $f2, 0xC($s0) .LE0058398: /* 35ECB8 E0058398 C6000008 */ lwc1 $f0, 0x8($s0) /* 35ECBC E005839C 3C01E006 */ lui $at, (0xE0060000 >> 16) /* 35ECC0 E00583A0 D42287B0 */ ldc1 $f2, -0x7850($at) /* 35ECC4 E00583A4 46000021 */ cvt.d.s $f0, $f0 /* 35ECC8 E00583A8 46220002 */ mul.d $f0, $f0, $f2 /* 35ECCC E00583AC 00000000 */ nop /* 35ECD0 E00583B0 C602000C */ lwc1 $f2, 0xC($s0) /* 35ECD4 E00583B4 46161080 */ add.s $f2, $f2, $f22 /* 35ECD8 E00583B8 E602000C */ swc1 $f2, 0xC($s0) /* 35ECDC E00583BC 46200020 */ cvt.s.d $f0, $f0 /* 35ECE0 E00583C0 E6000008 */ swc1 $f0, 0x8($s0) .LE00583C4: /* 35ECE4 E00583C4 0C080138 */ jal shim_rand_int /* 35ECE8 E00583C8 24040032 */ addiu $a0, $zero, 0x32 /* 35ECEC E00583CC 3C0141C8 */ lui $at, (0x41C80000 >> 16) /* 35ECF0 E00583D0 44811000 */ mtc1 $at, $f2 /* 35ECF4 E00583D4 44820000 */ mtc1 $v0, $f0 /* 35ECF8 E00583D8 00000000 */ nop /* 35ECFC E00583DC 46800020 */ cvt.s.w $f0, $f0 /* 35ED00 E00583E0 46020001 */ sub.s $f0, $f0, $f2 /* 35ED04 E00583E4 C60C0014 */ lwc1 $f12, 0x14($s0) /* 35ED08 E00583E8 46006300 */ add.s $f12, $f12, $f0 /* 35ED0C E00583EC 0C080140 */ jal shim_sin_deg /* 35ED10 E00583F0 E60C0014 */ swc1 $f12, 0x14($s0) /* 35ED14 E00583F4 46140002 */ mul.s $f0, $f0, $f20 /* 35ED18 E00583F8 00000000 */ nop /* 35ED1C E00583FC C6020014 */ lwc1 $f2, 0x14($s0) /* 35ED20 E0058400 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 35ED24 E0058404 44816000 */ mtc1 $at, $f12 /* 35ED28 E0058408 00000000 */ nop /* 35ED2C E005840C 460C1302 */ mul.s $f12, $f2, $f12 /* 35ED30 E0058410 00000000 */ nop /* 35ED34 E0058414 C6020010 */ lwc1 $f2, 0x10($s0) /* 35ED38 E0058418 46001080 */ add.s $f2, $f2, $f0 /* 35ED3C E005841C 0C080144 */ jal shim_cos_deg /* 35ED40 E0058420 E6020010 */ swc1 $f2, 0x10($s0) /* 35ED44 E0058424 46140002 */ mul.s $f0, $f0, $f20 /* 35ED48 E0058428 00000000 */ nop /* 35ED4C E005842C C606FFFC */ lwc1 $f6, -0x4($s0) /* 35ED50 E0058430 C6020008 */ lwc1 $f2, 0x8($s0) /* 35ED54 E0058434 C6040000 */ lwc1 $f4, 0x0($s0) /* 35ED58 E0058438 46023180 */ add.s $f6, $f6, $f2 /* 35ED5C E005843C C602000C */ lwc1 $f2, 0xC($s0) /* 35ED60 E0058440 46022100 */ add.s $f4, $f4, $f2 /* 35ED64 E0058444 C6020018 */ lwc1 $f2, 0x18($s0) /* 35ED68 E0058448 26310001 */ addiu $s1, $s1, 0x1 /* 35ED6C E005844C 46001080 */ add.s $f2, $f2, $f0 /* 35ED70 E0058450 E606FFFC */ swc1 $f6, -0x4($s0) /* 35ED74 E0058454 E6040000 */ swc1 $f4, 0x0($s0) /* 35ED78 E0058458 E6020018 */ swc1 $f2, 0x18($s0) /* 35ED7C E005845C 8E620008 */ lw $v0, 0x8($s3) /* 35ED80 E0058460 0222102A */ slt $v0, $s1, $v0 /* 35ED84 E0058464 1440FFA4 */ bnez $v0, .LE00582F8 /* 35ED88 E0058468 26100034 */ addiu $s0, $s0, 0x34 .LE005846C: /* 35ED8C E005846C 8FBF0020 */ lw $ra, 0x20($sp) /* 35ED90 E0058470 8FB3001C */ lw $s3, 0x1C($sp) /* 35ED94 E0058474 8FB20018 */ lw $s2, 0x18($sp) /* 35ED98 E0058478 8FB10014 */ lw $s1, 0x14($sp) /* 35ED9C E005847C 8FB00010 */ lw $s0, 0x10($sp) /* 35EDA0 E0058480 D7B60030 */ ldc1 $f22, 0x30($sp) /* 35EDA4 E0058484 D7B40028 */ ldc1 $f20, 0x28($sp) /* 35EDA8 E0058488 03E00008 */ jr $ra /* 35EDAC E005848C 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void falling_leaves_update(EffectInstance* effect) { FallingLeavesFXData* part = effect->data.fallingLeaves; s32 unk_00 = part->unk_00; s32 unk_28; f32 temp; s32 i; if (part->unk_2C >= 5 && part->unk_2C <= 14 && unk_00 == 0 && gPlayerStatus.actionState == ACTION_STATE_IDLE) { return; } part->unk_28--; part->unk_2C++; if (part->unk_2C > 324000) { part->unk_2C = 256; } unk_28 = part->unk_28; if (unk_28 < 0) { shim_remove_effect(effect); return; } if (part->unk_2C < 10) { part->unk_24 += (255 - part->unk_24) * 0.3; } if (unk_28 < 10) { part->unk_24 *= 0.8; } part++; for (i = 1; i < effect->numParts; i++, part++) { temp = shim_sin_deg(2.0f * part->unk_18) * 0.2; part->unk_14 += -0.05f; part->unk_10 += temp; if (unk_00 == 0) { part->unk_10 *= 0.94; part->unk_14 *= shim_sin_deg(part->unk_18) * 0.05 + 0.95; } else { part->unk_14 += -0.05f; part->unk_10 *= 0.92; } part->unk_1C += shim_rand_int(50) - 25.0f; part->unk_18 += shim_sin_deg(part->unk_1C) * 10.0f; part->unk_20 += shim_cos_deg(part->unk_1C * 0.5f) * 10.0f; part->unk_04 += part->unk_10; part->unk_08 += part->unk_14; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80218100 /* 464590 80218100 27BDFFA0 */ addiu $sp, $sp, -0x60 b_area_dgb_clubba_ActorParts: /* 464594 80218104 AFB50054 */ sw $s5, 0x54($sp) glabel func_80218108 /* 464598 80218108 0080A82D */ daddu $s5, $a0, $zero /* 46459C 8021810C AFB40050 */ sw $s4, 0x50($sp) /* 4645A0 80218110 3C148011 */ lui $s4, %hi(gPlayerData) glabel b_area_flo2_CosInterpMinMax /* 4645A4 80218114 2694F290 */ addiu $s4, $s4, %lo(gPlayerData) glabel func_80218118 /* 4645A8 80218118 3C058023 */ lui $a1, %hi(D_80232C50) /* 4645AC 8021811C 24A52C50 */ addiu $a1, $a1, %lo(D_80232C50) glabel dup_b_area_kpa2_StartRumbleWithParams /* 4645B0 80218120 AFBF0058 */ sw $ra, 0x58($sp) /* 4645B4 80218124 AFB3004C */ sw $s3, 0x4C($sp) glabel dup_b_area_tik_SetAbsoluteStatusOffsets /* 4645B8 80218128 AFB20048 */ sw $s2, 0x48($sp) glabel b_area_kzn2_SetVineBonePos /* 4645BC 8021812C AFB10044 */ sw $s1, 0x44($sp) glabel func_80218130 /* 4645C0 80218130 AFB00040 */ sw $s0, 0x40($sp) .L80218134: /* 4645C4 80218134 8CA20000 */ lw $v0, 0x0($a1) .L80218138: /* 4645C8 80218138 8EB30098 */ lw $s3, 0x98($s5) .L8021813C: /* 4645CC 8021813C 04410005 */ bgez $v0, .L80218154 /* 4645D0 80218140 24030001 */ addiu $v1, $zero, 0x1 /* 4645D4 80218144 24020002 */ addiu $v0, $zero, 0x2 glabel func_80218148 /* 4645D8 80218148 00532004 */ sllv $a0, $s3, $v0 .L8021814C: /* 4645DC 8021814C 080860B4 */ j .L802182D0 glabel b_area_kpa4_ShrinkActor /* 4645E0 80218150 ACB30000 */ sw $s3, 0x0($a1) .L80218154: /* 4645E4 80218154 1053000C */ beq $v0, $s3, .L80218188 glabel b_area_trd_part_3_ClearPlayerMenuSelections /* 4645E8 80218158 00131880 */ sll $v1, $s3, 2 .L8021815C: /* 4645EC 8021815C 3C028023 */ lui $v0, %hi(func_80218000_47F0B0) .L80218160: /* 4645F0 80218160 24422C20 */ addiu $v0, $v0, %lo(func_80218000_47F0B0) .L80218164: /* 4645F4 80218164 00622021 */ addu $a0, $v1, $v0 /* 4645F8 80218168 8C820000 */ lw $v0, 0x0($a0) /* 4645FC 8021816C 14400007 */ bnez $v0, b_area_nok_goomba_CalculateRotationZ glabel func_80218170 /* 464600 80218170 2411000B */ addiu $s1, $zero, 0xB .L80218174: /* 464604 80218174 24020002 */ addiu $v0, $zero, 0x2 glabel dup3_b_area_kpa2_UnkFireBreathFXFunc /* 464608 80218178 24030001 */ addiu $v1, $zero, 0x1 glabel b_area_trd_part_2_fake_bowser_UnkFunc26 /* 46460C 8021817C ACB30000 */ sw $s3, 0x0($a1) glabel b_area_kkj_GetEntityPosition /* 464610 80218180 080860B7 */ j .L802182DC glabel b_area_dig_SpawnDrainHealthContinueFX /* 464614 80218184 AC830000 */ sw $v1, 0x0($a0) .L80218188: /* 464618 80218188 2411000B */ addiu $s1, $zero, 0xB glabel b_area_nok_goomba_CalculateRotationZ /* 46461C 8021818C 27A2003C */ addiu $v0, $sp, 0x3C .L80218190: /* 464620 80218190 AC510000 */ sw $s1, 0x0($v0) /* 464624 80218194 2631FFFF */ addiu $s1, $s1, -0x1 /* 464628 80218198 0621FFFD */ bgez $s1, .L80218190 glabel b_area_kpa_StartRumbleWithParams /* 46462C 8021819C 2442FFFC */ addiu $v0, $v0, -0x4 glabel b_area_jan_jungle_fuzzy_SpawnDrainHealthStartFX /* 464630 802181A0 0000882D */ daddu $s1, $zero, $zero .L802181A4: /* 464634 802181A4 27B20010 */ addiu $s2, $sp, 0x10 .L802181A8: /* 464638 802181A8 0C00A67F */ jal rand_int b_area_dgb_clubba_handleEvent_802181AC: /* 46463C 802181AC 2404000B */ addiu $a0, $zero, 0xB /* 464640 802181B0 2404000B */ addiu $a0, $zero, 0xB glabel b_area_trd_part_3_func_802181B4_4CF364 /* 464644 802181B4 0C00A67F */ jal rand_int /* 464648 802181B8 0040802D */ daddu $s0, $v0, $zero /* 46464C 802181BC 00108080 */ sll $s0, $s0, 2 glabel b_area_iwa_iwa_02_IsSaveVar123 /* 464650 802181C0 02508021 */ addu $s0, $s2, $s0 /* 464654 802181C4 00021080 */ sll $v0, $v0, 2 .L802181C8: /* 464658 802181C8 02421021 */ addu $v0, $s2, $v0 .L802181CC: /* 46465C 802181CC 8E040000 */ lw $a0, 0x0($s0) /* 464660 802181D0 8C430000 */ lw $v1, 0x0($v0) /* 464664 802181D4 26310001 */ addiu $s1, $s1, 0x1 /* 464668 802181D8 AE030000 */ sw $v1, 0x0($s0) .L802181DC: /* 46466C 802181DC AC440000 */ sw $a0, 0x0($v0) /* 464670 802181E0 2A220064 */ slti $v0, $s1, 0x64 glabel func_802181E4_69F3E4 /* 464674 802181E4 1440FFF0 */ bnez $v0, .L802181A8 glabel GetActorPartOpacity /* 464678 802181E8 24080005 */ addiu $t0, $zero, 0x5 .L802181EC: /* 46467C 802181EC 0000882D */ daddu $s1, $zero, $zero glabel b_area_flo_CosInterpMinMax /* 464680 802181F0 2407000A */ addiu $a3, $zero, 0xA glabel func_802181F4 /* 464684 802181F4 2406000B */ addiu $a2, $zero, 0xB glabel b_area_trd_part_3_AddStarPower /* 464688 802181F8 3C058023 */ lui $a1, %hi(func_80218000_47F0B0) glabel b_area_kzn_putrid_piranha_UnkEffect6FFunc /* 46468C 802181FC 24A52C20 */ addiu $a1, $a1, %lo(func_80218000_47F0B0) glabel b_area_kpa_ShrinkActor /* 464690 80218200 27A30010 */ addiu $v1, $sp, 0x10 .L80218204: /* 464694 80218204 8C640000 */ lw $a0, 0x0($v1) /* 464698 80218208 000410C0 */ sll $v0, $a0, 3 .L8021820C: /* 46469C 8021820C 02821021 */ addu $v0, $s4, $v0 b_area_iwa_Formation_00: /* 4646A0 80218210 90420014 */ lbu $v0, 0x14($v0) /* 4646A4 80218214 5040000F */ beql $v0, $zero, b_area_jan_jungle_fuzzy_SpawnDrainHealthContinueFX .L80218218: /* 4646A8 80218218 26310001 */ addiu $s1, $s1, 0x1 /* 4646AC 8021821C 5088000D */ beql $a0, $t0, b_area_jan_jungle_fuzzy_SpawnDrainHealthContinueFX glabel func_80218220_6DBFC0 /* 4646B0 80218220 26310001 */ addiu $s1, $s1, 0x1 glabel func_80218224 /* 4646B4 80218224 5087000B */ beql $a0, $a3, b_area_jan_jungle_fuzzy_SpawnDrainHealthContinueFX /* 4646B8 80218228 26310001 */ addiu $s1, $s1, 0x1 D_8021822C: /* 4646BC 8021822C 50860009 */ beql $a0, $a2, b_area_jan_jungle_fuzzy_SpawnDrainHealthContinueFX .L80218230: /* 4646C0 80218230 26310001 */ addiu $s1, $s1, 0x1 /* 4646C4 80218234 50930007 */ beql $a0, $s3, b_area_jan_jungle_fuzzy_SpawnDrainHealthContinueFX glabel func_80218238 /* 4646C8 80218238 26310001 */ addiu $s1, $s1, 0x1 glabel func_8021823C /* 4646CC 8021823C 00041080 */ sll $v0, $a0, 2 glabel dup_b_area_dig_SetAbsoluteStatusOffsets /* 4646D0 80218240 00451021 */ addu $v0, $v0, $a1 /* 4646D4 80218244 8C420000 */ lw $v0, 0x0($v0) /* 4646D8 80218248 10400006 */ beqz $v0, D_80218264 /* 4646DC 8021824C 2A22000C */ slti $v0, $s1, 0xC glabel b_area_tik3_SpawnDrainHealthContinueFX /* 4646E0 80218250 26310001 */ addiu $s1, $s1, 0x1 glabel b_area_jan_jungle_fuzzy_SpawnDrainHealthContinueFX /* 4646E4 80218254 2A22000C */ slti $v0, $s1, 0xC glabel func_80218258 /* 4646E8 80218258 1440FFEA */ bnez $v0, .L80218204 glabel b_area_isk_part_2_chain_chomp_ChompChainUpdate /* 4646EC 8021825C 24630004 */ addiu $v1, $v1, 0x4 .L80218260: /* 4646F0 80218260 2A22000C */ slti $v0, $s1, 0xC D_80218264: /* 4646F4 80218264 1040000E */ beqz $v0, .L802182A0 /* 4646F8 80218268 00041880 */ sll $v1, $a0, 2 /* 4646FC 8021826C 24020001 */ addiu $v0, $zero, 0x1 glabel func_80218270 /* 464700 80218270 3C018023 */ lui $at, %hi(func_80218000_47F0B0) /* 464704 80218274 00230821 */ addu $at, $at, $v1 glabel func_80218278 /* 464708 80218278 AC222C20 */ sw $v0, %lo(func_80218000_47F0B0)($at) /* 46470C 8021827C 000410C0 */ sll $v0, $a0, 3 glabel func_80218280_6609D0 /* 464710 80218280 02821021 */ addu $v0, $s4, $v0 .L80218284: /* 464714 80218284 3C018023 */ lui $at, %hi(D_80232C50) /* 464718 80218288 AC242C50 */ sw $a0, %lo(D_80232C50)($at) b_area_trd_part_3_eldstar_DefenseTable_8021828C: /* 46471C 8021828C AEA40098 */ sw $a0, 0x98($s5) .L80218290: /* 464720 80218290 80430015 */ lb $v1, 0x15($v0) .L80218294: /* 464724 80218294 24020002 */ addiu $v0, $zero, 0x2 b_area_trd_part_3_eldstar_StatusTable_80218298: /* 464728 80218298 080860B7 */ j .L802182DC /* 46472C 8021829C AEA3009C */ sw $v1, 0x9C($s5) .L802182A0: /* 464730 802182A0 2411000B */ addiu $s1, $zero, 0xB glabel func_802182A4_5CE934 /* 464734 802182A4 3C028023 */ lui $v0, %hi(D_80232C4C) glabel b_area_kpa4_CosInterpMinMax /* 464738 802182A8 24422C4C */ addiu $v0, $v0, %lo(D_80232C4C) .L802182AC: /* 46473C 802182AC AC400000 */ sw $zero, 0x0($v0) .L802182B0: /* 464740 802182B0 2631FFFF */ addiu $s1, $s1, -0x1 .L802182B4: /* 464744 802182B4 0621FFFD */ bgez $s1, .L802182AC b_area_iwa_Formation_03: /* 464748 802182B8 2442FFFC */ addiu $v0, $v0, -0x4 /* 46474C 802182BC 24020002 */ addiu $v0, $zero, 0x2 .L802182C0: /* 464750 802182C0 00532004 */ sllv $a0, $s3, $v0 /* 464754 802182C4 24030001 */ addiu $v1, $zero, 0x1 .L802182C8: /* 464758 802182C8 3C018023 */ lui $at, %hi(D_80232C50) /* 46475C 802182CC AC332C50 */ sw $s3, %lo(D_80232C50)($at) .L802182D0: /* 464760 802182D0 3C018023 */ lui $at, %hi(func_80218000_47F0B0) glabel b_area_hos_magikoopa_SetAbsoluteStatusOffsets /* 464764 802182D4 00240821 */ addu $at, $at, $a0 glabel func_802182D8 /* 464768 802182D8 AC232C20 */ sw $v1, %lo(func_80218000_47F0B0)($at) .L802182DC: /* 46476C 802182DC 8FBF0058 */ lw $ra, 0x58($sp) glabel func_802182E0 /* 464770 802182E0 8FB50054 */ lw $s5, 0x54($sp) glabel func_802182E4_660A34 /* 464774 802182E4 8FB40050 */ lw $s4, 0x50($sp) /* 464778 802182E8 8FB3004C */ lw $s3, 0x4C($sp) glabel b_area_tik2_FadeBackgroundToBlack /* 46477C 802182EC 8FB20048 */ lw $s2, 0x48($sp) b_area_iwa_Formation_04: /* 464780 802182F0 8FB10044 */ lw $s1, 0x44($sp) .L802182F4: /* 464784 802182F4 8FB00040 */ lw $s0, 0x40($sp) /* 464788 802182F8 03E00008 */ jr $ra .L802182FC: /* 46478C 802182FC 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(func_80218100_464590) { PlayerData* playerData = &gPlayerData; s32 currentPartner = script->varTable[5]; s32 partnerId; s32 i; s32 sp10[12]; if (D_80232C50 < 0) { D_80232C50 = currentPartner; D_80232C20[currentPartner] = TRUE; return ApiStatus_DONE2; } if (D_80232C50 != currentPartner && !D_80232C20[currentPartner]) { D_80232C50 = currentPartner; D_80232C20[currentPartner] = TRUE; return ApiStatus_DONE2; } for (i = 0; i < 12; i++) { sp10[i] = i; } for (i = 0; i < 100; i++) { s32 index1 = rand_int(11); s32 index2 = rand_int(11); s32 tempValue = sp10[index1]; sp10[index1] = sp10[index2]; sp10[index2] = tempValue; } for (i = 0; i < 12; i++) { partnerId = sp10[i]; if (playerData->partners[partnerId].enabled && partnerId != PARTNER_GOOMPA && partnerId != PARTNER_GOOMBARIA && partnerId != PARTNER_TWINK && partnerId != currentPartner && !D_80232C20[partnerId] ) { break; } } if (i < 12) { D_80232C20[partnerId] = TRUE; D_80232C50 = partnerId; script->varTable[5] = partnerId; script->varTable[6] = playerData->partners[partnerId].level; return ApiStatus_DONE2; } else { for (i = 0; i < 12; i++) { D_80232C20[i] = FALSE; } D_80232C50 = currentPartner; D_80232C20[currentPartner] = TRUE; return ApiStatus_DONE2; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel btl_init_menu_boots /* 191D98 802634B8 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 191D9C 802634BC AFB40020 */ sw $s4, 0x20($sp) /* 191DA0 802634C0 3C14800E */ lui $s4, %hi(gBattleStatus) /* 191DA4 802634C4 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus) /* 191DA8 802634C8 AFB7002C */ sw $s7, 0x2C($sp) /* 191DAC 802634CC 3C178011 */ lui $s7, %hi(gPlayerData) /* 191DB0 802634D0 26F7F290 */ addiu $s7, $s7, %lo(gPlayerData) /* 191DB4 802634D4 2403FFFF */ addiu $v1, $zero, -0x1 /* 191DB8 802634D8 AFBF0034 */ sw $ra, 0x34($sp) /* 191DBC 802634DC AFBE0030 */ sw $fp, 0x30($sp) /* 191DC0 802634E0 AFB60028 */ sw $s6, 0x28($sp) /* 191DC4 802634E4 AFB50024 */ sw $s5, 0x24($sp) /* 191DC8 802634E8 AFB3001C */ sw $s3, 0x1C($sp) /* 191DCC 802634EC AFB20018 */ sw $s2, 0x18($sp) /* 191DD0 802634F0 AFB10014 */ sw $s1, 0x14($sp) /* 191DD4 802634F4 AFB00010 */ sw $s0, 0x10($sp) /* 191DD8 802634F8 82E20000 */ lb $v0, 0x0($s7) /* 191DDC 802634FC 8E9500D8 */ lw $s5, 0xD8($s4) /* 191DE0 80263500 14430003 */ bne $v0, $v1, D_80263510_C20D90 /* 191DE4 80263504 24120017 */ addiu $s2, $zero, 0x17 D_80263508: /* 191DE8 80263508 08098DAD */ j .L802636B4 /* 191DEC 8026350C A280007E */ sb $zero, 0x7E($s4) D_80263510_C20D90: /* 191DF0 80263510 02921021 */ addu $v0, $s4, $s2 .L80263514: /* 191DF4 80263514 A04001DE */ sb $zero, 0x1DE($v0) D_80263518_C20D98: /* 191DF8 80263518 2652FFFF */ addiu $s2, $s2, -0x1 /* 191DFC 8026351C 0641FFFD */ bgez $s2, .L80263514 jtbl_80263520: /* 191E00 80263520 2442FFFF */ addiu $v0, $v0, -0x1 /* 191E04 80263524 24060001 */ addiu $a2, $zero, 0x1 /* 191E08 80263528 92E20000 */ lbu $v0, 0x0($s7) /* 191E0C 8026352C 24030155 */ addiu $v1, $zero, 0x155 /* 191E10 80263530 A68301AE */ sh $v1, 0x1AE($s4) /* 191E14 80263534 2442001A */ addiu $v0, $v0, 0x1A /* 191E18 80263538 A28201DE */ sb $v0, 0x1DE($s4) /* 191E1C 8026353C 0000902D */ daddu $s2, $zero, $zero /* 191E20 80263540 3C098009 */ lui $t1, %hi(gMoveTable) /* 191E24 80263544 2529F060 */ addiu $t1, $t1, %lo(gMoveTable) /* 191E28 80263548 3C088008 */ lui $t0, %hi(gItemTable) /* 191E2C 8026354C 250878E0 */ addiu $t0, $t0, %lo(gItemTable) /* 191E30 80263550 24070002 */ addiu $a3, $zero, 0x2 /* 191E34 80263554 02E0202D */ daddu $a0, $s7, $zero /* 191E38 80263558 02872821 */ addu $a1, $s4, $a3 .L8026355C: /* 191E3C 8026355C 84820208 */ lh $v0, 0x208($a0) /* 191E40 80263560 10400011 */ beqz $v0, .L802635A8 /* 191E44 80263564 26520001 */ addiu $s2, $s2, 0x1 /* 191E48 80263568 00021140 */ sll $v0, $v0, 5 /* 191E4C 8026356C 00481021 */ addu $v0, $v0, $t0 /* 191E50 80263570 9043001A */ lbu $v1, 0x1A($v0) /* 191E54 80263574 00031080 */ sll $v0, $v1, 2 /* 191E58 80263578 00431021 */ addu $v0, $v0, $v1 /* 191E5C 8026357C 00021080 */ sll $v0, $v0, 2 /* 191E60 80263580 00498821 */ addu $s1, $v0, $t1 /* 191E64 80263584 82220010 */ lb $v0, 0x10($s1) /* 191E68 80263588 14470007 */ bne $v0, $a3, .L802635A8 /* 191E6C 8026358C 00000000 */ nop /* 191E70 80263590 02861021 */ addu $v0, $s4, $a2 /* 191E74 80263594 A04301DE */ sb $v1, 0x1DE($v0) /* 191E78 80263598 94820208 */ lhu $v0, 0x208($a0) /* 191E7C 8026359C 24C60001 */ addiu $a2, $a2, 0x1 /* 191E80 802635A0 A4A201AE */ sh $v0, 0x1AE($a1) /* 191E84 802635A4 24A50002 */ addiu $a1, $a1, 0x2 .L802635A8: /* 191E88 802635A8 2A420040 */ slti $v0, $s2, 0x40 /* 191E8C 802635AC 1440FFEB */ bnez $v0, .L8026355C /* 191E90 802635B0 24840002 */ addiu $a0, $a0, 0x2 /* 191E94 802635B4 A286020E */ sb $a2, 0x20E($s4) /* 191E98 802635B8 0000902D */ daddu $s2, $zero, $zero /* 191E9C 802635BC 30C200FF */ andi $v0, $a2, 0xFF /* 191EA0 802635C0 10400038 */ beqz $v0, .L802636A4 /* 191EA4 802635C4 0240B02D */ daddu $s6, $s2, $zero /* 191EA8 802635C8 0286F021 */ addu $fp, $s4, $a2 /* 191EAC 802635CC 0280982D */ daddu $s3, $s4, $zero .L802635D0: /* 191EB0 802635D0 926301DE */ lbu $v1, 0x1DE($s3) /* 191EB4 802635D4 3C0A8009 */ lui $t2, %hi(gMoveTable) /* 191EB8 802635D8 254AF060 */ addiu $t2, $t2, %lo(gMoveTable) /* 191EBC 802635DC 00031080 */ sll $v0, $v1, 2 /* 191EC0 802635E0 00431021 */ addu $v0, $v0, $v1 /* 191EC4 802635E4 00021080 */ sll $v0, $v0, 2 /* 191EC8 802635E8 004A8821 */ addu $s1, $v0, $t2 /* 191ECC 802635EC 82300011 */ lb $s0, 0x11($s1) /* 191ED0 802635F0 1200000B */ beqz $s0, .L80263620 /* 191ED4 802635F4 02A0202D */ daddu $a0, $s5, $zero /* 191ED8 802635F8 0C099CAB */ jal player_team_is_ability_active /* 191EDC 802635FC 24050018 */ addiu $a1, $zero, 0x18 /* 191EE0 80263600 02028023 */ subu $s0, $s0, $v0 /* 191EE4 80263604 02A0202D */ daddu $a0, $s5, $zero /* 191EE8 80263608 0C099CAB */ jal player_team_is_ability_active /* 191EEC 8026360C 24050026 */ addiu $a1, $zero, 0x26 /* 191EF0 80263610 00021040 */ sll $v0, $v0, 1 /* 191EF4 80263614 02028023 */ subu $s0, $s0, $v0 /* 191EF8 80263618 5A000001 */ blezl $s0, .L80263620 /* 191EFC 8026361C 24100001 */ addiu $s0, $zero, 0x1 .L80263620: /* 191F00 80263620 92E20000 */ lbu $v0, 0x0($s7) /* 191F04 80263624 A2800178 */ sb $zero, 0x178($s4) /* 191F08 80263628 00021600 */ sll $v0, $v0, 24 /* 191F0C 8026362C 00021603 */ sra $v0, $v0, 24 /* 191F10 80263630 A682017A */ sh $v0, 0x17A($s4) /* 191F14 80263634 8E220004 */ lw $v0, 0x4($s1) /* 191F18 80263638 02A0202D */ daddu $a0, $s5, $zero /* 191F1C 8026363C 0C098C0B */ jal func_8026302C /* 191F20 80263640 AE820184 */ sw $v0, 0x184($s4) /* 191F24 80263644 82A2040C */ lb $v0, 0x40C($s5) /* 191F28 80263648 10400003 */ beqz $v0, .L80263658 /* 191F2C 8026364C 00000000 */ nop /* 191F30 80263650 24160001 */ addiu $s6, $zero, 0x1 /* 191F34 80263654 A27601F6 */ sb $s6, 0x1F6($s3) .L80263658: /* 191F38 80263658 82E20005 */ lb $v0, 0x5($s7) /* 191F3C 8026365C 0050102A */ slt $v0, $v0, $s0 /* 191F40 80263660 54400001 */ bnel $v0, $zero, .L80263668 /* 191F44 80263664 A26001F6 */ sb $zero, 0x1F6($s3) .L80263668: /* 191F48 80263668 82A2040C */ lb $v0, 0x40C($s5) /* 191F4C 8026366C 14400002 */ bnez $v0, .L80263678 /* 191F50 80263670 2402FFFE */ addiu $v0, $zero, -0x2 /* 191F54 80263674 A26201F6 */ sb $v0, 0x1F6($s3) .L80263678: /* 191F58 80263678 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4) /* 191F5C 8026367C 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0) /* 191F60 80263680 30421000 */ andi $v0, $v0, 0x1000 /* 191F64 80263684 10400002 */ beqz $v0, .L80263690 /* 191F68 80263688 2402FFFF */ addiu $v0, $zero, -0x1 /* 191F6C 8026368C A3C201F6 */ sb $v0, 0x1F6($fp) .L80263690: /* 191F70 80263690 9282020E */ lbu $v0, 0x20E($s4) /* 191F74 80263694 26520001 */ addiu $s2, $s2, 0x1 /* 191F78 80263698 0242102A */ slt $v0, $s2, $v0 /* 191F7C 8026369C 1440FFCC */ bnez $v0, .L802635D0 /* 191F80 802636A0 26730001 */ addiu $s3, $s3, 0x1 .L802636A4: /* 191F84 802636A4 16C00002 */ bnez $s6, D_802636B0 /* 191F88 802636A8 24020001 */ addiu $v0, $zero, 0x1 /* 191F8C 802636AC 2402FFFF */ addiu $v0, $zero, -0x1 D_802636B0: /* 191F90 802636B0 A282007E */ sb $v0, 0x7E($s4) .L802636B4: /* 191F94 802636B4 8FBF0034 */ lw $ra, 0x34($sp) /* 191F98 802636B8 8FBE0030 */ lw $fp, 0x30($sp) /* 191F9C 802636BC 8FB7002C */ lw $s7, 0x2C($sp) /* 191FA0 802636C0 8FB60028 */ lw $s6, 0x28($sp) /* 191FA4 802636C4 8FB50024 */ lw $s5, 0x24($sp) /* 191FA8 802636C8 8FB40020 */ lw $s4, 0x20($sp) /* 191FAC 802636CC 8FB3001C */ lw $s3, 0x1C($sp) /* 191FB0 802636D0 8FB20018 */ lw $s2, 0x18($sp) /* 191FB4 802636D4 8FB10014 */ lw $s1, 0x14($sp) /* 191FB8 802636D8 8FB00010 */ lw $s0, 0x10($sp) /* 191FBC 802636DC 03E00008 */ jr $ra /* 191FC0 802636E0 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void btl_init_menu_boots(void) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; Actor* player = battleStatus->playerActor; MoveData* move; s32 i; s32 moveCount; s32 hasAnyBadgeMoves; s32 fpCost; // If you don't have boots equipped, disable this menu if (playerData->bootsLevel == -1) { battleStatus->menuStatus[1] = 0; return; } for (i = 0; i < ARRAY_COUNT(battleStatus->submenuMoves); i++) { battleStatus->submenuMoves[i] = MOVE_NONE; } // Standard jump move moveCount = 1; battleStatus->submenuMoves[0] = playerData->bootsLevel + MOVE_JUMP1; battleStatus->submenuIcons[0] = ITEM_PARTNER_ATTACK; // Jump badges do { for (i = 0; i < ARRAY_COUNT(playerData->equippedBadges); i++) { s16 badge = playerData->equippedBadges[i]; if (badge != ITEM_NONE) { MoveData* moveTable = gMoveTable; u8 moveID = gItemTable[badge].moveID; move = &moveTable[moveID]; if (move->category == MOVE_TYPE_JUMP) { battleStatus->submenuMoves[moveCount] = moveID; battleStatus->submenuIcons[moveCount] = playerData->equippedBadges[i]; moveCount++; } } } } while (0); battleStatus->submenuMoveCount = moveCount; hasAnyBadgeMoves = FALSE; for (i = 0; i < battleStatus->submenuMoveCount; i++) { move = &gMoveTable[battleStatus->submenuMoves[i]]; // Calculate FP cost fpCost = move->costFP; if (fpCost != 0) { fpCost -= player_team_is_ability_active(player, ABILITY_FLOWER_SAVER); fpCost -= player_team_is_ability_active(player, ABILITY_FLOWER_FANATIC) * 2; if (fpCost < 1) { fpCost = 1; } } // See if there are any targets for this move battleStatus->moveCategory = BTL_MENU_TYPE_JUMP; battleStatus->moveArgument = playerData->bootsLevel; battleStatus->currentTargetListFlags = move->flags; // Controls target filters player_create_target_list(player); // If there are targets, enable the move if (player->targetListLength != 0) { hasAnyBadgeMoves = TRUE; battleStatus->submenuStatus[i] = BATTLE_SUBMENU_STATUS_ENABLED; } // If you don't have enough FP, disable the move if (playerData->curFP < fpCost) { battleStatus->submenuStatus[i] = BATTLE_SUBMENU_STATUS_NOT_ENOUGH_FP; } // If there are no targets available, disable the move if (player->targetListLength == 0) { battleStatus->submenuStatus[i] = BATTLE_SUBMENU_STATUS_NO_TARGETS_2; } if (gBattleStatus.flags2 & BS_FLAGS2_NO_TARGET_AVAILABLE) { battleStatus->submenuStatus[moveCount] = BATTLE_SUBMENU_STATUS_NO_TARGETS; } } if (!hasAnyBadgeMoves) { // Only the standard jump is available - no badge moves. // Selecting this submenu should immediately pick the standard jump move battleStatus->menuStatus[1] = -1; } else { // Enable this submenu battleStatus->menuStatus[1] = 1; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel light_rays_update /* 36D5A0 E006A580 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 36D5A4 E006A584 AFB40020 */ sw $s4, 0x20($sp) /* 36D5A8 E006A588 0080A02D */ daddu $s4, $a0, $zero /* 36D5AC E006A58C AFBF0024 */ sw $ra, 0x24($sp) /* 36D5B0 E006A590 AFB3001C */ sw $s3, 0x1C($sp) /* 36D5B4 E006A594 AFB20018 */ sw $s2, 0x18($sp) /* 36D5B8 E006A598 AFB10014 */ sw $s1, 0x14($sp) /* 36D5BC E006A59C AFB00010 */ sw $s0, 0x10($sp) /* 36D5C0 E006A5A0 8E91000C */ lw $s1, 0xC($s4) /* 36D5C4 E006A5A4 8E230028 */ lw $v1, 0x28($s1) /* 36D5C8 E006A5A8 8E240000 */ lw $a0, 0x0($s1) /* 36D5CC E006A5AC 2862000B */ slti $v0, $v1, 0xB /* 36D5D0 E006A5B0 10400002 */ beqz $v0, .LE006A5BC /* 36D5D4 E006A5B4 2462FFFF */ addiu $v0, $v1, -0x1 /* 36D5D8 E006A5B8 AE220028 */ sw $v0, 0x28($s1) .LE006A5BC: /* 36D5DC E006A5BC 8E22002C */ lw $v0, 0x2C($s1) /* 36D5E0 E006A5C0 24420001 */ addiu $v0, $v0, 0x1 /* 36D5E4 E006A5C4 AE22002C */ sw $v0, 0x2C($s1) /* 36D5E8 E006A5C8 8E830000 */ lw $v1, 0x0($s4) /* 36D5EC E006A5CC 30620010 */ andi $v0, $v1, 0x10 /* 36D5F0 E006A5D0 10400005 */ beqz $v0, .LE006A5E8 /* 36D5F4 E006A5D4 2402FFEF */ addiu $v0, $zero, -0x11 /* 36D5F8 E006A5D8 00621024 */ and $v0, $v1, $v0 /* 36D5FC E006A5DC AE820000 */ sw $v0, 0x0($s4) /* 36D600 E006A5E0 2402000A */ addiu $v0, $zero, 0xA /* 36D604 E006A5E4 AE220028 */ sw $v0, 0x28($s1) .LE006A5E8: /* 36D608 E006A5E8 8E220028 */ lw $v0, 0x28($s1) /* 36D60C E006A5EC 04410005 */ bgez $v0, .LE006A604 /* 36D610 E006A5F0 0040982D */ daddu $s3, $v0, $zero /* 36D614 E006A5F4 0C080128 */ jal shim_remove_effect /* 36D618 E006A5F8 0280202D */ daddu $a0, $s4, $zero /* 36D61C E006A5FC 0801A9FD */ j .LE006A7F4 /* 36D620 E006A600 00000000 */ nop .LE006A604: /* 36D624 E006A604 8E23002C */ lw $v1, 0x2C($s1) /* 36D628 E006A608 28820002 */ slti $v0, $a0, 0x2 /* 36D62C E006A60C 10400030 */ beqz $v0, .LE006A6D0 /* 36D630 E006A610 00000000 */ nop /* 36D634 E006A614 0480002E */ bltz $a0, .LE006A6D0 /* 36D638 E006A618 24120001 */ addiu $s2, $zero, 0x1 /* 36D63C E006A61C 8E820008 */ lw $v0, 0x8($s4) /* 36D640 E006A620 0242102A */ slt $v0, $s2, $v0 /* 36D644 E006A624 10400073 */ beqz $v0, .LE006A7F4 /* 36D648 E006A628 26310094 */ addiu $s1, $s1, 0x94 /* 36D64C E006A62C 00031080 */ sll $v0, $v1, 2 /* 36D650 E006A630 00431021 */ addu $v0, $v0, $v1 /* 36D654 E006A634 02429804 */ sllv $s3, $v0, $s2 /* 36D658 E006A638 26300028 */ addiu $s0, $s1, 0x28 .LE006A63C: /* 36D65C E006A63C 8E020000 */ lw $v0, 0x0($s0) /* 36D660 E006A640 8E030004 */ lw $v1, 0x4($s0) /* 36D664 E006A644 2442FFFF */ addiu $v0, $v0, -0x1 /* 36D668 E006A648 24630001 */ addiu $v1, $v1, 0x1 /* 36D66C E006A64C AE020000 */ sw $v0, 0x0($s0) /* 36D670 E006A650 2862000A */ slti $v0, $v1, 0xA /* 36D674 E006A654 10400005 */ beqz $v0, .LE006A66C /* 36D678 E006A658 AE030004 */ sw $v1, 0x4($s0) /* 36D67C E006A65C 00031040 */ sll $v0, $v1, 1 /* 36D680 E006A660 00431021 */ addu $v0, $v0, $v1 /* 36D684 E006A664 00021080 */ sll $v0, $v0, 2 /* 36D688 E006A668 AE02FFFC */ sw $v0, -0x4($s0) .LE006A66C: /* 36D68C E006A66C 8E030000 */ lw $v1, 0x0($s0) /* 36D690 E006A670 28620005 */ slti $v0, $v1, 0x5 /* 36D694 E006A674 10400005 */ beqz $v0, .LE006A68C /* 36D698 E006A678 00031040 */ sll $v0, $v1, 1 /* 36D69C E006A67C 00431021 */ addu $v0, $v0, $v1 /* 36D6A0 E006A680 000210C0 */ sll $v0, $v0, 3 /* 36D6A4 E006A684 00431021 */ addu $v0, $v0, $v1 /* 36D6A8 E006A688 AE02FFFC */ sw $v0, -0x4($s0) .LE006A68C: /* 36D6AC E006A68C C6000030 */ lwc1 $f0, 0x30($s0) /* 36D6B0 E006A690 C6020064 */ lwc1 $f2, 0x64($s0) /* 36D6B4 E006A694 46020000 */ add.s $f0, $f0, $f2 /* 36D6B8 E006A698 8E020000 */ lw $v0, 0x0($s0) /* 36D6BC E006A69C 1C400004 */ bgtz $v0, .LE006A6B0 /* 36D6C0 E006A6A0 E6000030 */ swc1 $f0, 0x30($s0) /* 36D6C4 E006A6A4 0220202D */ daddu $a0, $s1, $zero /* 36D6C8 E006A6A8 0C01A800 */ jal func_E006A000 /* 36D6CC E006A6AC 26650001 */ addiu $a1, $s3, 0x1 .LE006A6B0: /* 36D6D0 E006A6B0 26520001 */ addiu $s2, $s2, 0x1 /* 36D6D4 E006A6B4 26100094 */ addiu $s0, $s0, 0x94 /* 36D6D8 E006A6B8 8E820008 */ lw $v0, 0x8($s4) /* 36D6DC E006A6BC 0242102A */ slt $v0, $s2, $v0 /* 36D6E0 E006A6C0 1440FFDE */ bnez $v0, .LE006A63C /* 36D6E4 E006A6C4 26310094 */ addiu $s1, $s1, 0x94 /* 36D6E8 E006A6C8 0801A9FD */ j .LE006A7F4 /* 36D6EC E006A6CC 00000000 */ nop .LE006A6D0: /* 36D6F0 E006A6D0 8E820008 */ lw $v0, 0x8($s4) /* 36D6F4 E006A6D4 24120001 */ addiu $s2, $zero, 0x1 /* 36D6F8 E006A6D8 0242102A */ slt $v0, $s2, $v0 /* 36D6FC E006A6DC 10400045 */ beqz $v0, .LE006A7F4 /* 36D700 E006A6E0 26310094 */ addiu $s1, $s1, 0x94 /* 36D704 E006A6E4 26300064 */ addiu $s0, $s1, 0x64 .LE006A6E8: /* 36D708 E006A6E8 0C01A919 */ jal func_E006A464 /* 36D70C E006A6EC 0220202D */ daddu $a0, $s1, $zero /* 36D710 E006A6F0 8E02FFC4 */ lw $v0, -0x3C($s0) /* 36D714 E006A6F4 8E03FFC8 */ lw $v1, -0x38($s0) /* 36D718 E006A6F8 2442FFFF */ addiu $v0, $v0, -0x1 /* 36D71C E006A6FC 24630001 */ addiu $v1, $v1, 0x1 /* 36D720 E006A700 AE02FFC4 */ sw $v0, -0x3C($s0) /* 36D724 E006A704 28620005 */ slti $v0, $v1, 0x5 /* 36D728 E006A708 10400007 */ beqz $v0, .LE006A728 /* 36D72C E006A70C AE03FFC8 */ sw $v1, -0x38($s0) /* 36D730 E006A710 00031040 */ sll $v0, $v1, 1 /* 36D734 E006A714 00431021 */ addu $v0, $v0, $v1 /* 36D738 E006A718 000210C0 */ sll $v0, $v0, 3 /* 36D73C E006A71C 00431021 */ addu $v0, $v0, $v1 /* 36D740 E006A720 00021040 */ sll $v0, $v0, 1 /* 36D744 E006A724 AE02FFC0 */ sw $v0, -0x40($s0) .LE006A728: /* 36D748 E006A728 8E03FFC4 */ lw $v1, -0x3C($s0) /* 36D74C E006A72C 28620005 */ slti $v0, $v1, 0x5 /* 36D750 E006A730 10400006 */ beqz $v0, .LE006A74C /* 36D754 E006A734 00031040 */ sll $v0, $v1, 1 /* 36D758 E006A738 00431021 */ addu $v0, $v0, $v1 /* 36D75C E006A73C 000210C0 */ sll $v0, $v0, 3 /* 36D760 E006A740 00431021 */ addu $v0, $v0, $v1 /* 36D764 E006A744 00021040 */ sll $v0, $v0, 1 /* 36D768 E006A748 AE02FFC0 */ sw $v0, -0x40($s0) .LE006A74C: /* 36D76C E006A74C 2A62000A */ slti $v0, $s3, 0xA /* 36D770 E006A750 1040000C */ beqz $v0, .LE006A784 /* 36D774 E006A754 3C026666 */ lui $v0, (0x66666667 >> 16) /* 36D778 E006A758 8E03FFC0 */ lw $v1, -0x40($s0) /* 36D77C E006A75C 00730018 */ mult $v1, $s3 /* 36D780 E006A760 00001812 */ mflo $v1 /* 36D784 E006A764 34426667 */ ori $v0, $v0, (0x66666667 & 0xFFFF) /* 36D788 E006A768 00000000 */ nop /* 36D78C E006A76C 00620018 */ mult $v1, $v0 /* 36D790 E006A770 00031FC3 */ sra $v1, $v1, 31 /* 36D794 E006A774 00001010 */ mfhi $v0 /* 36D798 E006A778 00021083 */ sra $v0, $v0, 2 /* 36D79C E006A77C 00431023 */ subu $v0, $v0, $v1 /* 36D7A0 E006A780 AE02FFC0 */ sw $v0, -0x40($s0) .LE006A784: /* 36D7A4 E006A784 8E02FFC4 */ lw $v0, -0x3C($s0) /* 36D7A8 E006A788 1C400003 */ bgtz $v0, .LE006A798 /* 36D7AC E006A78C 0220202D */ daddu $a0, $s1, $zero /* 36D7B0 E006A790 0C01A82F */ jal func_E006A0BC /* 36D7B4 E006A794 0240282D */ daddu $a1, $s2, $zero .LE006A798: /* 36D7B8 E006A798 8E02002C */ lw $v0, 0x2C($s0) /* 36D7BC E006A79C 18400003 */ blez $v0, .LE006A7AC /* 36D7C0 E006A7A0 2442FFFF */ addiu $v0, $v0, -0x1 /* 36D7C4 E006A7A4 1C40000D */ bgtz $v0, .LE006A7DC /* 36D7C8 E006A7A8 AE02002C */ sw $v0, 0x2C($s0) .LE006A7AC: /* 36D7CC E006A7AC C606FFF8 */ lwc1 $f6, -0x8($s0) /* 36D7D0 E006A7B0 C600001C */ lwc1 $f0, 0x1C($s0) /* 36D7D4 E006A7B4 C604FFFC */ lwc1 $f4, -0x4($s0) /* 36D7D8 E006A7B8 46003180 */ add.s $f6, $f6, $f0 /* 36D7DC E006A7BC C6000020 */ lwc1 $f0, 0x20($s0) /* 36D7E0 E006A7C0 C6020000 */ lwc1 $f2, 0x0($s0) /* 36D7E4 E006A7C4 46002100 */ add.s $f4, $f4, $f0 /* 36D7E8 E006A7C8 C6000024 */ lwc1 $f0, 0x24($s0) /* 36D7EC E006A7CC 46001080 */ add.s $f2, $f2, $f0 /* 36D7F0 E006A7D0 E606FFF8 */ swc1 $f6, -0x8($s0) /* 36D7F4 E006A7D4 E604FFFC */ swc1 $f4, -0x4($s0) /* 36D7F8 E006A7D8 E6020000 */ swc1 $f2, 0x0($s0) .LE006A7DC: /* 36D7FC E006A7DC 26520001 */ addiu $s2, $s2, 0x1 /* 36D800 E006A7E0 26100094 */ addiu $s0, $s0, 0x94 /* 36D804 E006A7E4 8E820008 */ lw $v0, 0x8($s4) /* 36D808 E006A7E8 0242102A */ slt $v0, $s2, $v0 /* 36D80C E006A7EC 1440FFBE */ bnez $v0, .LE006A6E8 /* 36D810 E006A7F0 26310094 */ addiu $s1, $s1, 0x94 .LE006A7F4: /* 36D814 E006A7F4 8FBF0024 */ lw $ra, 0x24($sp) /* 36D818 E006A7F8 8FB40020 */ lw $s4, 0x20($sp) /* 36D81C E006A7FC 8FB3001C */ lw $s3, 0x1C($sp) /* 36D820 E006A800 8FB20018 */ lw $s2, 0x18($sp) /* 36D824 E006A804 8FB10014 */ lw $s1, 0x14($sp) /* 36D828 E006A808 8FB00010 */ lw $s0, 0x10($sp) /* 36D82C E006A80C 03E00008 */ jr $ra /* 36D830 E006A810 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void light_rays_update(EffectInstance* effect) { LightRaysFXData* part = effect->data.lightRays; s32 type = part->type; s32 timeLeft; s32 lifetime; s32 i; if (part->timeLeft < 11) { part->timeLeft--; } part->lifetime++; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; part->timeLeft = 10; } if (part->timeLeft < 0) { shim_remove_effect(effect); return; } timeLeft = part->timeLeft; lifetime = part->lifetime; switch (type) { case 0: case 1: part++; for (i = 1; i < effect->numParts; i++, part++) { part->timeLeft--; part->lifetime++; if (part->lifetime < 10) { part->alpha = part->lifetime * 12; } if (part->timeLeft < 5) { part->alpha = part->timeLeft * 25; } part->unk_58 += part->unk_8C; if (part->timeLeft <= 0) { func_E006A000(part, lifetime * 10 + 1); } } break; default: part++; for (i = 1; i < effect->numParts; i++, part++) { func_E006A464(part); part->timeLeft--; part->lifetime++; if (part->lifetime < 5) { part->alpha = part->lifetime * 50; } if (part->timeLeft < 5) { part->alpha = part->timeLeft * 50; } if (timeLeft < 10) { part->alpha = (part->alpha * timeLeft) / 10; } if (part->timeLeft <= 0) { func_E006A0BC(part, i); } if (part->unk_90 <= 0 || --part->unk_90 <= 0) { part->rotation.x += part->unk_80; part->rotation.y += part->unk_84; part->rotation.z += part->unk_88; } } } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802532D0 /* 181BB0 802532D0 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 181BB4 802532D4 AFB20038 */ sw $s2, 0x38($sp) /* 181BB8 802532D8 0080902D */ daddu $s2, $a0, $zero /* 181BBC 802532DC AFBF0040 */ sw $ra, 0x40($sp) dgb_01_D_802532E0_C10B60: /* 181BC0 802532E0 AFB3003C */ sw $s3, 0x3C($sp) /* 181BC4 802532E4 AFB10034 */ sw $s1, 0x34($sp) /* 181BC8 802532E8 AFB00030 */ sw $s0, 0x30($sp) /* 181BCC 802532EC 10A00029 */ beqz $a1, .L80253394 /* 181BD0 802532F0 8E50000C */ lw $s0, 0xC($s2) /* 181BD4 802532F4 8E050000 */ lw $a1, 0x0($s0) /* 181BD8 802532F8 0C0B1EAF */ jal evt_get_variable /* 181BDC 802532FC 26100004 */ addiu $s0, $s0, 0x4 /* 181BE0 80253300 0040882D */ daddu $s1, $v0, $zero /* 181BE4 80253304 8E050000 */ lw $a1, 0x0($s0) /* 181BE8 80253308 26100004 */ addiu $s0, $s0, 0x4 /* 181BEC 8025330C 0C0B1EAF */ jal evt_get_variable /* 181BF0 80253310 0240202D */ daddu $a0, $s2, $zero /* 181BF4 80253314 8E050000 */ lw $a1, 0x0($s0) /* 181BF8 80253318 26100004 */ addiu $s0, $s0, 0x4 /* 181BFC 8025331C 0240202D */ daddu $a0, $s2, $zero dgb_01_D_80253320_C10BA0: /* 181C00 80253320 0C0B1EAF */ jal evt_get_variable /* 181C04 80253324 0040982D */ daddu $s3, $v0, $zero /* 181C08 80253328 3C01802A */ lui $at, %hi(gSpeakingActorTalkAnim) /* 181C0C 8025332C AC22FA6C */ sw $v0, %lo(gSpeakingActorTalkAnim)($at) /* 181C10 80253330 8E050000 */ lw $a1, 0x0($s0) /* 181C14 80253334 0C0B1EAF */ jal evt_get_variable /* 181C18 80253338 0240202D */ daddu $a0, $s2, $zero /* 181C1C 8025333C 3C01802A */ lui $at, %hi(gSpeakingActorIdleAnim) /* 181C20 80253340 AC22FA70 */ sw $v0, %lo(gSpeakingActorIdleAnim)($at) /* 181C24 80253344 2402FF81 */ addiu $v0, $zero, -0x7F /* 181C28 80253348 16220002 */ bne $s1, $v0, .L80253354 /* 181C2C 8025334C 00000000 */ nop /* 181C30 80253350 8E510148 */ lw $s1, 0x148($s2) .L80253354: /* 181C34 80253354 0C09A75B */ jal get_actor /* 181C38 80253358 0220202D */ daddu $a0, $s1, $zero /* 181C3C 8025335C 0040882D */ daddu $s1, $v0, $zero dgb_01_D_80253360_C10BE0: /* 181C40 80253360 0220202D */ daddu $a0, $s1, $zero /* 181C44 80253364 0C099117 */ jal get_actor_part /* 181C48 80253368 0260282D */ daddu $a1, $s3, $zero /* 181C4C 8025336C 3C04802A */ lui $a0, %hi(gSpeakingActorPrintCtx) /* 181C50 80253370 8C84FA60 */ lw $a0, %lo(gSpeakingActorPrintCtx)($a0) /* 181C54 80253374 3C01802A */ lui $at, %hi(gSpeakingActor) D_80253378: /* 181C58 80253378 AC31FA74 */ sw $s1, %lo(gSpeakingActor)($at) /* 181C5C 8025337C 3C01802A */ lui $at, %hi(gSpeakingActorPart) /* 181C60 80253380 AC22FA78 */ sw $v0, %lo(gSpeakingActorPart)($at) D_80253384: /* 181C64 80253384 0C04971C */ jal close_message /* 181C68 80253388 00000000 */ nop D_8025338C: /* 181C6C 8025338C 0C03A6D5 */ jal increment_status_bar_disabled D_80253390: /* 181C70 80253390 AE400070 */ sw $zero, 0x70($s2) .L80253394: /* 181C74 80253394 8E420070 */ lw $v0, 0x70($s2) /* 181C78 80253398 14400060 */ bnez $v0, .L8025351C /* 181C7C 8025339C 0000102D */ daddu $v0, $zero, $zero dgb_01_D_802533A0_C10C20: /* 181C80 802533A0 3C11802A */ lui $s1, %hi(gSpeakingActor) /* 181C84 802533A4 8E31FA74 */ lw $s1, %lo(gSpeakingActor)($s1) /* 181C88 802533A8 3C12802A */ lui $s2, %hi(gSpeakingActorPart) /* 181C8C 802533AC 8E52FA78 */ lw $s2, %lo(gSpeakingActorPart)($s2) /* 181C90 802533B0 86220150 */ lh $v0, 0x150($s1) /* 181C94 802533B4 C6200144 */ lwc1 $f0, 0x144($s1) /* 181C98 802533B8 44821000 */ mtc1 $v0, $f2 /* 181C9C 802533BC 00000000 */ nop /* 181CA0 802533C0 468010A0 */ cvt.s.w $f2, $f2 /* 181CA4 802533C4 8E220000 */ lw $v0, 0x0($s1) /* 181CA8 802533C8 30428000 */ andi $v0, $v0, 0x8000 /* 181CAC 802533CC 1440000D */ bnez $v0, .L80253404 /* 181CB0 802533D0 46020100 */ add.s $f4, $f0, $f2 /* 181CB4 802533D4 86220152 */ lh $v0, 0x152($s1) /* 181CB8 802533D8 C6200148 */ lwc1 $f0, 0x148($s1) /* 181CBC 802533DC 44821000 */ mtc1 $v0, $f2 dgb_01_D_802533E0_C10C60: /* 181CC0 802533E0 00000000 */ nop /* 181CC4 802533E4 468010A0 */ cvt.s.w $f2, $f2 /* 181CC8 802533E8 92220191 */ lbu $v0, 0x191($s1) /* 181CCC 802533EC 46020000 */ add.s $f0, $f0, $f2 /* 181CD0 802533F0 44821000 */ mtc1 $v0, $f2 /* 181CD4 802533F4 00000000 */ nop /* 181CD8 802533F8 468010A0 */ cvt.s.w $f2, $f2 /* 181CDC 802533FC 08094D0D */ j .L80253434 /* 181CE0 80253400 46001000 */ add.s $f0, $f2, $f0 .L80253404: /* 181CE4 80253404 86220152 */ lh $v0, 0x152($s1) /* 181CE8 80253408 C6220148 */ lwc1 $f2, 0x148($s1) /* 181CEC 8025340C 44820000 */ mtc1 $v0, $f0 /* 181CF0 80253410 00000000 */ nop /* 181CF4 80253414 46800020 */ cvt.s.w $f0, $f0 /* 181CF8 80253418 92220191 */ lbu $v0, 0x191($s1) /* 181CFC 8025341C 46001080 */ add.s $f2, $f2, $f0 dgb_01_D_80253420_C10CA0: /* 181D00 80253420 00021042 */ srl $v0, $v0, 1 /* 181D04 80253424 44820000 */ mtc1 $v0, $f0 /* 181D08 80253428 00000000 */ nop /* 181D0C 8025342C 46800020 */ cvt.s.w $f0, $f0 /* 181D10 80253430 46001000 */ add.s $f0, $f2, $f0 .L80253434: /* 181D14 80253434 24040001 */ addiu $a0, $zero, 0x1 /* 181D18 80253438 44052000 */ mfc1 $a1, $f4 /* 181D1C 8025343C 44060000 */ mfc1 $a2, $f0 /* 181D20 80253440 86230154 */ lh $v1, 0x154($s1) /* 181D24 80253444 C622014C */ lwc1 $f2, 0x14C($s1) /* 181D28 80253448 27A20020 */ addiu $v0, $sp, 0x20 /* 181D2C 8025344C AFA20010 */ sw $v0, 0x10($sp) /* 181D30 80253450 44830000 */ mtc1 $v1, $f0 /* 181D34 80253454 00000000 */ nop /* 181D38 80253458 46800020 */ cvt.s.w $f0, $f0 /* 181D3C 8025345C 46001080 */ add.s $f2, $f2, $f0 dgb_01_D_80253460_C10CE0: /* 181D40 80253460 27A20024 */ addiu $v0, $sp, 0x24 /* 181D44 80253464 AFA20014 */ sw $v0, 0x14($sp) /* 181D48 80253468 44071000 */ mfc1 $a3, $f2 /* 181D4C 8025346C 27A20028 */ addiu $v0, $sp, 0x28 /* 181D50 80253470 0C00B94E */ jal get_screen_coords /* 181D54 80253474 AFA20018 */ sw $v0, 0x18($sp) /* 181D58 80253478 3C10802A */ lui $s0, %hi(gSpeakingActorPrintCtx) /* 181D5C 8025347C 2610FA60 */ addiu $s0, $s0, %lo(gSpeakingActorPrintCtx) /* 181D60 80253480 8E040000 */ lw $a0, 0x0($s0) /* 181D64 80253484 8FA50020 */ lw $a1, 0x20($sp) D_80253488: /* 181D68 80253488 0C0496AE */ jal msg_printer_set_origin_pos /* 181D6C 8025348C 8FA60024 */ lw $a2, 0x24($sp) /* 181D70 80253490 8E020000 */ lw $v0, 0x0($s0) /* 181D74 80253494 8C4304FC */ lw $v1, 0x4FC($v0) /* 181D78 80253498 30620040 */ andi $v0, $v1, 0x40 /* 181D7C 8025349C 10400005 */ beqz $v0, .L802534B4 dgb_01_D_802534A0_C10D20: /* 181D80 802534A0 30620080 */ andi $v0, $v1, 0x80 /* 181D84 802534A4 0C03A6CC */ jal decrement_status_bar_disabled /* 181D88 802534A8 00000000 */ nop /* 181D8C 802534AC 08094D47 */ j .L8025351C /* 181D90 802534B0 24020001 */ addiu $v0, $zero, 0x1 .L802534B4: /* 181D94 802534B4 10400005 */ beqz $v0, .L802534CC /* 181D98 802534B8 00000000 */ nop /* 181D9C 802534BC 3C06802A */ lui $a2, %hi(gSpeakingActorTalkAnim) /* 181DA0 802534C0 8CC6FA6C */ lw $a2, %lo(gSpeakingActorTalkAnim)($a2) /* 181DA4 802534C4 08094D35 */ j .L802534D4 /* 181DA8 802534C8 00000000 */ nop .L802534CC: /* 181DAC 802534CC 3C06802A */ lui $a2, %hi(gSpeakingActorIdleAnim) /* 181DB0 802534D0 8CC6FA70 */ lw $a2, %lo(gSpeakingActorIdleAnim)($a2) .L802534D4: /* 181DB4 802534D4 04C00003 */ bltz $a2, .L802534E4 /* 181DB8 802534D8 0220202D */ daddu $a0, $s1, $zero /* 181DBC 802534DC 0C098F82 */ jal func_80263E08 dgb_01_D_802534E0_C10D60: /* 181DC0 802534E0 0240282D */ daddu $a1, $s2, $zero .L802534E4: /* 181DC4 802534E4 3C03802A */ lui $v1, %hi(gSpeakingActorPrintIsDone) /* 181DC8 802534E8 8C63FA68 */ lw $v1, %lo(gSpeakingActorPrintIsDone)($v1) /* 181DCC 802534EC 24020001 */ addiu $v0, $zero, 0x1 /* 181DD0 802534F0 1462000A */ bne $v1, $v0, .L8025351C /* 181DD4 802534F4 0000102D */ daddu $v0, $zero, $zero /* 181DD8 802534F8 0C03A6CC */ jal decrement_status_bar_disabled /* 181DDC 802534FC 00000000 */ nop /* 181DE0 80253500 24020001 */ addiu $v0, $zero, 0x1 /* 181DE4 80253504 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 181DE8 80253508 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 181DEC 8025350C 8C640000 */ lw $a0, 0x0($v1) /* 181DF0 80253510 2405FFEF */ addiu $a1, $zero, -0x11 /* 181DF4 80253514 00852024 */ and $a0, $a0, $a1 /* 181DF8 80253518 AC640000 */ sw $a0, 0x0($v1) .L8025351C: /* 181DFC 8025351C 8FBF0040 */ lw $ra, 0x40($sp) dgb_01_D_80253520_C10DA0: /* 181E00 80253520 8FB3003C */ lw $s3, 0x3C($sp) /* 181E04 80253524 8FB20038 */ lw $s2, 0x38($sp) /* 181E08 80253528 8FB10034 */ lw $s1, 0x34($sp) /* 181E0C 8025352C 8FB00030 */ lw $s0, 0x30($sp) /* 181E10 80253530 03E00008 */ jr $ra /* 181E14 80253534 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: ApiStatus EndActorSpeech(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 flags; s32 anim; f32 x, y, z; s32 screenX, screenY, screenZ; if (isInitialCall) { s32 actor = evt_get_variable(script, *args++); s32 partID = evt_get_variable(script, *args++); ActorPart* actorPart; gSpeakingActorTalkAnim = evt_get_variable(script, *args++); gSpeakingActorIdleAnim = evt_get_variable(script, *args++); if (actor == ACTOR_SELF) { actor = script->owner1.actorID; } actor = (s32) get_actor(actor); actorPart = get_actor_part((Actor*)actor, partID); gSpeakingActor = (Actor*) actor; gSpeakingActorPart = actorPart; close_message(gSpeakingActorPrintCtx); script->functionTemp[0] = 0; increment_status_bar_disabled(); } if (script->functionTemp[0] == 0) { Actor* actor = gSpeakingActor; ActorPart* actorPart = gSpeakingActorPart; x = actor->currentPos.x + actor->headOffset.x; if (!(gSpeakingActor->flags & ACTOR_FLAG_8000)) { y = actor->currentPos.y + actor->headOffset.y + actor->size.y ; } else { y = actor->currentPos.y + actor->headOffset.y + actor->size.y / 2; } z = actor->currentPos.z + actor->headOffset.z; get_screen_coords(CAM_BATTLE, x, y, z, &screenX, &screenY, &screenZ); msg_printer_set_origin_pos(gSpeakingActorPrintCtx, screenX, screenY); flags = gSpeakingActorPrintCtx->stateFlags; if (flags & 0x40) { decrement_status_bar_disabled(); return ApiStatus_DONE1; } if (flags & 0x80) { anim = gSpeakingActorTalkAnim; } else { anim = gSpeakingActorIdleAnim; } if (anim >= 0) { func_80263E08(actor, actorPart, anim); } if (gSpeakingActorPrintIsDone == TRUE) { decrement_status_bar_disabled(); gOverrideFlags &= ~GLOBAL_OVERRIDES_10; return ApiStatus_DONE1; } } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel npc_test_move_with_slipping /* 76AC8 800DD618 27BDFF50 */ addiu $sp, $sp, -0xB0 /* 76ACC 800DD61C C7AC00C4 */ lwc1 $f12, 0xC4($sp) /* 76AD0 800DD620 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 76AD4 800DD624 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 76AD8 800DD628 44810000 */ mtc1 $at, $f0 /* 76ADC 800DD62C AFB00068 */ sw $s0, 0x68($sp) /* 76AE0 800DD630 0080802D */ daddu $s0, $a0, $zero /* 76AE4 800DD634 AFB30074 */ sw $s3, 0x74($sp) /* 76AE8 800DD638 00A0982D */ daddu $s3, $a1, $zero /* 76AEC 800DD63C AFB1006C */ sw $s1, 0x6C($sp) /* 76AF0 800DD640 00C0882D */ daddu $s1, $a2, $zero /* 76AF4 800DD644 AFB40078 */ sw $s4, 0x78($sp) /* 76AF8 800DD648 00E0A02D */ daddu $s4, $a3, $zero /* 76AFC 800DD64C F7B80098 */ sdc1 $f24, 0x98($sp) /* 76B00 800DD650 C7B800C0 */ lwc1 $f24, 0xC0($sp) /* 76B04 800DD654 27A50038 */ addiu $a1, $sp, 0x38 /* 76B08 800DD658 F7B40088 */ sdc1 $f20, 0x88($sp) /* 76B0C 800DD65C C7B400C8 */ lwc1 $f20, 0xC8($sp) /* 76B10 800DD660 46006302 */ mul.s $f12, $f12, $f0 /* 76B14 800DD664 00000000 */ nop /* 76B18 800DD668 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 76B1C 800DD66C 44810000 */ mtc1 $at, $f0 /* 76B20 800DD670 27A6003C */ addiu $a2, $sp, 0x3C /* 76B24 800DD674 AFBF0080 */ sw $ra, 0x80($sp) /* 76B28 800DD678 AFB5007C */ sw $s5, 0x7C($sp) /* 76B2C 800DD67C AFB20070 */ sw $s2, 0x70($sp) /* 76B30 800DD680 F7BC00A8 */ sdc1 $f28, 0xA8($sp) /* 76B34 800DD684 F7BA00A0 */ sdc1 $f26, 0xA0($sp) /* 76B38 800DD688 F7B60090 */ sdc1 $f22, 0x90($sp) /* 76B3C 800DD68C 0C00A82D */ jal sin_cos_rad /* 76B40 800DD690 46006303 */ div.s $f12, $f12, $f0 /* 76B44 800DD694 C7A40038 */ lwc1 $f4, 0x38($sp) /* 76B48 800DD698 4604C702 */ mul.s $f28, $f24, $f4 /* 76B4C 800DD69C 00000000 */ nop /* 76B50 800DD6A0 4604A182 */ mul.s $f6, $f20, $f4 /* 76B54 800DD6A4 00000000 */ nop /* 76B58 800DD6A8 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 76B5C 800DD6AC 44814000 */ mtc1 $at, $f8 /* 76B60 800DD6B0 00000000 */ nop /* 76B64 800DD6B4 4608A082 */ mul.s $f2, $f20, $f8 /* 76B68 800DD6B8 00000000 */ nop /* 76B6C 800DD6BC 46083182 */ mul.s $f6, $f6, $f8 /* 76B70 800DD6C0 00000000 */ nop /* 76B74 800DD6C4 2412FFFF */ addiu $s2, $zero, -0x1 /* 76B78 800DD6C8 4614C000 */ add.s $f0, $f24, $f20 /* 76B7C 800DD6CC 0000A82D */ daddu $s5, $zero, $zero /* 76B80 800DD6D0 46020580 */ add.s $f22, $f0, $f2 /* 76B84 800DD6D4 C7A2003C */ lwc1 $f2, 0x3C($sp) /* 76B88 800DD6D8 27A20040 */ addiu $v0, $sp, 0x40 /* 76B8C 800DD6DC 46001087 */ neg.s $f2, $f2 /* 76B90 800DD6E0 E7A2003C */ swc1 $f2, 0x3C($sp) /* 76B94 800DD6E4 E7B6004C */ swc1 $f22, 0x4C($sp) /* 76B98 800DD6E8 C66A0000 */ lwc1 $f10, 0x0($s3) /* 76B9C 800DD6EC C68C0000 */ lwc1 $f12, 0x0($s4) /* 76BA0 800DD6F0 4602A002 */ mul.s $f0, $f20, $f2 /* 76BA4 800DD6F4 00000000 */ nop /* 76BA8 800DD6F8 AFA2001C */ sw $v0, 0x1C($sp) /* 76BAC 800DD6FC 27A20044 */ addiu $v0, $sp, 0x44 /* 76BB0 800DD700 AFA20020 */ sw $v0, 0x20($sp) /* 76BB4 800DD704 27A20048 */ addiu $v0, $sp, 0x48 /* 76BB8 800DD708 AFA20024 */ sw $v0, 0x24($sp) /* 76BBC 800DD70C 27A2004C */ addiu $v0, $sp, 0x4C /* 76BC0 800DD710 AFA20028 */ sw $v0, 0x28($sp) /* 76BC4 800DD714 27A20050 */ addiu $v0, $sp, 0x50 /* 76BC8 800DD718 AFA2002C */ sw $v0, 0x2C($sp) /* 76BCC 800DD71C 27A20054 */ addiu $v0, $sp, 0x54 /* 76BD0 800DD720 46080002 */ mul.s $f0, $f0, $f8 /* 76BD4 800DD724 00000000 */ nop /* 76BD8 800DD728 AFA20030 */ sw $v0, 0x30($sp) /* 76BDC 800DD72C 27A20058 */ addiu $v0, $sp, 0x58 /* 76BE0 800DD730 E7A40010 */ swc1 $f4, 0x10($sp) /* 76BE4 800DD734 AFA00014 */ sw $zero, 0x14($sp) /* 76BE8 800DD738 46065281 */ sub.s $f10, $f10, $f6 /* 76BEC 800DD73C E7A20018 */ swc1 $f2, 0x18($sp) /* 76BF0 800DD740 AFA20034 */ sw $v0, 0x34($sp) /* 76BF4 800DD744 46006301 */ sub.s $f12, $f12, $f0 /* 76BF8 800DD748 8E260000 */ lw $a2, 0x0($s1) /* 76BFC 800DD74C 44055000 */ mfc1 $a1, $f10 /* 76C00 800DD750 44076000 */ mfc1 $a3, $f12 /* 76C04 800DD754 4602C682 */ mul.s $f26, $f24, $f2 /* 76C08 800DD758 00000000 */ nop /* 76C0C 800DD75C 0C037513 */ jal npc_raycast_general /* 76C10 800DD760 0200202D */ daddu $a0, $s0, $zero /* 76C14 800DD764 0040802D */ daddu $s0, $v0, $zero /* 76C18 800DD768 0600004E */ bltz $s0, .L800DD8A4 /* 76C1C 800DD76C 00000000 */ nop /* 76C20 800DD770 C7A0004C */ lwc1 $f0, 0x4C($sp) /* 76C24 800DD774 4616003E */ c.le.s $f0, $f22 /* 76C28 800DD778 00000000 */ nop /* 76C2C 800DD77C 45000049 */ bc1f .L800DD8A4 /* 76C30 800DD780 00000000 */ nop /* 76C34 800DD784 C7A20050 */ lwc1 $f2, 0x50($sp) /* 76C38 800DD788 46021082 */ mul.s $f2, $f2, $f2 /* 76C3C 800DD78C 00000000 */ nop /* 76C40 800DD790 C7A00058 */ lwc1 $f0, 0x58($sp) /* 76C44 800DD794 46000002 */ mul.s $f0, $f0, $f0 /* 76C48 800DD798 00000000 */ nop /* 76C4C 800DD79C 46001300 */ add.s $f12, $f2, $f0 /* 76C50 800DD7A0 46006004 */ sqrt.s $f0, $f12 /* 76C54 800DD7A4 46000032 */ c.eq.s $f0, $f0 /* 76C58 800DD7A8 00000000 */ nop /* 76C5C 800DD7AC 45010003 */ bc1t .L800DD7BC /* 76C60 800DD7B0 00000000 */ nop /* 76C64 800DD7B4 0C0187BC */ jal sqrtf /* 76C68 800DD7B8 00000000 */ nop .L800DD7BC: /* 76C6C 800DD7BC 44060000 */ mfc1 $a2, $f0 /* 76C70 800DD7C0 C7A00054 */ lwc1 $f0, 0x54($sp) /* 76C74 800DD7C4 44806000 */ mtc1 $zero, $f12 /* 76C78 800DD7C8 46000007 */ neg.s $f0, $f0 /* 76C7C 800DD7CC 44070000 */ mfc1 $a3, $f0 /* 76C80 800DD7D0 0C00A720 */ jal atan2 /* 76C84 800DD7D4 46006386 */ mov.s $f14, $f12 /* 76C88 800DD7D8 3C014270 */ lui $at, (0x42700000 >> 16) /* 76C8C 800DD7DC 44811000 */ mtc1 $at, $f2 /* 76C90 800DD7E0 46000106 */ mov.s $f4, $f0 /* 76C94 800DD7E4 4604103C */ c.lt.s $f2, $f4 /* 76C98 800DD7E8 00000000 */ nop /* 76C9C 800DD7EC 45000008 */ bc1f .L800DD810 /* 76CA0 800DD7F0 00000000 */ nop /* 76CA4 800DD7F4 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 76CA8 800DD7F8 44810000 */ mtc1 $at, $f0 /* 76CAC 800DD7FC 00000000 */ nop /* 76CB0 800DD800 4600203C */ c.lt.s $f4, $f0 /* 76CB4 800DD804 00000000 */ nop /* 76CB8 800DD808 45030001 */ bc1tl .L800DD810 /* 76CBC 800DD80C 24150001 */ addiu $s5, $zero, 0x1 .L800DD810: /* 76CC0 800DD810 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 76CC4 800DD814 44810000 */ mtc1 $at, $f0 /* 76CC8 800DD818 00000000 */ nop /* 76CCC 800DD81C 4600A002 */ mul.s $f0, $f20, $f0 /* 76CD0 800DD820 00000000 */ nop /* 76CD4 800DD824 4614C080 */ add.s $f2, $f24, $f20 /* 76CD8 800DD828 27A4005C */ addiu $a0, $sp, 0x5C /* 76CDC 800DD82C 4406E000 */ mfc1 $a2, $f28 /* 76CE0 800DD830 46001080 */ add.s $f2, $f2, $f0 /* 76CE4 800DD834 C7B4004C */ lwc1 $f20, 0x4C($sp) /* 76CE8 800DD838 4407D000 */ mfc1 $a3, $f26 /* 76CEC 800DD83C 4602A501 */ sub.s $f20, $f20, $f2 /* 76CF0 800DD840 C7B60038 */ lwc1 $f22, 0x38($sp) /* 76CF4 800DD844 C7A00050 */ lwc1 $f0, 0x50($sp) /* 76CF8 800DD848 4616A582 */ mul.s $f22, $f20, $f22 /* 76CFC 800DD84C 00000000 */ nop /* 76D00 800DD850 C7A2003C */ lwc1 $f2, 0x3C($sp) /* 76D04 800DD854 27A50060 */ addiu $a1, $sp, 0x60 /* 76D08 800DD858 E7A00010 */ swc1 $f0, 0x10($sp) /* 76D0C 800DD85C C7A00058 */ lwc1 $f0, 0x58($sp) /* 76D10 800DD860 4602A502 */ mul.s $f20, $f20, $f2 /* 76D14 800DD864 00000000 */ nop /* 76D18 800DD868 0C03756D */ jal npc_get_slip_vector /* 76D1C 800DD86C E7A00014 */ swc1 $f0, 0x14($sp) /* 76D20 800DD870 C7A0005C */ lwc1 $f0, 0x5C($sp) /* 76D24 800DD874 4600B580 */ add.s $f22, $f22, $f0 /* 76D28 800DD878 C6600000 */ lwc1 $f0, 0x0($s3) /* 76D2C 800DD87C 46160000 */ add.s $f0, $f0, $f22 /* 76D30 800DD880 E6600000 */ swc1 $f0, 0x0($s3) /* 76D34 800DD884 C7A00060 */ lwc1 $f0, 0x60($sp) /* 76D38 800DD888 4600A500 */ add.s $f20, $f20, $f0 /* 76D3C 800DD88C C6800000 */ lwc1 $f0, 0x0($s4) /* 76D40 800DD890 46140000 */ add.s $f0, $f0, $f20 /* 76D44 800DD894 0200902D */ daddu $s2, $s0, $zero /* 76D48 800DD898 E6800000 */ swc1 $f0, 0x0($s4) /* 76D4C 800DD89C 3C018011 */ lui $at, %hi(NpcHitQueryColliderID) /* 76D50 800DD8A0 AC32C978 */ sw $s2, %lo(NpcHitQueryColliderID)($at) .L800DD8A4: /* 76D54 800DD8A4 16A00007 */ bnez $s5, .L800DD8C4 /* 76D58 800DD8A8 0240102D */ daddu $v0, $s2, $zero /* 76D5C 800DD8AC C6600000 */ lwc1 $f0, 0x0($s3) /* 76D60 800DD8B0 461C0000 */ add.s $f0, $f0, $f28 /* 76D64 800DD8B4 E6600000 */ swc1 $f0, 0x0($s3) /* 76D68 800DD8B8 C6800000 */ lwc1 $f0, 0x0($s4) /* 76D6C 800DD8BC 461A0000 */ add.s $f0, $f0, $f26 /* 76D70 800DD8C0 E6800000 */ swc1 $f0, 0x0($s4) .L800DD8C4: /* 76D74 800DD8C4 8FBF0080 */ lw $ra, 0x80($sp) /* 76D78 800DD8C8 8FB5007C */ lw $s5, 0x7C($sp) /* 76D7C 800DD8CC 8FB40078 */ lw $s4, 0x78($sp) /* 76D80 800DD8D0 8FB30074 */ lw $s3, 0x74($sp) /* 76D84 800DD8D4 8FB20070 */ lw $s2, 0x70($sp) /* 76D88 800DD8D8 8FB1006C */ lw $s1, 0x6C($sp) /* 76D8C 800DD8DC 8FB00068 */ lw $s0, 0x68($sp) /* 76D90 800DD8E0 D7BC00A8 */ ldc1 $f28, 0xA8($sp) /* 76D94 800DD8E4 D7BA00A0 */ ldc1 $f26, 0xA0($sp) /* 76D98 800DD8E8 D7B80098 */ ldc1 $f24, 0x98($sp) /* 76D9C 800DD8EC D7B60090 */ ldc1 $f22, 0x90($sp) /* 76DA0 800DD8F0 D7B40088 */ ldc1 $f20, 0x88($sp) /* 76DA4 800DD8F4 03E00008 */ jr $ra /* 76DA8 800DD8F8 27BD00B0 */ addiu $sp, $sp, 0xB0 ### DECOMPILED C INSTRUCTIONS: s32 npc_test_move_with_slipping(s32 ignoreFlags, f32* x, f32* y, f32* z, f32 length, f32 yaw, f32 radius) { f32 outX, outY; f32 bX, bZ; f32 hitNy; f32 hitDepth; f32 hitX, hitY, hitZ; f32 outSinTheta, outCosTheta; f32 temp_f0, temp_f20, temp_f22; f32 aX, aZ; f32 inverseOutCosTheta; s32 raycastHitID; s32 phi_s5; s32 hitResult = NO_COLLIDER; f32 a, b; sin_cos_rad(DEG_TO_RAD(yaw), &outSinTheta, &outCosTheta); aX = length * outSinTheta; temp_f22 = length + radius + (radius * 0.5f); inverseOutCosTheta = -outCosTheta; outCosTheta = inverseOutCosTheta; hitDepth = temp_f22; aZ = length * inverseOutCosTheta; raycastHitID = npc_raycast_general(ignoreFlags, *x - (radius * outSinTheta * 0.5f), *y, *z - (radius * inverseOutCosTheta * 0.5f), outSinTheta, 0.0f, inverseOutCosTheta, &hitX, &hitY, &hitZ, &hitDepth, &bX, &hitNy, &bZ); phi_s5 = FALSE; if (raycastHitID >= 0 && hitDepth <= temp_f22) { temp_f0 = atan2(0.0f, 0.0f, sqrtf(SQ(bX) + SQ(bZ)), -hitNy); if (temp_f0 > 60.0f && temp_f0 < 90.0f) { phi_s5 = TRUE; } temp_f20 = hitDepth - (length + radius + (radius * 0.5f)); a = temp_f20 * outSinTheta; b = temp_f20 * outCosTheta; npc_get_slip_vector(&outX, &outY, aX, aZ, bX, bZ); *x += a + outX; *z += b + outY; NpcHitQueryColliderID = raycastHitID; hitResult = raycastHitID; } if (phi_s5 == 0) { *x += aX; *z += aZ; } return hitResult; }
### RAW ASSEMBLY INSTRUCTIONS: glabel btl_init_menu_hammer /* 191FC4 802636E4 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 191FC8 802636E8 AFB40020 */ sw $s4, 0x20($sp) /* 191FCC 802636EC 3C14800E */ lui $s4, %hi(gBattleStatus) /* 191FD0 802636F0 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus) /* 191FD4 802636F4 AFB7002C */ sw $s7, 0x2C($sp) /* 191FD8 802636F8 3C178011 */ lui $s7, %hi(gPlayerData) /* 191FDC 802636FC 26F7F290 */ addiu $s7, $s7, %lo(gPlayerData) /* 191FE0 80263700 2403FFFF */ addiu $v1, $zero, -0x1 /* 191FE4 80263704 AFBF0034 */ sw $ra, 0x34($sp) /* 191FE8 80263708 AFBE0030 */ sw $fp, 0x30($sp) /* 191FEC 8026370C AFB60028 */ sw $s6, 0x28($sp) /* 191FF0 80263710 AFB50024 */ sw $s5, 0x24($sp) /* 191FF4 80263714 AFB3001C */ sw $s3, 0x1C($sp) /* 191FF8 80263718 AFB20018 */ sw $s2, 0x18($sp) /* 191FFC 8026371C AFB10014 */ sw $s1, 0x14($sp) /* 192000 80263720 AFB00010 */ sw $s0, 0x10($sp) /* 192004 80263724 82E20001 */ lb $v0, 0x1($s7) /* 192008 80263728 8E9500D8 */ lw $s5, 0xD8($s4) /* 19200C 8026372C 14430003 */ bne $v0, $v1, .L8026373C /* 192010 80263730 24120017 */ addiu $s2, $zero, 0x17 /* 192014 80263734 08098E39 */ j .L802638E4 /* 192018 80263738 A280007F */ sb $zero, 0x7F($s4) .L8026373C: /* 19201C 8026373C 02921021 */ addu $v0, $s4, $s2 .L80263740: /* 192020 80263740 A04001DE */ sb $zero, 0x1DE($v0) /* 192024 80263744 2652FFFF */ addiu $s2, $s2, -0x1 /* 192028 80263748 0641FFFD */ bgez $s2, .L80263740 /* 19202C 8026374C 2442FFFF */ addiu $v0, $v0, -0x1 /* 192030 80263750 24060001 */ addiu $a2, $zero, 0x1 /* 192034 80263754 92E20001 */ lbu $v0, 0x1($s7) /* 192038 80263758 24030155 */ addiu $v1, $zero, 0x155 /* 19203C 8026375C A68301AE */ sh $v1, 0x1AE($s4) /* 192040 80263760 24420003 */ addiu $v0, $v0, 0x3 /* 192044 80263764 A28201DE */ sb $v0, 0x1DE($s4) /* 192048 80263768 0000902D */ daddu $s2, $zero, $zero /* 19204C 8026376C 3C098009 */ lui $t1, %hi(gMoveTable) /* 192050 80263770 2529F060 */ addiu $t1, $t1, %lo(gMoveTable) /* 192054 80263774 3C088008 */ lui $t0, %hi(gItemTable) /* 192058 80263778 250878E0 */ addiu $t0, $t0, %lo(gItemTable) /* 19205C 8026377C 00C0382D */ daddu $a3, $a2, $zero /* 192060 80263780 02E0202D */ daddu $a0, $s7, $zero /* 192064 80263784 26850002 */ addiu $a1, $s4, 0x2 .L80263788: /* 192068 80263788 84820208 */ lh $v0, 0x208($a0) /* 19206C 8026378C 10400011 */ beqz $v0, .L802637D4 /* 192070 80263790 26520001 */ addiu $s2, $s2, 0x1 /* 192074 80263794 00021140 */ sll $v0, $v0, 5 /* 192078 80263798 00481021 */ addu $v0, $v0, $t0 /* 19207C 8026379C 9043001A */ lbu $v1, 0x1A($v0) /* 192080 802637A0 00031080 */ sll $v0, $v1, 2 /* 192084 802637A4 00431021 */ addu $v0, $v0, $v1 /* 192088 802637A8 00021080 */ sll $v0, $v0, 2 /* 19208C 802637AC 00498821 */ addu $s1, $v0, $t1 /* 192090 802637B0 82220010 */ lb $v0, 0x10($s1) /* 192094 802637B4 14470007 */ bne $v0, $a3, .L802637D4 /* 192098 802637B8 00000000 */ nop /* 19209C 802637BC 02861021 */ addu $v0, $s4, $a2 /* 1920A0 802637C0 A04301DE */ sb $v1, 0x1DE($v0) /* 1920A4 802637C4 94820208 */ lhu $v0, 0x208($a0) /* 1920A8 802637C8 24C60001 */ addiu $a2, $a2, 0x1 /* 1920AC 802637CC A4A201AE */ sh $v0, 0x1AE($a1) /* 1920B0 802637D0 24A50002 */ addiu $a1, $a1, 0x2 .L802637D4: /* 1920B4 802637D4 2A420040 */ slti $v0, $s2, 0x40 /* 1920B8 802637D8 1440FFEB */ bnez $v0, .L80263788 /* 1920BC 802637DC 24840002 */ addiu $a0, $a0, 0x2 /* 1920C0 802637E0 A286020E */ sb $a2, 0x20E($s4) /* 1920C4 802637E4 0000902D */ daddu $s2, $zero, $zero /* 1920C8 802637E8 30C200FF */ andi $v0, $a2, 0xFF /* 1920CC 802637EC 10400039 */ beqz $v0, .L802638D4 /* 1920D0 802637F0 0240B02D */ daddu $s6, $s2, $zero /* 1920D4 802637F4 0286F021 */ addu $fp, $s4, $a2 /* 1920D8 802637F8 0280982D */ daddu $s3, $s4, $zero .L802637FC: /* 1920DC 802637FC 926301DE */ lbu $v1, 0x1DE($s3) /* 1920E0 80263800 3C0A8009 */ lui $t2, %hi(gMoveTable) /* 1920E4 80263804 254AF060 */ addiu $t2, $t2, %lo(gMoveTable) /* 1920E8 80263808 00031080 */ sll $v0, $v1, 2 /* 1920EC 8026380C 00431021 */ addu $v0, $v0, $v1 /* 1920F0 80263810 00021080 */ sll $v0, $v0, 2 /* 1920F4 80263814 004A8821 */ addu $s1, $v0, $t2 /* 1920F8 80263818 82300011 */ lb $s0, 0x11($s1) /* 1920FC 8026381C 1200000B */ beqz $s0, .L8026384C /* 192100 80263820 02A0202D */ daddu $a0, $s5, $zero /* 192104 80263824 0C099CAB */ jal player_team_is_ability_active /* 192108 80263828 24050018 */ addiu $a1, $zero, 0x18 /* 19210C 8026382C 02028023 */ subu $s0, $s0, $v0 /* 192110 80263830 02A0202D */ daddu $a0, $s5, $zero /* 192114 80263834 0C099CAB */ jal player_team_is_ability_active /* 192118 80263838 24050026 */ addiu $a1, $zero, 0x26 /* 19211C 8026383C 00021040 */ sll $v0, $v0, 1 /* 192120 80263840 02028023 */ subu $s0, $s0, $v0 /* 192124 80263844 5A000001 */ blezl $s0, .L8026384C /* 192128 80263848 24100001 */ addiu $s0, $zero, 0x1 .L8026384C: /* 19212C 8026384C 92E30001 */ lbu $v1, 0x1($s7) /* 192130 80263850 24020001 */ addiu $v0, $zero, 0x1 /* 192134 80263854 A2820178 */ sb $v0, 0x178($s4) /* 192138 80263858 00031E00 */ sll $v1, $v1, 24 /* 19213C 8026385C 00031E03 */ sra $v1, $v1, 24 /* 192140 80263860 A683017A */ sh $v1, 0x17A($s4) /* 192144 80263864 8E220004 */ lw $v0, 0x4($s1) /* 192148 80263868 02A0202D */ daddu $a0, $s5, $zero /* 19214C 8026386C 0C098C0B */ jal func_8026302C /* 192150 80263870 AE820184 */ sw $v0, 0x184($s4) /* 192154 80263874 82A2040C */ lb $v0, 0x40C($s5) /* 192158 80263878 10400003 */ beqz $v0, .L80263888 /* 19215C 8026387C 00000000 */ nop /* 192160 80263880 24160001 */ addiu $s6, $zero, 0x1 /* 192164 80263884 A27601F6 */ sb $s6, 0x1F6($s3) .L80263888: /* 192168 80263888 82E20005 */ lb $v0, 0x5($s7) /* 19216C 8026388C 0050102A */ slt $v0, $v0, $s0 /* 192170 80263890 54400001 */ bnel $v0, $zero, .L80263898 /* 192174 80263894 A26001F6 */ sb $zero, 0x1F6($s3) .L80263898: /* 192178 80263898 82A2040C */ lb $v0, 0x40C($s5) /* 19217C 8026389C 14400002 */ bnez $v0, .L802638A8 /* 192180 802638A0 2402FFFE */ addiu $v0, $zero, -0x2 /* 192184 802638A4 A26201F6 */ sb $v0, 0x1F6($s3) .L802638A8: /* 192188 802638A8 3C02800E */ lui $v0, %hi(gBattleStatus + 0x4) /* 19218C 802638AC 8C42C074 */ lw $v0, %lo(gBattleStatus + 0x4)($v0) /* 192190 802638B0 30421000 */ andi $v0, $v0, 0x1000 /* 192194 802638B4 10400002 */ beqz $v0, .L802638C0 /* 192198 802638B8 2402FFFF */ addiu $v0, $zero, -0x1 /* 19219C 802638BC A3C201F6 */ sb $v0, 0x1F6($fp) .L802638C0: /* 1921A0 802638C0 9282020E */ lbu $v0, 0x20E($s4) /* 1921A4 802638C4 26520001 */ addiu $s2, $s2, 0x1 /* 1921A8 802638C8 0242102A */ slt $v0, $s2, $v0 /* 1921AC 802638CC 1440FFCB */ bnez $v0, .L802637FC /* 1921B0 802638D0 26730001 */ addiu $s3, $s3, 0x1 .L802638D4: /* 1921B4 802638D4 16C00002 */ bnez $s6, .L802638E0 /* 1921B8 802638D8 24020001 */ addiu $v0, $zero, 0x1 /* 1921BC 802638DC 2402FFFF */ addiu $v0, $zero, -0x1 .L802638E0: /* 1921C0 802638E0 A282007F */ sb $v0, 0x7F($s4) .L802638E4: /* 1921C4 802638E4 8FBF0034 */ lw $ra, 0x34($sp) /* 1921C8 802638E8 8FBE0030 */ lw $fp, 0x30($sp) /* 1921CC 802638EC 8FB7002C */ lw $s7, 0x2C($sp) /* 1921D0 802638F0 8FB60028 */ lw $s6, 0x28($sp) /* 1921D4 802638F4 8FB50024 */ lw $s5, 0x24($sp) /* 1921D8 802638F8 8FB40020 */ lw $s4, 0x20($sp) /* 1921DC 802638FC 8FB3001C */ lw $s3, 0x1C($sp) /* 1921E0 80263900 8FB20018 */ lw $s2, 0x18($sp) /* 1921E4 80263904 8FB10014 */ lw $s1, 0x14($sp) /* 1921E8 80263908 8FB00010 */ lw $s0, 0x10($sp) /* 1921EC 8026390C 03E00008 */ jr $ra /* 1921F0 80263910 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void btl_init_menu_hammer(void) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; Actor* player = battleStatus->playerActor; MoveData* move; s32 i; s32 moveCount; s32 hasAnyBadgeMoves; s32 fpCost; // If you don't have a hammer, disable this menu if (playerData->hammerLevel == -1) { battleStatus->menuStatus[2] = 0; return; } for (i = 0; i < ARRAY_COUNT(battleStatus->submenuMoves); i++) { battleStatus->submenuMoves[i] = 0; } // Standard hammer move moveCount = 1; battleStatus->submenuMoves[0] = playerData->hammerLevel + MOVE_HAMMER1; battleStatus->submenuIcons[0] = ITEM_PARTNER_ATTACK; // Hammer badges do { for (i = 0; i < ARRAY_COUNT(playerData->equippedBadges); i++) { s16 badge = playerData->equippedBadges[i]; if (badge != MOVE_NONE) { MoveData* moveTable = gMoveTable; u8 moveID = gItemTable[badge].moveID; move = &moveTable[moveID]; if (move->category == MOVE_TYPE_HAMMER) { battleStatus->submenuMoves[moveCount] = moveID; battleStatus->submenuIcons[moveCount] = playerData->equippedBadges[i]; moveCount++; } } } } while (0); battleStatus->submenuMoveCount = moveCount; hasAnyBadgeMoves = FALSE; for (i = 0; i < battleStatus->submenuMoveCount; i++) { move = &gMoveTable[battleStatus->submenuMoves[i]]; // Calculate FP cost fpCost = move->costFP; if (fpCost != 0) { fpCost -= player_team_is_ability_active(player, ABILITY_FLOWER_SAVER); fpCost -= player_team_is_ability_active(player, ABILITY_FLOWER_FANATIC) * 2; if (fpCost < 1) { fpCost = 1; } } // See if there are any targets for this move battleStatus->moveCategory = BTL_MENU_TYPE_SMASH; battleStatus->moveArgument = playerData->hammerLevel; battleStatus->currentTargetListFlags = move->flags; player_create_target_list(player); // If there are targets, enable the move if (player->targetListLength != 0) { hasAnyBadgeMoves = TRUE; battleStatus->submenuStatus[i] = 1; } // If you don't have enough FP, disable the move if (playerData->curFP < fpCost) { battleStatus->submenuStatus[i] = 0; } // If there are no targets available, disable the move if (player->targetListLength == 0) { battleStatus->submenuStatus[i] = BATTLE_SUBMENU_STATUS_NO_TARGETS_2; } if (gBattleStatus.flags2 & BS_FLAGS2_NO_TARGET_AVAILABLE) { battleStatus->submenuStatus[moveCount] = BATTLE_SUBMENU_STATUS_NO_TARGETS; } } if (!hasAnyBadgeMoves) { // Only the standard hammer is available - no badge moves. // Selecting this submenu should immediately pick the standard hammer move battleStatus->menuStatus[2] = -1; } else { // Enable this submenu battleStatus->menuStatus[2] = 1; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_step_change_map /* 1157C 8003617C 3C03800A */ lui $v1, %hi(gMapTransitionState) /* 11580 80036180 84630944 */ lh $v1, %lo(gMapTransitionState)($v1) /* 11584 80036184 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 11588 80036188 AFBF0018 */ sw $ra, 0x18($sp) /* 1158C 8003618C AFB10014 */ sw $s1, 0x14($sp) /* 11590 80036190 2C620005 */ sltiu $v0, $v1, 0x5 /* 11594 80036194 10400094 */ beqz $v0, .L800363E8 /* 11598 80036198 AFB00010 */ sw $s0, 0x10($sp) /* 1159C 8003619C 00031080 */ sll $v0, $v1, 2 /* 115A0 800361A0 3C01800A */ lui $at, %hi(jtbl_80098320) /* 115A4 800361A4 00220821 */ addu $at, $at, $v0 /* 115A8 800361A8 8C228320 */ lw $v0, %lo(jtbl_80098320)($at) /* 115AC 800361AC 00400008 */ jr $v0 /* 115B0 800361B0 00000000 */ nop glabel .L800361B4 /* 115B4 800361B4 0C00E64C */ jal update_npcs /* 115B8 800361B8 00000000 */ nop /* 115BC 800361BC 0C037DD0 */ jal update_player /* 115C0 800361C0 00000000 */ nop /* 115C4 800361C4 0C016754 */ jal update_effects /* 115C8 800361C8 00000000 */ nop /* 115CC 800361CC 0C00B500 */ jal update_cameras /* 115D0 800361D0 00000000 */ nop /* 115D4 800361D4 3C04800A */ lui $a0, %hi(gMapTransitionAlpha) /* 115D8 800361D8 24840940 */ addiu $a0, $a0, %lo(gMapTransitionAlpha) /* 115DC 800361DC 0C04E0AB */ jal update_exit_map_screen_overlay /* 115E0 800361E0 00000000 */ nop /* 115E4 800361E4 00021400 */ sll $v0, $v0, 16 /* 115E8 800361E8 1040007F */ beqz $v0, .L800363E8 /* 115EC 800361EC 00000000 */ nop /* 115F0 800361F0 3C03800A */ lui $v1, %hi(gMapTransitionState) /* 115F4 800361F4 24630944 */ addiu $v1, $v1, %lo(gMapTransitionState) /* 115F8 800361F8 94620000 */ lhu $v0, 0x0($v1) /* 115FC 800361FC 24420001 */ addiu $v0, $v0, 0x1 /* 11600 80036200 0800D8FA */ j .L800363E8 /* 11604 80036204 A4620000 */ sh $v0, 0x0($v1) glabel .L80036208 /* 11608 80036208 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 1160C 8003620C 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 11610 80036210 8C620000 */ lw $v0, 0x0($v1) /* 11614 80036214 34420008 */ ori $v0, $v0, 0x8 /* 11618 80036218 0C018028 */ jal nuContRmbForceStop /* 1161C 8003621C AC620000 */ sw $v0, 0x0($v1) /* 11620 80036220 3C04800A */ lui $a0, %hi(gMapTransitionState) /* 11624 80036224 24840944 */ addiu $a0, $a0, %lo(gMapTransitionState) /* 11628 80036228 94820000 */ lhu $v0, 0x0($a0) /* 1162C 8003622C 24030004 */ addiu $v1, $zero, 0x4 /* 11630 80036230 3C01800A */ lui $at, %hi(gMapTransitionStateTime) /* 11634 80036234 A4230946 */ sh $v1, %lo(gMapTransitionStateTime)($at) /* 11638 80036238 24420001 */ addiu $v0, $v0, 0x1 /* 1163C 8003623C 0800D8FA */ j .L800363E8 /* 11640 80036240 A4820000 */ sh $v0, 0x0($a0) glabel .L80036244 /* 11644 80036244 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 11648 80036248 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 1164C 8003624C 8E020000 */ lw $v0, 0x0($s0) /* 11650 80036250 80420071 */ lb $v0, 0x71($v0) /* 11654 80036254 10400003 */ beqz $v0, .L80036264 /* 11658 80036258 00000000 */ nop /* 1165C 8003625C 0C00CD3C */ jal set_game_mode /* 11660 80036260 24040011 */ addiu $a0, $zero, 0x11 .L80036264: /* 11664 80036264 3C11800A */ lui $s1, %hi(gMapTransitionStateTime) /* 11668 80036268 26310946 */ addiu $s1, $s1, %lo(gMapTransitionStateTime) /* 1166C 8003626C 86220000 */ lh $v0, 0x0($s1) /* 11670 80036270 96230000 */ lhu $v1, 0x0($s1) /* 11674 80036274 10400003 */ beqz $v0, .L80036284 /* 11678 80036278 2462FFFF */ addiu $v0, $v1, -0x1 /* 1167C 8003627C 0800D8FA */ j .L800363E8 /* 11680 80036280 A6220000 */ sh $v0, 0x0($s1) .L80036284: /* 11684 80036284 8E020000 */ lw $v0, 0x0($s0) /* 11688 80036288 A0400070 */ sb $zero, 0x70($v0) /* 1168C 8003628C 8E020000 */ lw $v0, 0x0($s0) /* 11690 80036290 A0400078 */ sb $zero, 0x78($v0) /* 11694 80036294 8E020000 */ lw $v0, 0x0($s0) /* 11698 80036298 84440086 */ lh $a0, 0x86($v0) /* 1169C 8003629C 8445008C */ lh $a1, 0x8C($v0) /* 116A0 800362A0 0C0169BD */ jal load_map_by_IDs /* 116A4 800362A4 0000302D */ daddu $a2, $zero, $zero /* 116A8 800362A8 0C009C22 */ jal set_time_freeze_mode /* 116AC 800362AC 0000202D */ daddu $a0, $zero, $zero /* 116B0 800362B0 0C018030 */ jal nuContRmbForceStopEnd /* 116B4 800362B4 00000000 */ nop /* 116B8 800362B8 8E020000 */ lw $v0, 0x0($s0) /* 116BC 800362BC 80420071 */ lb $v0, 0x71($v0) /* 116C0 800362C0 14400003 */ bnez $v0, .L800362D0 /* 116C4 800362C4 00000000 */ nop /* 116C8 800362C8 0C03805E */ jal disable_player_input /* 116CC 800362CC 00000000 */ nop .L800362D0: /* 116D0 800362D0 0C00B500 */ jal update_cameras /* 116D4 800362D4 00000000 */ nop /* 116D8 800362D8 3C02800A */ lui $v0, %hi(gMapTransitionState) /* 116DC 800362DC 24420944 */ addiu $v0, $v0, %lo(gMapTransitionState) /* 116E0 800362E0 94430000 */ lhu $v1, 0x0($v0) /* 116E4 800362E4 24040002 */ addiu $a0, $zero, 0x2 /* 116E8 800362E8 A6240000 */ sh $a0, 0x0($s1) /* 116EC 800362EC 24630001 */ addiu $v1, $v1, 0x1 /* 116F0 800362F0 0800D8FA */ j .L800363E8 /* 116F4 800362F4 A4430000 */ sh $v1, 0x0($v0) glabel .L800362F8 /* 116F8 800362F8 0C00F949 */ jal update_encounters /* 116FC 800362FC 00000000 */ nop /* 11700 80036300 0C00E64C */ jal update_npcs /* 11704 80036304 00000000 */ nop /* 11708 80036308 0C037DD0 */ jal update_player /* 1170C 8003630C 00000000 */ nop /* 11710 80036310 0C00B500 */ jal update_cameras /* 11714 80036314 00000000 */ nop /* 11718 80036318 3C04800A */ lui $a0, %hi(gMapTransitionStateTime) /* 1171C 8003631C 24840946 */ addiu $a0, $a0, %lo(gMapTransitionStateTime) /* 11720 80036320 84820000 */ lh $v0, 0x0($a0) /* 11724 80036324 94830000 */ lhu $v1, 0x0($a0) /* 11728 80036328 10400003 */ beqz $v0, .L80036338 /* 1172C 8003632C 2462FFFF */ addiu $v0, $v1, -0x1 /* 11730 80036330 0800D8FA */ j .L800363E8 /* 11734 80036334 A4820000 */ sh $v0, 0x0($a0) .L80036338: /* 11738 80036338 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 1173C 8003633C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 11740 80036340 0C0B1059 */ jal does_script_exist /* 11744 80036344 8C44006C */ lw $a0, 0x6C($v0) /* 11748 80036348 14400027 */ bnez $v0, .L800363E8 /* 1174C 8003634C 2405FFF7 */ addiu $a1, $zero, -0x9 /* 11750 80036350 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 11754 80036354 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 11758 80036358 3C06800A */ lui $a2, %hi(gMapTransitionState) /* 1175C 8003635C 24C60944 */ addiu $a2, $a2, %lo(gMapTransitionState) /* 11760 80036360 8C820000 */ lw $v0, 0x0($a0) /* 11764 80036364 94C30000 */ lhu $v1, 0x0($a2) /* 11768 80036368 00451024 */ and $v0, $v0, $a1 /* 1176C 8003636C 24630001 */ addiu $v1, $v1, 0x1 /* 11770 80036370 AC820000 */ sw $v0, 0x0($a0) /* 11774 80036374 0800D8FA */ j .L800363E8 /* 11778 80036378 A4C30000 */ sh $v1, 0x0($a2) glabel .L8003637C /* 1177C 8003637C 0C00E64C */ jal update_npcs /* 11780 80036380 00000000 */ nop /* 11784 80036384 0C037DD0 */ jal update_player /* 11788 80036388 00000000 */ nop /* 1178C 8003638C 0C016754 */ jal update_effects /* 11790 80036390 00000000 */ nop /* 11794 80036394 0C00B500 */ jal update_cameras /* 11798 80036398 00000000 */ nop /* 1179C 8003639C 3C04800A */ lui $a0, %hi(gMapTransitionAlpha) /* 117A0 800363A0 24840940 */ addiu $a0, $a0, %lo(gMapTransitionAlpha) /* 117A4 800363A4 0C04E175 */ jal update_enter_map_screen_overlay /* 117A8 800363A8 00000000 */ nop /* 117AC 800363AC 00021400 */ sll $v0, $v0, 16 /* 117B0 800363B0 1040000D */ beqz $v0, .L800363E8 /* 117B4 800363B4 00000000 */ nop /* 117B8 800363B8 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 117BC 800363BC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 117C0 800363C0 80420071 */ lb $v0, 0x71($v0) /* 117C4 800363C4 14400003 */ bnez $v0, .L800363D4 /* 117C8 800363C8 00000000 */ nop /* 117CC 800363CC 0C038069 */ jal enable_player_input /* 117D0 800363D0 00000000 */ nop .L800363D4: /* 117D4 800363D4 3C05BF80 */ lui $a1, (0xBF800000 >> 16) /* 117D8 800363D8 0C04DF62 */ jal set_screen_overlay_params_front /* 117DC 800363DC 240400FF */ addiu $a0, $zero, 0xFF /* 117E0 800363E0 0C00CD3C */ jal set_game_mode /* 117E4 800363E4 24040004 */ addiu $a0, $zero, 0x4 .L800363E8: /* 117E8 800363E8 8FBF0018 */ lw $ra, 0x18($sp) /* 117EC 800363EC 8FB10014 */ lw $s1, 0x14($sp) /* 117F0 800363F0 8FB00010 */ lw $s0, 0x10($sp) /* 117F4 800363F4 03E00008 */ jr $ra /* 117F8 800363F8 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void state_step_change_map(void) { switch (gMapTransitionState) { case 0: update_npcs(); update_player(); update_effects(); update_cameras(); if (update_exit_map_screen_overlay(&gMapTransitionAlpha) != 0) { gMapTransitionState++; } break; case 1: gOverrideFlags |= GLOBAL_OVERRIDES_8; nuContRmbForceStop(); gMapTransitionStateTime = 4; gMapTransitionState++; break; case 2: if (gGameStatusPtr->demoState != DEMO_STATE_NONE) { set_game_mode(GAME_MODE_DEMO); } if (gMapTransitionStateTime != 0) { gMapTransitionStateTime--; } else { gGameStatusPtr->isBattle = FALSE; gGameStatusPtr->disableScripts = FALSE; load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, 0); set_time_freeze_mode(TIME_FREEZE_NORMAL); nuContRmbForceStopEnd(); if (gGameStatusPtr->demoState == DEMO_STATE_NONE) { disable_player_input(); } update_cameras(); gMapTransitionStateTime = 2; gMapTransitionState++; } break; case 3: update_encounters(); update_npcs(); update_player(); update_cameras(); if (gMapTransitionStateTime != 0) { gMapTransitionStateTime--; } else if (!does_script_exist(gGameStatusPtr->mainScriptID)) { gOverrideFlags &= ~GLOBAL_OVERRIDES_8; gMapTransitionState++; } break; case 4: update_npcs(); update_player(); update_effects(); update_cameras(); if (update_enter_map_screen_overlay(&gMapTransitionAlpha) != 0) { if (gGameStatusPtr->demoState == DEMO_STATE_NONE) { enable_player_input(); } set_screen_overlay_params_front(OVERLAY_NONE, -1.0f); set_game_mode(GAME_MODE_CHANGE_MAP); } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel music_note_appendGfx /* 35A2C8 E004C3A8 27BDFF40 */ addiu $sp, $sp, -0xC0 /* 35A2CC E004C3AC 0080182D */ daddu $v1, $a0, $zero /* 35A2D0 E004C3B0 3C0838E3 */ lui $t0, (0x38E38E39 >> 16) /* 35A2D4 E004C3B4 35088E39 */ ori $t0, $t0, (0x38E38E39 & 0xFFFF) /* 35A2D8 E004C3B8 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 35A2DC E004C3BC 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 35A2E0 E004C3C0 27A40018 */ addiu $a0, $sp, 0x18 /* 35A2E4 E004C3C4 AFB500AC */ sw $s5, 0xAC($sp) /* 35A2E8 E004C3C8 3C150001 */ lui $s5, (0x11630 >> 16) /* 35A2EC E004C3CC AFB200A0 */ sw $s2, 0xA0($sp) /* 35A2F0 E004C3D0 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 35A2F4 E004C3D4 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 35A2F8 E004C3D8 AFB600B0 */ sw $s6, 0xB0($sp) /* 35A2FC E004C3DC 3C16E700 */ lui $s6, (0xE7000000 >> 16) /* 35A300 E004C3E0 AFBF00B4 */ sw $ra, 0xB4($sp) /* 35A304 E004C3E4 AFB400A8 */ sw $s4, 0xA8($sp) /* 35A308 E004C3E8 AFB300A4 */ sw $s3, 0xA4($sp) /* 35A30C E004C3EC AFB1009C */ sw $s1, 0x9C($sp) /* 35A310 E004C3F0 AFB00098 */ sw $s0, 0x98($sp) /* 35A314 E004C3F4 F7B400B8 */ sdc1 $f20, 0xB8($sp) /* 35A318 E004C3F8 8E460000 */ lw $a2, 0x0($s2) /* 35A31C E004C3FC 8C71000C */ lw $s1, 0xC($v1) /* 35A320 E004C400 00C0102D */ daddu $v0, $a2, $zero /* 35A324 E004C404 24C60008 */ addiu $a2, $a2, 0x8 /* 35A328 E004C408 AE460000 */ sw $a2, 0x0($s2) /* 35A32C E004C40C 8E27001C */ lw $a3, 0x1C($s1) /* 35A330 E004C410 8E330020 */ lw $s3, 0x20($s1) /* 35A334 E004C414 3C14DE00 */ lui $s4, (0xDE000000 >> 16) /* 35A338 E004C418 AC560000 */ sw $s6, 0x0($v0) /* 35A33C E004C41C AC400004 */ sw $zero, 0x4($v0) /* 35A340 E004C420 24C20008 */ addiu $v0, $a2, 0x8 /* 35A344 E004C424 AE420000 */ sw $v0, 0x0($s2) /* 35A348 E004C428 24C20010 */ addiu $v0, $a2, 0x10 /* 35A34C E004C42C ACC50000 */ sw $a1, 0x0($a2) /* 35A350 E004C430 AE420000 */ sw $v0, 0x0($s2) /* 35A354 E004C434 8C630010 */ lw $v1, 0x10($v1) /* 35A358 E004C438 24C20018 */ addiu $v0, $a2, 0x18 /* 35A35C E004C43C AE420000 */ sw $v0, 0x0($s2) /* 35A360 E004C440 3C020900 */ lui $v0, %hi(D_09000FC0_40E250) /* 35A364 E004C444 24420FC0 */ addiu $v0, $v0, %lo(D_09000FC0_40E250) /* 35A368 E004C448 00072840 */ sll $a1, $a3, 1 /* 35A36C E004C44C 8C63001C */ lw $v1, 0x1C($v1) /* 35A370 E004C450 00A72821 */ addu $a1, $a1, $a3 /* 35A374 E004C454 ACC2000C */ sw $v0, 0xC($a2) /* 35A378 E004C458 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 35A37C E004C45C ACC20010 */ sw $v0, 0x10($a2) /* 35A380 E004C460 3C028000 */ lui $v0, (0x80000000 >> 16) /* 35A384 E004C464 00A80018 */ mult $a1, $t0 /* 35A388 E004C468 ACD40008 */ sw $s4, 0x8($a2) /* 35A38C E004C46C 00621821 */ addu $v1, $v1, $v0 /* 35A390 E004C470 000517C3 */ sra $v0, $a1, 31 /* 35A394 E004C474 ACC30004 */ sw $v1, 0x4($a2) /* 35A398 E004C478 00004810 */ mfhi $t1 /* 35A39C E004C47C 000918C3 */ sra $v1, $t1, 3 /* 35A3A0 E004C480 00621823 */ subu $v1, $v1, $v0 /* 35A3A4 E004C484 000310C0 */ sll $v0, $v1, 3 /* 35A3A8 E004C488 00431021 */ addu $v0, $v0, $v1 /* 35A3AC E004C48C 00021080 */ sll $v0, $v0, 2 /* 35A3B0 E004C490 00A22823 */ subu $a1, $a1, $v0 /* 35A3B4 E004C494 3C02E005 */ lui $v0, (0xE0050000 >> 16) /* 35A3B8 E004C498 00451021 */ addu $v0, $v0, $a1 /* 35A3BC E004C49C 9042C67C */ lbu $v0, -0x3984($v0) /* 35A3C0 E004C4A0 3C03E005 */ lui $v1, (0xE0050000 >> 16) /* 35A3C4 E004C4A4 00651821 */ addu $v1, $v1, $a1 /* 35A3C8 E004C4A8 9063C67D */ lbu $v1, -0x3983($v1) /* 35A3CC E004C4AC 3C01E005 */ lui $at, (0xE0050000 >> 16) /* 35A3D0 E004C4B0 00250821 */ addu $at, $at, $a1 /* 35A3D4 E004C4B4 9025C67E */ lbu $a1, -0x3982($at) /* 35A3D8 E004C4B8 00021600 */ sll $v0, $v0, 24 /* 35A3DC E004C4BC 00031C00 */ sll $v1, $v1, 16 /* 35A3E0 E004C4C0 00431025 */ or $v0, $v0, $v1 /* 35A3E4 E004C4C4 00052A00 */ sll $a1, $a1, 8 /* 35A3E8 E004C4C8 92230017 */ lbu $v1, 0x17($s1) /* 35A3EC E004C4CC 00451025 */ or $v0, $v0, $a1 /* 35A3F0 E004C4D0 00431025 */ or $v0, $v0, $v1 /* 35A3F4 E004C4D4 ACC20014 */ sw $v0, 0x14($a2) /* 35A3F8 E004C4D8 8E250004 */ lw $a1, 0x4($s1) /* 35A3FC E004C4DC 8E260008 */ lw $a2, 0x8($s1) /* 35A400 E004C4E0 8E27000C */ lw $a3, 0xC($s1) /* 35A404 E004C4E4 4480A000 */ mtc1 $zero, $f20 /* 35A408 E004C4E8 0C080108 */ jal shim_guTranslateF /* 35A40C E004C4EC 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 35A410 E004C4F0 27B00058 */ addiu $s0, $sp, 0x58 /* 35A414 E004C4F4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 35A418 E004C4F8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 35A41C E004C4FC 4406A000 */ mfc1 $a2, $f20 /* 35A420 E004C500 00031080 */ sll $v0, $v1, 2 /* 35A424 E004C504 00431021 */ addu $v0, $v0, $v1 /* 35A428 E004C508 00021080 */ sll $v0, $v0, 2 /* 35A42C E004C50C 00431023 */ subu $v0, $v0, $v1 /* 35A430 E004C510 000218C0 */ sll $v1, $v0, 3 /* 35A434 E004C514 00431021 */ addu $v0, $v0, $v1 /* 35A438 E004C518 000210C0 */ sll $v0, $v0, 3 /* 35A43C E004C51C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 35A440 E004C520 00220821 */ addu $at, $at, $v0 /* 35A444 E004C524 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 35A448 E004C528 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 35A44C E004C52C 46000007 */ neg.s $f0, $f0 /* 35A450 E004C530 44050000 */ mfc1 $a1, $f0 /* 35A454 E004C534 0200202D */ daddu $a0, $s0, $zero /* 35A458 E004C538 0C080104 */ jal shim_guRotateF /* 35A45C E004C53C E7B40010 */ swc1 $f20, 0x10($sp) /* 35A460 E004C540 0200202D */ daddu $a0, $s0, $zero /* 35A464 E004C544 27A50018 */ addiu $a1, $sp, 0x18 /* 35A468 E004C548 0C080114 */ jal shim_guMtxCatF /* 35A46C E004C54C 00A0302D */ daddu $a2, $a1, $zero /* 35A470 E004C550 0200202D */ daddu $a0, $s0, $zero /* 35A474 E004C554 8E250010 */ lw $a1, 0x10($s1) /* 35A478 E004C558 4407A000 */ mfc1 $a3, $f20 /* 35A47C E004C55C 0C080110 */ jal shim_guScaleF /* 35A480 E004C560 00A0302D */ daddu $a2, $a1, $zero /* 35A484 E004C564 0200202D */ daddu $a0, $s0, $zero /* 35A488 E004C568 27A50018 */ addiu $a1, $sp, 0x18 /* 35A48C E004C56C 0C080114 */ jal shim_guMtxCatF /* 35A490 E004C570 00A0302D */ daddu $a2, $a1, $zero /* 35A494 E004C574 27A40018 */ addiu $a0, $sp, 0x18 /* 35A498 E004C578 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 35A49C E004C57C 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 35A4A0 E004C580 3C11800A */ lui $s1, %hi(gDisplayContext) /* 35A4A4 E004C584 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 35A4A8 E004C588 96050000 */ lhu $a1, 0x0($s0) /* 35A4AC E004C58C 8E220000 */ lw $v0, 0x0($s1) /* 35A4B0 E004C590 00052980 */ sll $a1, $a1, 6 /* 35A4B4 E004C594 00B52821 */ addu $a1, $a1, $s5 /* 35A4B8 E004C598 0C080118 */ jal shim_guMtxF2L /* 35A4BC E004C59C 00452821 */ addu $a1, $v0, $a1 /* 35A4C0 E004C5A0 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 35A4C4 E004C5A4 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 35A4C8 E004C5A8 8E440000 */ lw $a0, 0x0($s2) /* 35A4CC E004C5AC 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 35A4D0 E004C5B0 0080282D */ daddu $a1, $a0, $zero /* 35A4D4 E004C5B4 24840008 */ addiu $a0, $a0, 0x8 /* 35A4D8 E004C5B8 AE440000 */ sw $a0, 0x0($s2) /* 35A4DC E004C5BC 96020000 */ lhu $v0, 0x0($s0) /* 35A4E0 E004C5C0 00139880 */ sll $s3, $s3, 2 /* 35A4E4 E004C5C4 ACA30000 */ sw $v1, 0x0($a1) /* 35A4E8 E004C5C8 24430001 */ addiu $v1, $v0, 0x1 /* 35A4EC E004C5CC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 35A4F0 E004C5D0 00021180 */ sll $v0, $v0, 6 /* 35A4F4 E004C5D4 A6030000 */ sh $v1, 0x0($s0) /* 35A4F8 E004C5D8 8E230000 */ lw $v1, 0x0($s1) /* 35A4FC E004C5DC 00551021 */ addu $v0, $v0, $s5 /* 35A500 E004C5E0 00621821 */ addu $v1, $v1, $v0 /* 35A504 E004C5E4 24820008 */ addiu $v0, $a0, 0x8 /* 35A508 E004C5E8 ACA30004 */ sw $v1, 0x4($a1) /* 35A50C E004C5EC AE420000 */ sw $v0, 0x0($s2) /* 35A510 E004C5F0 AC940000 */ sw $s4, 0x0($a0) /* 35A514 E004C5F4 3C03E005 */ lui $v1, (0xE0050000 >> 16) /* 35A518 E004C5F8 00731821 */ addu $v1, $v1, $s3 /* 35A51C E004C5FC 8C63C660 */ lw $v1, -0x39A0($v1) /* 35A520 E004C600 24820010 */ addiu $v0, $a0, 0x10 /* 35A524 E004C604 AE420000 */ sw $v0, 0x0($s2) /* 35A528 E004C608 24020040 */ addiu $v0, $zero, 0x40 /* 35A52C E004C60C AC82000C */ sw $v0, 0xC($a0) /* 35A530 E004C610 24820018 */ addiu $v0, $a0, 0x18 /* 35A534 E004C614 AC860008 */ sw $a2, 0x8($a0) /* 35A538 E004C618 AE420000 */ sw $v0, 0x0($s2) /* 35A53C E004C61C AC960010 */ sw $s6, 0x10($a0) /* 35A540 E004C620 AC800014 */ sw $zero, 0x14($a0) /* 35A544 E004C624 AC830004 */ sw $v1, 0x4($a0) /* 35A548 E004C628 8FBF00B4 */ lw $ra, 0xB4($sp) /* 35A54C E004C62C 8FB600B0 */ lw $s6, 0xB0($sp) /* 35A550 E004C630 8FB500AC */ lw $s5, 0xAC($sp) /* 35A554 E004C634 8FB400A8 */ lw $s4, 0xA8($sp) /* 35A558 E004C638 8FB300A4 */ lw $s3, 0xA4($sp) /* 35A55C E004C63C 8FB200A0 */ lw $s2, 0xA0($sp) /* 35A560 E004C640 8FB1009C */ lw $s1, 0x9C($sp) /* 35A564 E004C644 8FB00098 */ lw $s0, 0x98($sp) /* 35A568 E004C648 D7B400B8 */ ldc1 $f20, 0xB8($sp) /* 35A56C E004C64C 03E00008 */ jr $ra /* 35A570 E004C650 27BD00C0 */ addiu $sp, $sp, 0xC0 /* 35A574 E004C654 00000000 */ nop /* 35A578 E004C658 00000000 */ nop /* 35A57C E004C65C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void music_note_appendGfx(void* data) { EffectInstance* effect = data; MusicNoteFXData* fxData = effect->data.musicNote; Matrix4f sp18, sp58; s32 colorIdx = fxData->unk_1C; s32 dlistIdx = fxData->unk_20; s32 rgbOffset; // TODO required to match - need to initialize define twice for some reason rgbOffset = (colorIdx * 3) % ARRAY_COUNT(D_E004C67C); rgbOffset = (colorIdx * 3) % ARRAY_COUNT(D_E004C67C); gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09000FC0_35B5A0); gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E004C67C[rgbOffset], D_E004C67C[rgbOffset + 1], D_E004C67C[rgbOffset + 2], fxData->unk_14 ); shim_guTranslateF(sp18, fxData->pos.x, fxData->pos.y, fxData->pos.z); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guScaleF(sp58, fxData->unk_10, fxData->unk_10, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E004C660[dlistIdx]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_step_pause /* FD7C 8003497C 27BDFFE0 */ addiu $sp, $sp, -0x20 /* FD80 80034980 AFB00010 */ sw $s0, 0x10($sp) /* FD84 80034984 3C10800A */ lui $s0, %hi(D_800A0921) /* FD88 80034988 26100921 */ addiu $s0, $s0, %lo(D_800A0921) /* FD8C 8003498C AFBF0018 */ sw $ra, 0x18($sp) /* FD90 80034990 AFB10014 */ sw $s1, 0x14($sp) /* FD94 80034994 82110000 */ lb $s1, 0x0($s0) /* FD98 80034998 12200005 */ beqz $s1, .L800349B0 /* FD9C 8003499C 24020002 */ addiu $v0, $zero, 0x2 /* FDA0 800349A0 12220022 */ beq $s1, $v0, .L80034A2C /* FDA4 800349A4 00000000 */ nop /* FDA8 800349A8 0800D2F8 */ j .L80034BE0 /* FDAC 800349AC 00000000 */ nop .L800349B0: /* FDB0 800349B0 0C00F949 */ jal update_encounters /* FDB4 800349B4 00000000 */ nop /* FDB8 800349B8 0C00E64C */ jal update_npcs /* FDBC 800349BC 00000000 */ nop /* FDC0 800349C0 0C037DD0 */ jal update_player /* FDC4 800349C4 00000000 */ nop /* FDC8 800349C8 0C016754 */ jal update_effects /* FDCC 800349CC 00000000 */ nop /* FDD0 800349D0 3C02800A */ lui $v0, %hi(nuGfxCfb) /* FDD4 800349D4 8C42A658 */ lw $v0, %lo(nuGfxCfb)($v0) /* FDD8 800349D8 8C430004 */ lw $v1, 0x4($v0) /* FDDC 800349DC 3C02800A */ lui $v0, %hi(nuGfxCfb_ptr) /* FDE0 800349E0 8C42A64C */ lw $v0, %lo(nuGfxCfb_ptr)($v0) /* FDE4 800349E4 1462007E */ bne $v1, $v0, .L80034BE0 /* FDE8 800349E8 24020004 */ addiu $v0, $zero, 0x4 /* FDEC 800349EC 3C01800A */ lui $at, %hi(D_800A0920) /* FDF0 800349F0 A0220920 */ sb $v0, %lo(D_800A0920)($at) /* FDF4 800349F4 24020002 */ addiu $v0, $zero, 0x2 /* FDF8 800349F8 3C04800A */ lui $a0, %hi(gOverrideFlags) /* FDFC 800349FC 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* FE00 80034A00 A2020000 */ sb $v0, 0x0($s0) /* FE04 80034A04 3C058007 */ lui $a1, %hi(gGameStatusPtr) /* FE08 80034A08 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1) /* FE0C 80034A0C 8C820000 */ lw $v0, 0x0($a0) /* FE10 80034A10 94A30148 */ lhu $v1, 0x148($a1) /* FE14 80034A14 34420008 */ ori $v0, $v0, 0x8 /* FE18 80034A18 AC820000 */ sw $v0, 0x0($a0) /* FE1C 80034A1C 3063FF0F */ andi $v1, $v1, 0xFF0F /* FE20 80034A20 34630010 */ ori $v1, $v1, 0x10 /* FE24 80034A24 0800D2F8 */ j .L80034BE0 /* FE28 80034A28 A4A30148 */ sh $v1, 0x148($a1) .L80034A2C: /* FE2C 80034A2C 3C06800A */ lui $a2, %hi(D_800A0920) /* FE30 80034A30 24C60920 */ addiu $a2, $a2, %lo(D_800A0920) /* FE34 80034A34 80C30000 */ lb $v1, 0x0($a2) /* FE38 80034A38 04600056 */ bltz $v1, .L80034B94 /* FE3C 80034A3C 90C20000 */ lbu $v0, 0x0($a2) /* FE40 80034A40 10600005 */ beqz $v1, .L80034A58 /* FE44 80034A44 2442FFFF */ addiu $v0, $v0, -0x1 /* FE48 80034A48 A0C20000 */ sb $v0, 0x0($a2) /* FE4C 80034A4C 00021600 */ sll $v0, $v0, 24 /* FE50 80034A50 1440004C */ bnez $v0, .L80034B84 /* FE54 80034A54 00000000 */ nop .L80034A58: /* FE58 80034A58 3C048007 */ lui $a0, %hi(pause_frameBuffers) /* FE5C 80034A5C 24847950 */ addiu $a0, $a0, %lo(pause_frameBuffers) /* FE60 80034A60 24050002 */ addiu $a1, $zero, 0x2 /* FE64 80034A64 2402FFFF */ addiu $v0, $zero, -0x1 /* FE68 80034A68 0C017CBC */ jal nuGfxSetCfb /* FE6C 80034A6C A0C20000 */ sb $v0, 0x0($a2) /* FE70 80034A70 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* FE74 80034A74 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* FE78 80034A78 8E030000 */ lw $v1, 0x0($s0) /* FE7C 80034A7C 9462015C */ lhu $v0, 0x15C($v1) /* FE80 80034A80 0C05260E */ jal sfx_stop_env_sounds /* FE84 80034A84 A462015E */ sh $v0, 0x15E($v1) /* FE88 80034A88 0C00EC6A */ jal func_8003B1A8 /* FE8C 80034A8C 00000000 */ nop /* FE90 80034A90 8E020000 */ lw $v0, 0x0($s0) /* FE94 80034A94 0C016BA8 */ jal backup_map_collision_data /* FE98 80034A98 A0510070 */ sb $s1, 0x70($v0) /* FE9C 80034A9C 0C00AB28 */ jal battle_heap_create /* FEA0 80034AA0 00000000 */ nop /* FEA4 80034AA4 0C018028 */ jal nuContRmbForceStop /* FEA8 80034AA8 00000000 */ nop /* FEAC 80034AAC 0C05259C */ jal sfx_clear_env_sounds /* FEB0 80034AB0 0000202D */ daddu $a0, $zero, $zero /* FEB4 80034AB4 0C0B763E */ jal spr_init_sprites /* FEB8 80034AB8 0000202D */ daddu $a0, $zero, $zero /* FEBC 80034ABC 0C045751 */ jal clear_model_data /* FEC0 80034AC0 00000000 */ nop /* FEC4 80034AC4 0C052010 */ jal clear_sprite_shading_data /* FEC8 80034AC8 00000000 */ nop /* FECC 80034ACC 0C05177E */ jal reset_background_settings /* FED0 80034AD0 00000000 */ nop /* FED4 80034AD4 0C0482EC */ jal clear_entity_models /* FED8 80034AD8 00000000 */ nop /* FEDC 80034ADC 0C047889 */ jal clear_animator_list /* FEE0 80034AE0 00000000 */ nop /* FEE4 80034AE4 0C048C2E */ jal clear_worker_list /* FEE8 80034AE8 00000000 */ nop /* FEEC 80034AEC 3C048020 */ lui $a0, %hi(vtx_C20F40) /* FEF0 80034AF0 24840000 */ addiu $a0, $a0, %lo(vtx_C20F40) /* FEF4 80034AF4 3C050003 */ lui $a1, (0x38000 >> 16) /* FEF8 80034AF8 0C0514BA */ jal hud_element_set_aux_cache /* FEFC 80034AFC 34A58000 */ ori $a1, $a1, (0x38000 & 0xFFFF) /* FF00 80034B00 0C050440 */ jal hud_element_clear_cache /* FF04 80034B04 00000000 */ nop /* FF08 80034B08 0C03A6EC */ jal reset_status_bar /* FF0C 80034B0C 00000000 */ nop /* FF10 80034B10 0C04C3FC */ jal clear_item_entity_data /* FF14 80034B14 00000000 */ nop /* FF18 80034B18 0C0B0C77 */ jal clear_script_list /* FF1C 80034B1C 00000000 */ nop /* FF20 80034B20 0C00E12F */ jal clear_npcs /* FF24 80034B24 00000000 */ nop /* FF28 80034B28 0C04432E */ jal clear_entity_data /* FF2C 80034B2C 0000202D */ daddu $a0, $zero, $zero /* FF30 80034B30 0C0515A0 */ jal clear_trigger_data /* FF34 80034B34 00000000 */ nop /* FF38 80034B38 0C05260A */ jal sfx_get_reverb_mode /* FF3C 80034B3C 00000000 */ nop /* FF40 80034B40 3C01800A */ lui $at, %hi(SavedReverbMode) /* FF44 80034B44 AC220924 */ sw $v0, %lo(SavedReverbMode)($at) /* FF48 80034B48 0C0525FF */ jal sfx_set_reverb_mode /* FF4C 80034B4C 0000202D */ daddu $a0, $zero, $zero /* FF50 80034B50 0C052B17 */ jal bgm_quiet_max_volume /* FF54 80034B54 00000000 */ nop /* FF58 80034B58 3C048007 */ lui $a0, %hi(D_8007795C) /* FF5C 80034B5C 0C018038 */ jal nuPiReadRomOverlay /* FF60 80034B60 2484795C */ addiu $a0, $a0, %lo(D_8007795C) /* FF64 80034B64 0C091018 */ jal func_80244060 /* FF68 80034B68 00000000 */ nop /* FF6C 80034B6C 3C04800A */ lui $a0, %hi(gOverrideFlags) /* FF70 80034B70 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* FF74 80034B74 8C820000 */ lw $v0, 0x0($a0) /* FF78 80034B78 2403FFF7 */ addiu $v1, $zero, -0x9 /* FF7C 80034B7C 00431024 */ and $v0, $v0, $v1 /* FF80 80034B80 AC820000 */ sw $v0, 0x0($a0) .L80034B84: /* FF84 80034B84 3C02800A */ lui $v0, %hi(D_800A0920) /* FF88 80034B88 80420920 */ lb $v0, %lo(D_800A0920)($v0) /* FF8C 80034B8C 04410014 */ bgez $v0, .L80034BE0 /* FF90 80034B90 00000000 */ nop .L80034B94: /* FF94 80034B94 3C10800A */ lui $s0, %hi(D_800A0920) /* FF98 80034B98 26100920 */ addiu $s0, $s0, %lo(D_800A0920) /* FF9C 80034B9C 82020000 */ lb $v0, 0x0($s0) /* FFA0 80034BA0 2842FFF6 */ slti $v0, $v0, -0xA /* FFA4 80034BA4 14400007 */ bnez $v0, .L80034BC4 /* FFA8 80034BA8 0000202D */ daddu $a0, $zero, $zero /* FFAC 80034BAC 0C091109 */ jal D_80244424 /* FFB0 80034BB0 0080282D */ daddu $a1, $a0, $zero /* FFB4 80034BB4 92020000 */ lbu $v0, 0x0($s0) /* FFB8 80034BB8 2442FFFF */ addiu $v0, $v0, -0x1 /* FFBC 80034BBC 0800D2F6 */ j .L80034BD8 /* FFC0 80034BC0 A2020000 */ sb $v0, 0x0($s0) .L80034BC4: /* FFC4 80034BC4 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* FFC8 80034BC8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* FFCC 80034BCC 8C440010 */ lw $a0, 0x10($v0) /* FFD0 80034BD0 0C091109 */ jal D_80244424 /* FFD4 80034BD4 8C450020 */ lw $a1, 0x20($v0) .L80034BD8: /* FFD8 80034BD8 3C01800A */ lui $at, %hi(D_800A0922) /* FFDC 80034BDC A4200922 */ sh $zero, %lo(D_800A0922)($at) .L80034BE0: /* FFE0 80034BE0 8FBF0018 */ lw $ra, 0x18($sp) /* FFE4 80034BE4 8FB10014 */ lw $s1, 0x14($sp) /* FFE8 80034BE8 8FB00010 */ lw $s0, 0x10($sp) /* FFEC 80034BEC 03E00008 */ jr $ra /* FFF0 80034BF0 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void state_step_pause(void) { s32 oldIsBattle = D_800A0921; switch (D_800A0921) { case 0: update_encounters(); update_npcs(); update_player(); update_effects(); if (nuGfxCfb[1] == nuGfxCfb_ptr) { D_800A0920 = 4; D_800A0921 = 2; gOverrideFlags |= GLOBAL_OVERRIDES_8; gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK; gGameStatusPtr->backgroundFlags |= BACKGROUND_RENDER_STATE_1; } break; case 2: if (D_800A0920 >= 0) { if (D_800A0920 != 0) { (D_800A0920)--; } if (D_800A0920 == 0) { D_800A0920 = -1; nuGfxSetCfb(pause_frameBuffers, 2); gGameStatusPtr->savedBackgroundDarkness = gGameStatusPtr->backgroundDarkness; sfx_stop_env_sounds(); func_8003B1A8(); gGameStatusPtr->isBattle = oldIsBattle; backup_map_collision_data(); battle_heap_create(); nuContRmbForceStop(); sfx_clear_env_sounds(0); spr_init_sprites(PLAYER_SPRITES_MARIO_WORLD); clear_model_data(); clear_sprite_shading_data(); reset_background_settings(); clear_entity_models(); clear_animator_list(); clear_worker_list(); hud_element_set_aux_cache(D_80200000, 0x38000); // TODO shiftability (what should this symbol be?) hud_element_clear_cache(); reset_status_bar(); clear_item_entity_data(); clear_script_list(); clear_npcs(); clear_entity_data(0); clear_trigger_data(); SavedReverbMode = sfx_get_reverb_mode(); sfx_set_reverb_mode(0); bgm_quiet_max_volume(); nuPiReadRomOverlay(&D_8007795C); pause_init(); gOverrideFlags &= ~GLOBAL_OVERRIDES_8; } if (D_800A0920 >= 0) { break; } } if (D_800A0920 >= -10) { pause_handle_input(0, 0); D_800A0920--; } else { pause_handle_input(gGameStatusPtr->pressedButtons[0], gGameStatusPtr->heldButtons[0]); } D_800A0922 = 0; break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel calc_enemy_test_target /* 1A5AD8 802771F8 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 1A5ADC 802771FC AFB20018 */ sw $s2, 0x18($sp) /* 1A5AE0 80277200 3C12800E */ lui $s2, %hi(gBattleStatus) /* 1A5AE4 80277204 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus) /* 1A5AE8 80277208 AFBF0020 */ sw $ra, 0x20($sp) /* 1A5AEC 8027720C AFB3001C */ sw $s3, 0x1C($sp) /* 1A5AF0 80277210 AFB10014 */ sw $s1, 0x14($sp) /* 1A5AF4 80277214 AFB00010 */ sw $s0, 0x10($sp) /* 1A5AF8 80277218 964301A0 */ lhu $v1, 0x1A0($s2) /* 1A5AFC 8027721C 865301A0 */ lh $s3, 0x1A0($s2) /* 1A5B00 80277220 924201A2 */ lbu $v0, 0x1A2($s2) /* 1A5B04 80277224 825101A2 */ lb $s1, 0x1A2($s2) /* 1A5B08 80277228 0260202D */ daddu $a0, $s3, $zero /* 1A5B0C 8027722C A64301A4 */ sh $v1, 0x1A4($s2) /* 1A5B10 80277230 0C09A75B */ jal get_actor /* 1A5B14 80277234 A24201A6 */ sb $v0, 0x1A6($s2) /* 1A5B18 80277238 0040802D */ daddu $s0, $v0, $zero /* 1A5B1C 8027723C 1200001C */ beqz $s0, .L802772B0 /* 1A5B20 80277240 0200202D */ daddu $a0, $s0, $zero /* 1A5B24 80277244 0C099117 */ jal get_actor_part /* 1A5B28 80277248 0220282D */ daddu $a1, $s1, $zero /* 1A5B2C 8027724C 0040182D */ daddu $v1, $v0, $zero /* 1A5B30 80277250 14600003 */ bnez $v1, .L80277260 /* 1A5B34 80277254 32640700 */ andi $a0, $s3, 0x700 .L80277258: /* 1A5B38 80277258 0809DC96 */ j .L80277258 /* 1A5B3C 8027725C 00000000 */ nop .L80277260: /* 1A5B40 80277260 24020100 */ addiu $v0, $zero, 0x100 /* 1A5B44 80277264 1082000A */ beq $a0, $v0, .L80277290 /* 1A5B48 80277268 28820101 */ slti $v0, $a0, 0x101 /* 1A5B4C 8027726C 1040000A */ beqz $v0, .L80277298 /* 1A5B50 80277270 00000000 */ nop /* 1A5B54 80277274 14800008 */ bnez $a0, .L80277298 /* 1A5B58 80277278 00000000 */ nop /* 1A5B5C 8027727C 3C028011 */ lui $v0, %hi(gPlayerData) /* 1A5B60 80277280 2442F290 */ addiu $v0, $v0, %lo(gPlayerData) /* 1A5B64 80277284 90420002 */ lbu $v0, 0x2($v0) /* 1A5B68 80277288 0809DCA6 */ j .L80277298 /* 1A5B6C 8027728C A20201B8 */ sb $v0, 0x1B8($s0) .L80277290: /* 1A5B70 80277290 2402007F */ addiu $v0, $zero, 0x7F /* 1A5B74 80277294 A20201B8 */ sb $v0, 0x1B8($s0) .L80277298: /* 1A5B78 80277298 8E420188 */ lw $v0, 0x188($s2) /* 1A5B7C 8027729C 04410006 */ bgez $v0, .L802772B8 /* 1A5B80 802772A0 00000000 */ nop /* 1A5B84 802772A4 0200202D */ daddu $a0, $s0, $zero /* 1A5B88 802772A8 0C09DBE3 */ jal dispatch_event_general /* 1A5B8C 802772AC 24050037 */ addiu $a1, $zero, 0x37 .L802772B0: /* 1A5B90 802772B0 0809DD04 */ j .L80277410 /* 1A5B94 802772B4 0000102D */ daddu $v0, $zero, $zero .L802772B8: /* 1A5B98 802772B8 8C62007C */ lw $v0, 0x7C($v1) /* 1A5B9C 802772BC 30420020 */ andi $v0, $v0, 0x20 /* 1A5BA0 802772C0 14400007 */ bnez $v0, .L802772E0 /* 1A5BA4 802772C4 0000882D */ daddu $s1, $zero, $zero /* 1A5BA8 802772C8 8242009A */ lb $v0, 0x9A($s2) /* 1A5BAC 802772CC 14400004 */ bnez $v0, .L802772E0 /* 1A5BB0 802772D0 2402000E */ addiu $v0, $zero, 0xE /* 1A5BB4 802772D4 82030218 */ lb $v1, 0x218($s0) /* 1A5BB8 802772D8 14620006 */ bne $v1, $v0, .L802772F4 /* 1A5BBC 802772DC 24020006 */ addiu $v0, $zero, 0x6 .L802772E0: /* 1A5BC0 802772E0 8E420188 */ lw $v0, 0x188($s2) /* 1A5BC4 802772E4 30420010 */ andi $v0, $v0, 0x10 /* 1A5BC8 802772E8 50400001 */ beql $v0, $zero, .L802772F0 /* 1A5BCC 802772EC 24110006 */ addiu $s1, $zero, 0x6 .L802772F0: /* 1A5BD0 802772F0 24020006 */ addiu $v0, $zero, 0x6 .L802772F4: /* 1A5BD4 802772F4 12220046 */ beq $s1, $v0, .L80277410 /* 1A5BD8 802772F8 00000000 */ nop /* 1A5BDC 802772FC 24020100 */ addiu $v0, $zero, 0x100 /* 1A5BE0 80277300 10820033 */ beq $a0, $v0, .L802773D0 /* 1A5BE4 80277304 0000882D */ daddu $s1, $zero, $zero /* 1A5BE8 80277308 28820101 */ slti $v0, $a0, 0x101 /* 1A5BEC 8027730C 10400031 */ beqz $v0, .L802773D4 /* 1A5BF0 80277310 24020006 */ addiu $v0, $zero, 0x6 /* 1A5BF4 80277314 1480002F */ bnez $a0, .L802773D4 /* 1A5BF8 80277318 00000000 */ nop /* 1A5BFC 8027731C 824200A4 */ lb $v0, 0xA4($s2) /* 1A5C00 80277320 10400009 */ beqz $v0, .L80277348 /* 1A5C04 80277324 0200202D */ daddu $a0, $s0, $zero /* 1A5C08 80277328 0C00A67F */ jal rand_int /* 1A5C0C 8027732C 24040064 */ addiu $a0, $zero, 0x64 /* 1A5C10 80277330 824300A5 */ lb $v1, 0xA5($s2) /* 1A5C14 80277334 0043102A */ slt $v0, $v0, $v1 /* 1A5C18 80277338 54400025 */ bnel $v0, $zero, .L802773D0 /* 1A5C1C 8027733C 24110006 */ addiu $s1, $zero, 0x6 /* 1A5C20 80277340 0809DCF5 */ j .L802773D4 /* 1A5C24 80277344 24020006 */ addiu $v0, $zero, 0x6 .L80277348: /* 1A5C28 80277348 0C099CAB */ jal player_team_is_ability_active /* 1A5C2C 8027734C 24050008 */ addiu $a1, $zero, 0x8 /* 1A5C30 80277350 10400007 */ beqz $v0, .L80277370 /* 1A5C34 80277354 0200202D */ daddu $a0, $s0, $zero /* 1A5C38 80277358 0C00A67F */ jal rand_int /* 1A5C3C 8027735C 24040064 */ addiu $a0, $zero, 0x64 /* 1A5C40 80277360 2842000A */ slti $v0, $v0, 0xA /* 1A5C44 80277364 5440001A */ bnel $v0, $zero, .L802773D0 /* 1A5C48 80277368 24110005 */ addiu $s1, $zero, 0x5 /* 1A5C4C 8027736C 0200202D */ daddu $a0, $s0, $zero .L80277370: /* 1A5C50 80277370 0C099CAB */ jal player_team_is_ability_active /* 1A5C54 80277374 24050021 */ addiu $a1, $zero, 0x21 /* 1A5C58 80277378 1040000B */ beqz $v0, .L802773A8 /* 1A5C5C 8027737C 0200202D */ daddu $a0, $s0, $zero /* 1A5C60 80277380 820201B8 */ lb $v0, 0x1B8($s0) /* 1A5C64 80277384 28420006 */ slti $v0, $v0, 0x6 /* 1A5C68 80277388 10400007 */ beqz $v0, .L802773A8 /* 1A5C6C 8027738C 00000000 */ nop /* 1A5C70 80277390 0C00A67F */ jal rand_int /* 1A5C74 80277394 24040064 */ addiu $a0, $zero, 0x64 /* 1A5C78 80277398 2842001E */ slti $v0, $v0, 0x1E /* 1A5C7C 8027739C 5440000C */ bnel $v0, $zero, .L802773D0 /* 1A5C80 802773A0 24110005 */ addiu $s1, $zero, 0x5 /* 1A5C84 802773A4 0200202D */ daddu $a0, $s0, $zero .L802773A8: /* 1A5C88 802773A8 0C099CAB */ jal player_team_is_ability_active /* 1A5C8C 802773AC 24050023 */ addiu $a1, $zero, 0x23 /* 1A5C90 802773B0 10400008 */ beqz $v0, .L802773D4 /* 1A5C94 802773B4 24020006 */ addiu $v0, $zero, 0x6 /* 1A5C98 802773B8 0C00A67F */ jal rand_int /* 1A5C9C 802773BC 24040064 */ addiu $a0, $zero, 0x64 /* 1A5CA0 802773C0 28420014 */ slti $v0, $v0, 0x14 /* 1A5CA4 802773C4 10400003 */ beqz $v0, .L802773D4 /* 1A5CA8 802773C8 24020006 */ addiu $v0, $zero, 0x6 /* 1A5CAC 802773CC 24110005 */ addiu $s1, $zero, 0x5 .L802773D0: /* 1A5CB0 802773D0 24020006 */ addiu $v0, $zero, 0x6 .L802773D4: /* 1A5CB4 802773D4 1222000E */ beq $s1, $v0, .L80277410 /* 1A5CB8 802773D8 00000000 */ nop /* 1A5CBC 802773DC 24020005 */ addiu $v0, $zero, 0x5 /* 1A5CC0 802773E0 1222000B */ beq $s1, $v0, .L80277410 /* 1A5CC4 802773E4 00000000 */ nop /* 1A5CC8 802773E8 82030214 */ lb $v1, 0x214($s0) /* 1A5CCC 802773EC 2402000C */ addiu $v0, $zero, 0xC /* 1A5CD0 802773F0 10620006 */ beq $v1, $v0, .L8027740C /* 1A5CD4 802773F4 2403000B */ addiu $v1, $zero, 0xB /* 1A5CD8 802773F8 82040212 */ lb $a0, 0x212($s0) /* 1A5CDC 802773FC 10830004 */ beq $a0, $v1, .L80277410 /* 1A5CE0 80277400 24020007 */ addiu $v0, $zero, 0x7 /* 1A5CE4 80277404 0809DD04 */ j .L80277410 /* 1A5CE8 80277408 0000102D */ daddu $v0, $zero, $zero .L8027740C: /* 1A5CEC 8027740C 24020008 */ addiu $v0, $zero, 0x8 .L80277410: /* 1A5CF0 80277410 8FBF0020 */ lw $ra, 0x20($sp) /* 1A5CF4 80277414 8FB3001C */ lw $s3, 0x1C($sp) /* 1A5CF8 80277418 8FB20018 */ lw $s2, 0x18($sp) /* 1A5CFC 8027741C 8FB10014 */ lw $s1, 0x14($sp) /* 1A5D00 80277420 8FB00010 */ lw $s0, 0x10($sp) /* 1A5D04 80277424 03E00008 */ jr $ra /* 1A5D08 80277428 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: HitResult calc_enemy_test_target(Actor* actor) { PlayerData* playerData = &gPlayerData; BattleStatus* battleStatus = &gBattleStatus; s32 targetID = battleStatus->currentTargetID; s32 targetPartIdx = battleStatus->currentTargetPart; Actor* target; Actor* target2; ActorPart* targetPart; s32 actorClass; s32 hitResult; battleStatus->currentTargetID2 = battleStatus->currentTargetID; battleStatus->currentTargetPart2 = battleStatus->currentTargetPart; target = get_actor(targetID); if (target == NULL) { return HIT_RESULT_HIT; } targetPart = get_actor_part(target, targetPartIdx); ASSERT(targetPart != NULL); actorClass = targetID & ACTOR_CLASS_MASK; switch (actorClass) { case ACTOR_CLASS_PLAYER: target->currentHP = playerData->curHP; break; case ACTOR_CLASS_PARTNER: target->currentHP = 127; break; case ACTOR_CLASS_ENEMY: break; } if (battleStatus->currentAttackElement & DAMAGE_TYPE_TRIGGER_LUCKY) { dispatch_event_general(target, EVENT_LUCKY); return HIT_RESULT_HIT; } hitResult = HIT_RESULT_HIT; target2 = target; if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY || battleStatus->outtaSightActive || target2->transparentStatus == STATUS_KEY_TRANSPARENT) { if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_MAGIC)) { hitResult = HIT_RESULT_MISS; } } if (hitResult == HIT_RESULT_MISS) { return HIT_RESULT_MISS; } hitResult = HIT_RESULT_HIT; switch (actorClass) { case ACTOR_CLASS_PLAYER: if (battleStatus->cloudNineTurnsLeft) { if (rand_int(100) < battleStatus->cloudNineDodgeChance) { hitResult = HIT_RESULT_MISS; break; } } else { if (player_team_is_ability_active(target2, ABILITY_PRETTY_LUCKY)) { if (rand_int(100) < 10) { hitResult = HIT_RESULT_LUCKY; break; } } if (player_team_is_ability_active(target2, ABILITY_CLOSE_CALL) && (target2->currentHP < 6)) { if (rand_int(100) < 30) { hitResult = HIT_RESULT_LUCKY; break; } } if (player_team_is_ability_active(target2, ABILITY_LUCKY_DAY)) { if (rand_int(100) < 20) { hitResult = HIT_RESULT_LUCKY; break; } } } break; case ACTOR_CLASS_PARTNER: break; case ACTOR_CLASS_ENEMY: break; } if (hitResult == HIT_RESULT_MISS) { return HIT_RESULT_MISS; } if (hitResult == HIT_RESULT_LUCKY) { return HIT_RESULT_LUCKY; } if (target2->stoneStatus == STATUS_KEY_STONE) { return HIT_RESULT_IMMUNE; } if (target2->staticStatus == STATUS_KEY_STATIC) { return HIT_RESULT_HIT_STATIC; } return HIT_RESULT_HIT; }
### RAW ASSEMBLY INSTRUCTIONS: glabel snowman_doll_appendGfx /* 3BD4C0 E00C0760 27BDFF48 */ addiu $sp, $sp, -0xB8 /* 3BD4C4 E00C0764 0080282D */ daddu $a1, $a0, $zero /* 3BD4C8 E00C0768 3C06DB06 */ lui $a2, (0xDB060024 >> 16) /* 3BD4CC E00C076C 34C60024 */ ori $a2, $a2, (0xDB060024 & 0xFFFF) /* 3BD4D0 E00C0770 27A40018 */ addiu $a0, $sp, 0x18 /* 3BD4D4 E00C0774 AFB1009C */ sw $s1, 0x9C($sp) /* 3BD4D8 E00C0778 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 3BD4DC E00C077C 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 3BD4E0 E00C0780 AFB500AC */ sw $s5, 0xAC($sp) /* 3BD4E4 E00C0784 3C150001 */ lui $s5, (0x11630 >> 16) /* 3BD4E8 E00C0788 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3BD4EC E00C078C AFBF00B4 */ sw $ra, 0xB4($sp) /* 3BD4F0 E00C0790 AFB600B0 */ sw $s6, 0xB0($sp) /* 3BD4F4 E00C0794 AFB400A8 */ sw $s4, 0xA8($sp) /* 3BD4F8 E00C0798 AFB300A4 */ sw $s3, 0xA4($sp) /* 3BD4FC E00C079C AFB200A0 */ sw $s2, 0xA0($sp) /* 3BD500 E00C07A0 AFB00098 */ sw $s0, 0x98($sp) /* 3BD504 E00C07A4 8E280000 */ lw $t0, 0x0($s1) /* 3BD508 E00C07A8 8CB0000C */ lw $s0, 0xC($a1) /* 3BD50C E00C07AC 0100182D */ daddu $v1, $t0, $zero /* 3BD510 E00C07B0 8E160024 */ lw $s6, 0x24($s0) /* 3BD514 E00C07B4 25080008 */ addiu $t0, $t0, 0x8 /* 3BD518 E00C07B8 AC620000 */ sw $v0, 0x0($v1) /* 3BD51C E00C07BC AC600004 */ sw $zero, 0x4($v1) /* 3BD520 E00C07C0 AD060000 */ sw $a2, 0x0($t0) /* 3BD524 E00C07C4 8CA20010 */ lw $v0, 0x10($a1) /* 3BD528 E00C07C8 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* 3BD52C E00C07CC AE280000 */ sw $t0, 0x0($s1) /* 3BD530 E00C07D0 8C42001C */ lw $v0, 0x1C($v0) /* 3BD534 E00C07D4 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3BD538 E00C07D8 00431021 */ addu $v0, $v0, $v1 /* 3BD53C E00C07DC AD020004 */ sw $v0, 0x4($t0) /* 3BD540 E00C07E0 8E050004 */ lw $a1, 0x4($s0) /* 3BD544 E00C07E4 8E060008 */ lw $a2, 0x8($s0) /* 3BD548 E00C07E8 8E07000C */ lw $a3, 0xC($s0) /* 3BD54C E00C07EC 25080008 */ addiu $t0, $t0, 0x8 /* 3BD550 E00C07F0 0C080108 */ jal shim_guTranslateF /* 3BD554 E00C07F4 AE280000 */ sw $t0, 0x0($s1) /* 3BD558 E00C07F8 27B20058 */ addiu $s2, $sp, 0x58 /* 3BD55C E00C07FC 8E050028 */ lw $a1, 0x28($s0) /* 3BD560 E00C0800 0240202D */ daddu $a0, $s2, $zero /* 3BD564 E00C0804 00A0302D */ daddu $a2, $a1, $zero /* 3BD568 E00C0808 0C080110 */ jal shim_guScaleF /* 3BD56C E00C080C 00A0382D */ daddu $a3, $a1, $zero /* 3BD570 E00C0810 0240202D */ daddu $a0, $s2, $zero /* 3BD574 E00C0814 27A50018 */ addiu $a1, $sp, 0x18 /* 3BD578 E00C0818 0C080114 */ jal shim_guMtxCatF /* 3BD57C E00C081C 00A0302D */ daddu $a2, $a1, $zero /* 3BD580 E00C0820 27A40018 */ addiu $a0, $sp, 0x18 /* 3BD584 E00C0824 3C138007 */ lui $s3, %hi(gMatrixListPos) /* 3BD588 E00C0828 267341F0 */ addiu $s3, $s3, %lo(gMatrixListPos) /* 3BD58C E00C082C 3C14800A */ lui $s4, %hi(gDisplayContext) /* 3BD590 E00C0830 2694A674 */ addiu $s4, $s4, %lo(gDisplayContext) /* 3BD594 E00C0834 96650000 */ lhu $a1, 0x0($s3) /* 3BD598 E00C0838 8E820000 */ lw $v0, 0x0($s4) /* 3BD59C E00C083C 00052980 */ sll $a1, $a1, 6 /* 3BD5A0 E00C0840 00B52821 */ addu $a1, $a1, $s5 /* 3BD5A4 E00C0844 0C080118 */ jal shim_guMtxF2L /* 3BD5A8 E00C0848 00452821 */ addu $a1, $v0, $a1 /* 3BD5AC E00C084C 3C02DA38 */ lui $v0, (0xDA380002 >> 16) /* 3BD5B0 E00C0850 34420002 */ ori $v0, $v0, (0xDA380002 & 0xFFFF) /* 3BD5B4 E00C0854 27A40018 */ addiu $a0, $sp, 0x18 /* 3BD5B8 E00C0858 8E280000 */ lw $t0, 0x0($s1) /* 3BD5BC E00C085C 96690000 */ lhu $t1, 0x0($s3) /* 3BD5C0 E00C0860 0100282D */ daddu $a1, $t0, $zero /* 3BD5C4 E00C0864 ACA20000 */ sw $v0, 0x0($a1) /* 3BD5C8 E00C0868 3122FFFF */ andi $v0, $t1, 0xFFFF /* 3BD5CC E00C086C 00021180 */ sll $v0, $v0, 6 /* 3BD5D0 E00C0870 00551021 */ addu $v0, $v0, $s5 /* 3BD5D4 E00C0874 8E830000 */ lw $v1, 0x0($s4) /* 3BD5D8 E00C0878 25080008 */ addiu $t0, $t0, 0x8 /* 3BD5DC E00C087C 00621821 */ addu $v1, $v1, $v0 /* 3BD5E0 E00C0880 ACA30004 */ sw $v1, 0x4($a1) /* 3BD5E4 E00C0884 8E050030 */ lw $a1, 0x30($s0) /* 3BD5E8 E00C0888 8E060034 */ lw $a2, 0x34($s0) /* 3BD5EC E00C088C 8E070038 */ lw $a3, 0x38($s0) /* 3BD5F0 E00C0890 25290001 */ addiu $t1, $t1, 0x1 /* 3BD5F4 E00C0894 AE280000 */ sw $t0, 0x0($s1) /* 3BD5F8 E00C0898 0C080108 */ jal shim_guTranslateF /* 3BD5FC E00C089C A6690000 */ sh $t1, 0x0($s3) /* 3BD600 E00C08A0 0240202D */ daddu $a0, $s2, $zero /* 3BD604 E00C08A4 8E050048 */ lw $a1, 0x48($s0) /* 3BD608 E00C08A8 8E06004C */ lw $a2, 0x4C($s0) /* 3BD60C E00C08AC 0C080110 */ jal shim_guScaleF /* 3BD610 E00C08B0 00A0382D */ daddu $a3, $a1, $zero /* 3BD614 E00C08B4 0240202D */ daddu $a0, $s2, $zero /* 3BD618 E00C08B8 27A50018 */ addiu $a1, $sp, 0x18 /* 3BD61C E00C08BC 0C080114 */ jal shim_guMtxCatF /* 3BD620 E00C08C0 00A0302D */ daddu $a2, $a1, $zero /* 3BD624 E00C08C4 44800000 */ mtc1 $zero, $f0 /* 3BD628 E00C08C8 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 3BD62C E00C08CC E7A00010 */ swc1 $f0, 0x10($sp) /* 3BD630 E00C08D0 8E05002C */ lw $a1, 0x2C($s0) /* 3BD634 E00C08D4 44060000 */ mfc1 $a2, $f0 /* 3BD638 E00C08D8 0C080104 */ jal shim_guRotateF /* 3BD63C E00C08DC 0240202D */ daddu $a0, $s2, $zero /* 3BD640 E00C08E0 0240202D */ daddu $a0, $s2, $zero /* 3BD644 E00C08E4 27A50018 */ addiu $a1, $sp, 0x18 /* 3BD648 E00C08E8 0C080114 */ jal shim_guMtxCatF /* 3BD64C E00C08EC 00A0302D */ daddu $a2, $a1, $zero /* 3BD650 E00C08F0 27A40018 */ addiu $a0, $sp, 0x18 /* 3BD654 E00C08F4 96650000 */ lhu $a1, 0x0($s3) /* 3BD658 E00C08F8 8E820000 */ lw $v0, 0x0($s4) /* 3BD65C E00C08FC 00052980 */ sll $a1, $a1, 6 /* 3BD660 E00C0900 00B52821 */ addu $a1, $a1, $s5 /* 3BD664 E00C0904 0C080118 */ jal shim_guMtxF2L /* 3BD668 E00C0908 00452821 */ addu $a1, $v0, $a1 /* 3BD66C E00C090C 3C08D838 */ lui $t0, (0xD8380002 >> 16) /* 3BD670 E00C0910 35080002 */ ori $t0, $t0, (0xD8380002 & 0xFFFF) /* 3BD674 E00C0914 8E240000 */ lw $a0, 0x0($s1) /* 3BD678 E00C0918 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3BD67C E00C091C 0080282D */ daddu $a1, $a0, $zero /* 3BD680 E00C0920 24840008 */ addiu $a0, $a0, 0x8 /* 3BD684 E00C0924 AE240000 */ sw $a0, 0x0($s1) /* 3BD688 E00C0928 96620000 */ lhu $v0, 0x0($s3) /* 3BD68C E00C092C 32D600FF */ andi $s6, $s6, 0xFF /* 3BD690 E00C0930 ACA30000 */ sw $v1, 0x0($a1) /* 3BD694 E00C0934 24430001 */ addiu $v1, $v0, 0x1 /* 3BD698 E00C0938 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3BD69C E00C093C 00021180 */ sll $v0, $v0, 6 /* 3BD6A0 E00C0940 A6630000 */ sh $v1, 0x0($s3) /* 3BD6A4 E00C0944 8E830000 */ lw $v1, 0x0($s4) /* 3BD6A8 E00C0948 00551021 */ addu $v0, $v0, $s5 /* 3BD6AC E00C094C 00621821 */ addu $v1, $v1, $v0 /* 3BD6B0 E00C0950 24820008 */ addiu $v0, $a0, 0x8 /* 3BD6B4 E00C0954 ACA30004 */ sw $v1, 0x4($a1) /* 3BD6B8 E00C0958 AE220000 */ sw $v0, 0x0($s1) /* 3BD6BC E00C095C 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3BD6C0 E00C0960 AC820000 */ sw $v0, 0x0($a0) /* 3BD6C4 E00C0964 24820010 */ addiu $v0, $a0, 0x10 /* 3BD6C8 E00C0968 9203001B */ lbu $v1, 0x1B($s0) /* 3BD6CC E00C096C 9206001F */ lbu $a2, 0x1F($s0) /* 3BD6D0 E00C0970 92070023 */ lbu $a3, 0x23($s0) /* 3BD6D4 E00C0974 3C05DE00 */ lui $a1, (0xDE000000 >> 16) /* 3BD6D8 E00C0978 AE220000 */ sw $v0, 0x0($s1) /* 3BD6DC E00C097C 3C020900 */ lui $v0, %hi(D_090037A8_410A38) /* 3BD6E0 E00C0980 244237A8 */ addiu $v0, $v0, %lo(D_090037A8_410A38) /* 3BD6E4 E00C0984 AC82000C */ sw $v0, 0xC($a0) /* 3BD6E8 E00C0988 24820018 */ addiu $v0, $a0, 0x18 /* 3BD6EC E00C098C AC850008 */ sw $a1, 0x8($a0) /* 3BD6F0 E00C0990 AE220000 */ sw $v0, 0x0($s1) /* 3BD6F4 E00C0994 3C020900 */ lui $v0, %hi(D_09003818_410AA8) /* 3BD6F8 E00C0998 24423818 */ addiu $v0, $v0, %lo(D_09003818_410AA8) /* 3BD6FC E00C099C AC820014 */ sw $v0, 0x14($a0) /* 3BD700 E00C09A0 24820020 */ addiu $v0, $a0, 0x20 /* 3BD704 E00C09A4 AC850010 */ sw $a1, 0x10($a0) /* 3BD708 E00C09A8 24050040 */ addiu $a1, $zero, 0x40 /* 3BD70C E00C09AC AE220000 */ sw $v0, 0x0($s1) /* 3BD710 E00C09B0 24820028 */ addiu $v0, $a0, 0x28 /* 3BD714 E00C09B4 AC880018 */ sw $t0, 0x18($a0) /* 3BD718 E00C09B8 AC85001C */ sw $a1, 0x1C($a0) /* 3BD71C E00C09BC AE220000 */ sw $v0, 0x0($s1) /* 3BD720 E00C09C0 AC880020 */ sw $t0, 0x20($a0) /* 3BD724 E00C09C4 AC850024 */ sw $a1, 0x24($a0) /* 3BD728 E00C09C8 00031E00 */ sll $v1, $v1, 24 /* 3BD72C E00C09CC 00063400 */ sll $a2, $a2, 16 /* 3BD730 E00C09D0 00661825 */ or $v1, $v1, $a2 /* 3BD734 E00C09D4 00073A00 */ sll $a3, $a3, 8 /* 3BD738 E00C09D8 00671825 */ or $v1, $v1, $a3 /* 3BD73C E00C09DC 00761825 */ or $v1, $v1, $s6 /* 3BD740 E00C09E0 AC830004 */ sw $v1, 0x4($a0) /* 3BD744 E00C09E4 8FBF00B4 */ lw $ra, 0xB4($sp) /* 3BD748 E00C09E8 8FB600B0 */ lw $s6, 0xB0($sp) /* 3BD74C E00C09EC 8FB500AC */ lw $s5, 0xAC($sp) /* 3BD750 E00C09F0 8FB400A8 */ lw $s4, 0xA8($sp) /* 3BD754 E00C09F4 8FB300A4 */ lw $s3, 0xA4($sp) /* 3BD758 E00C09F8 8FB200A0 */ lw $s2, 0xA0($sp) /* 3BD75C E00C09FC 8FB1009C */ lw $s1, 0x9C($sp) /* 3BD760 E00C0A00 8FB00098 */ lw $s0, 0x98($sp) /* 3BD764 E00C0A04 03E00008 */ jr $ra /* 3BD768 E00C0A08 27BD00B8 */ addiu $sp, $sp, 0xB8 /* 3BD76C E00C0A0C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void snowman_doll_appendGfx(void* effect) { SnowmanDollFXData* data = ((EffectInstance*)effect)->data.snowmanDoll; s32 unk_24 = data->unk_24; Matrix4f sp18; Matrix4f sp58; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C); shim_guScaleF(sp58, data->unk_28, data->unk_28, data->unk_28); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); shim_guTranslateF(sp18, data->unk_30, data->unk_34, data->unk_38); shim_guScaleF(sp58, data->unk_48, data->unk_4C, data->unk_48); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, data->unk_2C, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, unk_24); gSPDisplayList(gMainGfxPos++, D_090037A8_3C1148); gSPDisplayList(gMainGfxPos++, D_09003818_3C11B8); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel PartnerDamageEnemy /* 1AE694 8027FDB4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 1AE698 8027FDB8 AFB20018 */ sw $s2, 0x18($sp) /* 1AE69C 8027FDBC 0080902D */ daddu $s2, $a0, $zero /* 1AE6A0 8027FDC0 AFBF0024 */ sw $ra, 0x24($sp) /* 1AE6A4 8027FDC4 AFB40020 */ sw $s4, 0x20($sp) /* 1AE6A8 8027FDC8 AFB3001C */ sw $s3, 0x1C($sp) /* 1AE6AC 8027FDCC AFB10014 */ sw $s1, 0x14($sp) /* 1AE6B0 8027FDD0 AFB00010 */ sw $s0, 0x10($sp) /* 1AE6B4 8027FDD4 8E440148 */ lw $a0, 0x148($s2) /* 1AE6B8 8027FDD8 0C09A75B */ jal get_actor /* 1AE6BC 8027FDDC 8E50000C */ lw $s0, 0xC($s2) /* 1AE6C0 8027FDE0 8E140000 */ lw $s4, 0x0($s0) /* 1AE6C4 8027FDE4 26100004 */ addiu $s0, $s0, 0x4 /* 1AE6C8 8027FDE8 8E030000 */ lw $v1, 0x0($s0) /* 1AE6CC 8027FDEC 26100004 */ addiu $s0, $s0, 0x4 /* 1AE6D0 8027FDF0 0240202D */ daddu $a0, $s2, $zero /* 1AE6D4 8027FDF4 3C11800E */ lui $s1, %hi(gBattleStatus) /* 1AE6D8 8027FDF8 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) /* 1AE6DC 8027FDFC 0040982D */ daddu $s3, $v0, $zero /* 1AE6E0 8027FE00 AE230188 */ sw $v1, 0x188($s1) /* 1AE6E4 8027FE04 8E030000 */ lw $v1, 0x0($s0) /* 1AE6E8 8027FE08 26100004 */ addiu $s0, $s0, 0x4 /* 1AE6EC 8027FE0C AE23018C */ sw $v1, 0x18C($s1) /* 1AE6F0 8027FE10 8E030000 */ lw $v1, 0x0($s0) /* 1AE6F4 8027FE14 26100004 */ addiu $s0, $s0, 0x4 /* 1AE6F8 8027FE18 AE230190 */ sw $v1, 0x190($s1) /* 1AE6FC 8027FE1C 8E050000 */ lw $a1, 0x0($s0) /* 1AE700 8027FE20 0C0B1EAF */ jal evt_get_variable /* 1AE704 8027FE24 26100004 */ addiu $s0, $s0, 0x4 /* 1AE708 8027FE28 A622017E */ sh $v0, 0x17E($s1) /* 1AE70C 8027FE2C A2200198 */ sb $zero, 0x198($s1) /* 1AE710 8027FE30 8E100000 */ lw $s0, 0x0($s0) /* 1AE714 8027FE34 24020030 */ addiu $v0, $zero, 0x30 /* 1AE718 8027FE38 32030030 */ andi $v1, $s0, 0x30 /* 1AE71C 8027FE3C 54620004 */ bnel $v1, $v0, .L8027FE50 /* 1AE720 8027FE40 32020010 */ andi $v0, $s0, 0x10 /* 1AE724 8027FE44 8E220000 */ lw $v0, 0x0($s1) /* 1AE728 8027FE48 0809FFA4 */ j .L8027FE90 /* 1AE72C 8027FE4C 34420030 */ ori $v0, $v0, 0x30 .L8027FE50: /* 1AE730 8027FE50 10400004 */ beqz $v0, .L8027FE64 /* 1AE734 8027FE54 2403FFDF */ addiu $v1, $zero, -0x21 /* 1AE738 8027FE58 8E220000 */ lw $v0, 0x0($s1) /* 1AE73C 8027FE5C 0809FFA3 */ j .L8027FE8C /* 1AE740 8027FE60 34420010 */ ori $v0, $v0, 0x10 .L8027FE64: /* 1AE744 8027FE64 32020020 */ andi $v0, $s0, 0x20 /* 1AE748 8027FE68 10400005 */ beqz $v0, .L8027FE80 /* 1AE74C 8027FE6C 2403FFEF */ addiu $v1, $zero, -0x11 /* 1AE750 8027FE70 8E220000 */ lw $v0, 0x0($s1) /* 1AE754 8027FE74 00431024 */ and $v0, $v0, $v1 /* 1AE758 8027FE78 0809FFA4 */ j .L8027FE90 /* 1AE75C 8027FE7C 34420020 */ ori $v0, $v0, 0x20 .L8027FE80: /* 1AE760 8027FE80 8E220000 */ lw $v0, 0x0($s1) /* 1AE764 8027FE84 00431024 */ and $v0, $v0, $v1 /* 1AE768 8027FE88 2403FFDF */ addiu $v1, $zero, -0x21 .L8027FE8C: /* 1AE76C 8027FE8C 00431024 */ and $v0, $v0, $v1 .L8027FE90: /* 1AE770 8027FE90 AE220000 */ sw $v0, 0x0($s1) /* 1AE774 8027FE94 32020040 */ andi $v0, $s0, 0x40 /* 1AE778 8027FE98 10400007 */ beqz $v0, .L8027FEB8 /* 1AE77C 8027FE9C 2404FFBF */ addiu $a0, $zero, -0x41 /* 1AE780 8027FEA0 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AE784 8027FEA4 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AE788 8027FEA8 8C620000 */ lw $v0, 0x0($v1) /* 1AE78C 8027FEAC 34420040 */ ori $v0, $v0, 0x40 /* 1AE790 8027FEB0 0809FFB3 */ j .L8027FECC /* 1AE794 8027FEB4 AC620000 */ sw $v0, 0x0($v1) .L8027FEB8: /* 1AE798 8027FEB8 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AE79C 8027FEBC 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AE7A0 8027FEC0 8C430000 */ lw $v1, 0x0($v0) /* 1AE7A4 8027FEC4 00641824 */ and $v1, $v1, $a0 /* 1AE7A8 8027FEC8 AC430000 */ sw $v1, 0x0($v0) .L8027FECC: /* 1AE7AC 8027FECC 32020200 */ andi $v0, $s0, 0x200 /* 1AE7B0 8027FED0 10400007 */ beqz $v0, .L8027FEF0 /* 1AE7B4 8027FED4 2404FDFF */ addiu $a0, $zero, -0x201 /* 1AE7B8 8027FED8 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AE7BC 8027FEDC 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AE7C0 8027FEE0 8C620000 */ lw $v0, 0x0($v1) /* 1AE7C4 8027FEE4 34420200 */ ori $v0, $v0, 0x200 /* 1AE7C8 8027FEE8 0809FFC1 */ j .L8027FF04 /* 1AE7CC 8027FEEC AC620000 */ sw $v0, 0x0($v1) .L8027FEF0: /* 1AE7D0 8027FEF0 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AE7D4 8027FEF4 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AE7D8 8027FEF8 8C430000 */ lw $v1, 0x0($v0) /* 1AE7DC 8027FEFC 00641824 */ and $v1, $v1, $a0 /* 1AE7E0 8027FF00 AC430000 */ sw $v1, 0x0($v0) .L8027FF04: /* 1AE7E4 8027FF04 32020080 */ andi $v0, $s0, 0x80 /* 1AE7E8 8027FF08 10400007 */ beqz $v0, .L8027FF28 /* 1AE7EC 8027FF0C 2404FF7F */ addiu $a0, $zero, -0x81 /* 1AE7F0 8027FF10 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AE7F4 8027FF14 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AE7F8 8027FF18 8C620000 */ lw $v0, 0x0($v1) /* 1AE7FC 8027FF1C 34420080 */ ori $v0, $v0, 0x80 /* 1AE800 8027FF20 0809FFCF */ j .L8027FF3C /* 1AE804 8027FF24 AC620000 */ sw $v0, 0x0($v1) .L8027FF28: /* 1AE808 8027FF28 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AE80C 8027FF2C 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AE810 8027FF30 8C430000 */ lw $v1, 0x0($v0) /* 1AE814 8027FF34 00641824 */ and $v1, $v1, $a0 /* 1AE818 8027FF38 AC430000 */ sw $v1, 0x0($v0) .L8027FF3C: /* 1AE81C 8027FF3C 32020800 */ andi $v0, $s0, 0x800 /* 1AE820 8027FF40 10400007 */ beqz $v0, .L8027FF60 /* 1AE824 8027FF44 2404F7FF */ addiu $a0, $zero, -0x801 /* 1AE828 8027FF48 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AE82C 8027FF4C 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AE830 8027FF50 8C620000 */ lw $v0, 0x0($v1) /* 1AE834 8027FF54 34420800 */ ori $v0, $v0, 0x800 /* 1AE838 8027FF58 0809FFDD */ j .L8027FF74 /* 1AE83C 8027FF5C AC620000 */ sw $v0, 0x0($v1) .L8027FF60: /* 1AE840 8027FF60 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AE844 8027FF64 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AE848 8027FF68 8C430000 */ lw $v1, 0x0($v0) /* 1AE84C 8027FF6C 00641824 */ and $v1, $v1, $a0 /* 1AE850 8027FF70 AC430000 */ sw $v1, 0x0($v0) .L8027FF74: /* 1AE854 8027FF74 96620428 */ lhu $v0, 0x428($s3) /* 1AE858 8027FF78 92230193 */ lbu $v1, 0x193($s1) /* 1AE85C 8027FF7C A62201A0 */ sh $v0, 0x1A0($s1) /* 1AE860 8027FF80 92620426 */ lbu $v0, 0x426($s3) /* 1AE864 8027FF84 A2230194 */ sb $v1, 0x194($s1) /* 1AE868 8027FF88 306300FF */ andi $v1, $v1, 0xFF /* 1AE86C 8027FF8C A22201A2 */ sb $v0, 0x1A2($s1) /* 1AE870 8027FF90 240200FF */ addiu $v0, $zero, 0xFF /* 1AE874 8027FF94 50620001 */ beql $v1, $v0, .L8027FF9C /* 1AE878 8027FF98 A2200194 */ sb $zero, 0x194($s1) .L8027FF9C: /* 1AE87C 8027FF9C 8E220190 */ lw $v0, 0x190($s1) /* 1AE880 8027FFA0 30420F00 */ andi $v0, $v0, 0xF00 /* 1AE884 8027FFA4 00021203 */ sra $v0, $v0, 8 /* 1AE888 8027FFA8 0C09F8CA */ jal calc_partner_damage_enemy /* 1AE88C 8027FFAC A2220195 */ sb $v0, 0x195($s1) /* 1AE890 8027FFB0 0440000B */ bltz $v0, .L8027FFE0 /* 1AE894 8027FFB4 0240202D */ daddu $a0, $s2, $zero /* 1AE898 8027FFB8 0280282D */ daddu $a1, $s4, $zero /* 1AE89C 8027FFBC 0C0B2026 */ jal evt_set_variable /* 1AE8A0 8027FFC0 0040302D */ daddu $a2, $v0, $zero /* 1AE8A4 8027FFC4 0C0B1069 */ jal does_script_exist_by_ref /* 1AE8A8 8027FFC8 0240202D */ daddu $a0, $s2, $zero /* 1AE8AC 8027FFCC 0040182D */ daddu $v1, $v0, $zero /* 1AE8B0 8027FFD0 10600004 */ beqz $v1, .L8027FFE4 /* 1AE8B4 8027FFD4 240200FF */ addiu $v0, $zero, 0xFF /* 1AE8B8 8027FFD8 0809FFF9 */ j .L8027FFE4 /* 1AE8BC 8027FFDC 24020002 */ addiu $v0, $zero, 0x2 .L8027FFE0: /* 1AE8C0 8027FFE0 240200FF */ addiu $v0, $zero, 0xFF .L8027FFE4: /* 1AE8C4 8027FFE4 8FBF0024 */ lw $ra, 0x24($sp) /* 1AE8C8 8027FFE8 8FB40020 */ lw $s4, 0x20($sp) /* 1AE8CC 8027FFEC 8FB3001C */ lw $s3, 0x1C($sp) /* 1AE8D0 8027FFF0 8FB20018 */ lw $s2, 0x18($sp) /* 1AE8D4 8027FFF4 8FB10014 */ lw $s1, 0x14($sp) /* 1AE8D8 8027FFF8 8FB00010 */ lw $s0, 0x10($sp) /* 1AE8DC 8027FFFC 03E00008 */ jr $ra shop_owner_begin_speech: /* 1AE8E0 80280000 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus PartnerDamageEnemy(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; Actor* enemy = get_actor(script->owner1.enemyID); s32 temp_s4 = *args++; s32 flags; s32 damageResult; u8 statusChance; gBattleStatus.currentAttackElement = *args++; gBattleStatus.currentAttackEventSuppression = *args++; gBattleStatus.currentAttackStatus = *args++; gBattleStatus.currentAttackDamage = evt_get_variable(script, *args++); gBattleStatus.powerBounceCounter = 0; flags = *args++; if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) { battleStatus->flags1 |= BS_FLAGS1_10; battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_10) { battleStatus->flags1 |= BS_FLAGS1_10; battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) { battleStatus->flags1 &= ~BS_FLAGS1_10; battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; } else { battleStatus->flags1 &= ~BS_FLAGS1_10; battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } if (flags & BS_FLAGS1_40) { gBattleStatus.flags1 |= BS_FLAGS1_40; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_40; } if (flags & BS_FLAGS1_200) { gBattleStatus.flags1 |= BS_FLAGS1_200; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_200; } if (flags & BS_FLAGS1_80) { gBattleStatus.flags1 |= BS_FLAGS1_80; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_80; } if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) { gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE; } statusChance = battleStatus->currentAttackStatus; battleStatus->currentTargetID = enemy->targetActorID; battleStatus->currentTargetPart = enemy->targetPartIndex; battleStatus->statusChance = statusChance; if (statusChance == STATUS_KEY_NEVER) { battleStatus->statusChance = 0; } battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8; damageResult = calc_partner_damage_enemy(); if (damageResult < 0) { return ApiStatus_FINISH; } evt_set_variable(script, temp_s4, damageResult); if (!does_script_exist_by_ref(script)) { return ApiStatus_FINISH; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel GetStatusFlags /* 19DB10 8026F230 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 19DB14 8026F234 AFB10014 */ sw $s1, 0x14($sp) /* 19DB18 8026F238 0080882D */ daddu $s1, $a0, $zero /* 19DB1C 8026F23C AFBF001C */ sw $ra, 0x1C($sp) /* 19DB20 8026F240 AFB20018 */ sw $s2, 0x18($sp) /* 19DB24 8026F244 AFB00010 */ sw $s0, 0x10($sp) /* 19DB28 8026F248 8E30000C */ lw $s0, 0xC($s1) /* 19DB2C 8026F24C 8E050000 */ lw $a1, 0x0($s0) /* 19DB30 8026F250 0C0B1EAF */ jal evt_get_variable /* 19DB34 8026F254 26100004 */ addiu $s0, $s0, 0x4 /* 19DB38 8026F258 0040202D */ daddu $a0, $v0, $zero /* 19DB3C 8026F25C 2402FF81 */ addiu $v0, $zero, -0x7F /* 19DB40 8026F260 14820002 */ bne $a0, $v0, .L8026F26C /* 19DB44 8026F264 8E120000 */ lw $s2, 0x0($s0) /* 19DB48 8026F268 8E240148 */ lw $a0, 0x148($s1) .L8026F26C: /* 19DB4C 8026F26C 0C09A75B */ jal get_actor /* 19DB50 8026F270 0000802D */ daddu $s0, $zero, $zero /* 19DB54 8026F274 0040202D */ daddu $a0, $v0, $zero /* 19DB58 8026F278 94820192 */ lhu $v0, 0x192($a0) /* 19DB5C 8026F27C 80830210 */ lb $v1, 0x210($a0) /* 19DB60 8026F280 10600020 */ beqz $v1, .L8026F304 /* 19DB64 8026F284 30460700 */ andi $a2, $v0, 0x700 /* 19DB68 8026F288 38620008 */ xori $v0, $v1, 0x8 /* 19DB6C 8026F28C 2C420001 */ sltiu $v0, $v0, 0x1 /* 19DB70 8026F290 00028540 */ sll $s0, $v0, 21 /* 19DB74 8026F294 24020007 */ addiu $v0, $zero, 0x7 /* 19DB78 8026F298 50620001 */ beql $v1, $v0, D_8026F2A0 /* 19DB7C 8026F29C 36104000 */ ori $s0, $s0, 0x4000 D_8026F2A0: /* 19DB80 8026F2A0 24020006 */ addiu $v0, $zero, 0x6 /* 19DB84 8026F2A4 50620001 */ beql $v1, $v0, .L8026F2AC /* 19DB88 8026F2A8 36101000 */ ori $s0, $s0, 0x1000 .L8026F2AC: /* 19DB8C 8026F2AC 24020005 */ addiu $v0, $zero, 0x5 /* 19DB90 8026F2B0 14620004 */ bne $v1, $v0, .L8026F2C4 /* 19DB94 8026F2B4 24020004 */ addiu $v0, $zero, 0x4 /* 19DB98 8026F2B8 3C020001 */ lui $v0, (0x12000 >> 16) /* 19DB9C 8026F2BC 02028025 */ or $s0, $s0, $v0 /* 19DBA0 8026F2C0 24020004 */ addiu $v0, $zero, 0x4 .L8026F2C4: /* 19DBA4 8026F2C4 14620004 */ bne $v1, $v0, .L8026F2D8 /* 19DBA8 8026F2C8 24020003 */ addiu $v0, $zero, 0x3 /* 19DBAC 8026F2CC 3C020004 */ lui $v0, (0x48000 >> 16) /* 19DBB0 8026F2D0 02028025 */ or $s0, $s0, $v0 /* 19DBB4 8026F2D4 24020003 */ addiu $v0, $zero, 0x3 .L8026F2D8: /* 19DBB8 8026F2D8 50620001 */ beql $v1, $v0, .L8026F2E0 /* 19DBBC 8026F2DC 36108000 */ ori $s0, $s0, (0x18000 & 0xFFFF) .L8026F2E0: /* 19DBC0 8026F2E0 24020009 */ addiu $v0, $zero, 0x9 /* 19DBC4 8026F2E4 14620004 */ bne $v1, $v0, .L8026F2F8 /* 19DBC8 8026F2E8 2402000A */ addiu $v0, $zero, 0xA /* 19DBCC 8026F2EC 3C020002 */ lui $v0, (0x22000 >> 16) /* 19DBD0 8026F2F0 02028025 */ or $s0, $s0, $v0 /* 19DBD4 8026F2F4 2402000A */ addiu $v0, $zero, 0xA .L8026F2F8: /* 19DBD8 8026F2F8 14620002 */ bne $v1, $v0, .L8026F304 /* 19DBDC 8026F2FC 3C020008 */ lui $v0, (0x80000 >> 16) /* 19DBE0 8026F300 02028025 */ or $s0, $s0, $v0 .L8026F304: /* 19DBE4 8026F304 80830212 */ lb $v1, 0x212($a0) /* 19DBE8 8026F308 10600003 */ beqz $v1, .L8026F318 /* 19DBEC 8026F30C 2402000B */ addiu $v0, $zero, 0xB /* 19DBF0 8026F310 50620001 */ beql $v1, $v0, .L8026F318 /* 19DBF4 8026F314 36102000 */ ori $s0, $s0, (0x12000 & 0xFFFF) .L8026F318: /* 19DBF8 8026F318 80830214 */ lb $v1, 0x214($a0) /* 19DBFC 8026F31C 10600004 */ beqz $v1, .L8026F330 /* 19DC00 8026F320 2402000C */ addiu $v0, $zero, 0xC /* 19DC04 8026F324 14620002 */ bne $v1, $v0, .L8026F330 /* 19DC08 8026F328 3C020010 */ lui $v0, (0x100000 >> 16) /* 19DC0C 8026F32C 02028025 */ or $s0, $s0, $v0 .L8026F330: /* 19DC10 8026F330 80830216 */ lb $v1, 0x216($a0) /* 19DC14 8026F334 10600004 */ beqz $v1, D_8026F348 /* 19DC18 8026F338 2402000D */ addiu $v0, $zero, 0xD /* 19DC1C 8026F33C 14620002 */ bne $v1, $v0, D_8026F348 /* 19DC20 8026F340 3C020100 */ lui $v0, (0x1000000 >> 16) /* 19DC24 8026F344 02028025 */ or $s0, $s0, $v0 D_8026F348: /* 19DC28 8026F348 80830218 */ lb $v1, 0x218($a0) /* 19DC2C 8026F34C 10600004 */ beqz $v1, .L8026F360 /* 19DC30 8026F350 2402000E */ addiu $v0, $zero, 0xE /* 19DC34 8026F354 14620002 */ bne $v1, $v0, .L8026F360 /* 19DC38 8026F358 3C020400 */ lui $v0, (0x4000000 >> 16) /* 19DC3C 8026F35C 02028025 */ or $s0, $s0, $v0 .L8026F360: /* 19DC40 8026F360 8C8301F4 */ lw $v1, 0x1F4($a0) /* 19DC44 8026F364 1060000D */ beqz $v1, .L8026F39C /* 19DC48 8026F368 24020100 */ addiu $v0, $zero, 0x100 /* 19DC4C 8026F36C 3C050400 */ lui $a1, (0x4000000 >> 16) .L8026F370: /* 19DC50 8026F370 8C620000 */ lw $v0, 0x0($v1) /* 19DC54 8026F374 30420100 */ andi $v0, $v0, 0x100 /* 19DC58 8026F378 54400001 */ bnel $v0, $zero, .L8026F380 /* 19DC5C 8026F37C 02058025 */ or $s0, $s0, $a1 .L8026F380: /* 19DC60 8026F380 8C62007C */ lw $v0, 0x7C($v1) /* 19DC64 8026F384 30420020 */ andi $v0, $v0, 0x20 /* 19DC68 8026F388 54400001 */ bnel $v0, $zero, .L8026F390 /* 19DC6C 8026F38C 02058025 */ or $s0, $s0, $a1 .L8026F390: /* 19DC70 8026F390 8C63000C */ lw $v1, 0xC($v1) /* 19DC74 8026F394 1460FFF6 */ bnez $v1, .L8026F370 /* 19DC78 8026F398 24020100 */ addiu $v0, $zero, 0x100 .L8026F39C: /* 19DC7C 8026F39C 10C20005 */ beq $a2, $v0, .L8026F3B4 /* 19DC80 8026F3A0 28C20101 */ slti $v0, $a2, 0x101 /* 19DC84 8026F3A4 10400009 */ beqz $v0, .L8026F3CC /* 19DC88 8026F3A8 00000000 */ nop /* 19DC8C 8026F3AC 14C00007 */ bnez $a2, .L8026F3CC /* 19DC90 8026F3B0 00000000 */ nop .L8026F3B4: /* 19DC94 8026F3B4 3C02800E */ lui $v0, %hi(gBattleStatus) /* 19DC98 8026F3B8 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 19DC9C 8026F3BC 8042009A */ lb $v0, 0x9A($v0) /* 19DCA0 8026F3C0 10400002 */ beqz $v0, .L8026F3CC /* 19DCA4 8026F3C4 3C020400 */ lui $v0, (0x4000000 >> 16) /* 19DCA8 8026F3C8 02028025 */ or $s0, $s0, $v0 .L8026F3CC: /* 19DCAC 8026F3CC 80820220 */ lb $v0, 0x220($a0) /* 19DCB0 8026F3D0 10400002 */ beqz $v0, .L8026F3DC /* 19DCB4 8026F3D4 3C020200 */ lui $v0, (0x2000000 >> 16) /* 19DCB8 8026F3D8 02028025 */ or $s0, $s0, $v0 .L8026F3DC: /* 19DCBC 8026F3DC 80820221 */ lb $v0, 0x221($a0) /* 19DCC0 8026F3E0 10400002 */ beqz $v0, .L8026F3EC /* 19DCC4 8026F3E4 3C020800 */ lui $v0, (0x8000000 >> 16) /* 19DCC8 8026F3E8 02028025 */ or $s0, $s0, $v0 .L8026F3EC: /* 19DCCC 8026F3EC 80820222 */ lb $v0, 0x222($a0) gPauseDLAvailable: /* 19DCD0 8026F3F0 10400002 */ beqz $v0, .L8026F3FC /* 19DCD4 8026F3F4 3C021000 */ lui $v0, (0x10000000 >> 16) /* 19DCD8 8026F3F8 02028025 */ or $s0, $s0, $v0 .L8026F3FC: /* 19DCDC 8026F3FC 80820223 */ lb $v0, 0x223($a0) /* 19DCE0 8026F400 10400002 */ beqz $v0, .L8026F40C /* 19DCE4 8026F404 3C022000 */ lui $v0, (0x20000000 >> 16) /* 19DCE8 8026F408 02028025 */ or $s0, $s0, $v0 .L8026F40C: /* 19DCEC 8026F40C 0C099CAB */ jal player_team_is_ability_active /* 19DCF0 8026F410 24050016 */ addiu $a1, $zero, 0x16 /* 19DCF4 8026F414 10400002 */ beqz $v0, .L8026F420 /* 19DCF8 8026F418 3C024000 */ lui $v0, (0x40000000 >> 16) /* 19DCFC 8026F41C 02028025 */ or $s0, $s0, $v0 .L8026F420: /* 19DD00 8026F420 0220202D */ daddu $a0, $s1, $zero /* 19DD04 8026F424 0240282D */ daddu $a1, $s2, $zero /* 19DD08 8026F428 0C0B2026 */ jal evt_set_variable /* 19DD0C 8026F42C 0200302D */ daddu $a2, $s0, $zero /* 19DD10 8026F430 8FBF001C */ lw $ra, 0x1C($sp) /* 19DD14 8026F434 8FB20018 */ lw $s2, 0x18($sp) /* 19DD18 8026F438 8FB10014 */ lw $s1, 0x14($sp) /* 19DD1C 8026F43C 8FB00010 */ lw $s0, 0x10($sp) /* 19DD20 8026F440 24020002 */ addiu $v0, $zero, 0x2 /* 19DD24 8026F444 03E00008 */ jr $ra /* 19DD28 8026F448 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: ApiStatus GetStatusFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; BattleStatus* battleStatus = &gBattleStatus; s32 actorID = evt_get_variable(script, *args++); s32 outVar = *args++; Actor* actor; s32 actorClass; s8 debuff; s8 staticStatus; s8 stoneStatus; s8 koStatus; s8 transStatus; ActorPart* partsTable; s32 flags; if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } actor = get_actor(actorID); debuff = actor->debuff; actorClass = actor->actorID & ACTOR_CLASS_MASK; flags = 0; if (debuff != 0) { if (debuff == STATUS_KEY_STOP) { flags |= STATUS_FLAG_STOP; } if (debuff == STATUS_KEY_FROZEN) { flags |= STATUS_FLAG_FROZEN; } if (debuff == STATUS_KEY_SLEEP) { flags |= STATUS_FLAG_SLEEP; } if (debuff == STATUS_KEY_PARALYZE) { flags |= STATUS_FLAG_PARALYZE; } if (debuff == STATUS_KEY_DIZZY) { flags |= STATUS_FLAG_DIZZY; } if (debuff == STATUS_KEY_FEAR) { flags |= STATUS_FLAG_FEAR; } if (debuff == STATUS_KEY_POISON) { flags |= STATUS_FLAG_POISON; } if (debuff == STATUS_KEY_SHRINK) { flags |= STATUS_FLAG_SHRINK; } } switch (actor->staticStatus) { case 0: break; case STATUS_KEY_STATIC: flags |= STATUS_FLAG_STATIC; break; } switch (actor->stoneStatus) { case 0: break; case STATUS_KEY_STONE: flags |= STATUS_FLAG_STONE; break; } switch (actor->koStatus) { case 0: break; case STATUS_KEY_DAZE: flags |= STATUS_FLAG_KO; break; } switch (actor->transparentStatus) { case 0: break; case STATUS_KEY_TRANSPARENT: flags |= STATUS_FLAG_TRANSPARENT; break; } for (partsTable = actor->partsTable; partsTable != NULL; partsTable = partsTable->nextPart) { if (partsTable->flags & 0x100) { flags |= STATUS_FLAG_TRANSPARENT; } if (partsTable->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) { flags |= STATUS_FLAG_TRANSPARENT; } } switch (actorClass) { case ACTOR_CLASS_PLAYER: case ACTOR_CLASS_PARTNER: if (battleStatus->outtaSightActive) { flags |= STATUS_FLAG_TRANSPARENT; } break; case ACTOR_CLASS_ENEMY: break; } if (actor->isGlowing) { flags |= STATUS_FLAG_GLOWING; } if (actor->attackBoost) { flags |= STATUS_FLAG_ATTACK_BOOST; } if (actor->defenseBoost) { flags |= STATUS_FLAG_DEFENSE_BOOST; } if (actor->chillOutAmount) { flags |= STATUS_FLAG_CHILL_OUT; } if (player_team_is_ability_active(actor, ABILITY_RIGHT_ON)) { flags |= STATUS_FLAG_RIGHT_ON; } evt_set_variable(script, outVar, flags); return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel drop_leaves_appendGfx /* 33D31C E002852C 27BDFEF0 */ addiu $sp, $sp, -0x110 /* 33D320 E0028530 AFB700F4 */ sw $s7, 0xF4($sp) /* 33D324 E0028534 0080B82D */ daddu $s7, $a0, $zero /* 33D328 E0028538 3C02DB06 */ lui $v0, (0xDB060024 >> 16) /* 33D32C E002853C 34420024 */ ori $v0, $v0, (0xDB060024 & 0xFFFF) /* 33D330 E0028540 3C061464 */ lui $a2, (0x14641400 >> 16) /* 33D334 E0028544 34C61400 */ ori $a2, $a2, (0x14641400 & 0xFFFF) /* 33D338 E0028548 AFB300E4 */ sw $s3, 0xE4($sp) /* 33D33C E002854C 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 33D340 E0028550 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 33D344 E0028554 AFBF00F8 */ sw $ra, 0xF8($sp) /* 33D348 E0028558 AFB600F0 */ sw $s6, 0xF0($sp) /* 33D34C E002855C AFB500EC */ sw $s5, 0xEC($sp) /* 33D350 E0028560 AFB400E8 */ sw $s4, 0xE8($sp) /* 33D354 E0028564 AFB200E0 */ sw $s2, 0xE0($sp) /* 33D358 E0028568 AFB100DC */ sw $s1, 0xDC($sp) /* 33D35C E002856C AFB000D8 */ sw $s0, 0xD8($sp) /* 33D360 E0028570 F7B60108 */ sdc1 $f22, 0x108($sp) /* 33D364 E0028574 F7B40100 */ sdc1 $f20, 0x100($sp) /* 33D368 E0028578 8E650000 */ lw $a1, 0x0($s3) /* 33D36C E002857C 8EF0000C */ lw $s0, 0xC($s7) /* 33D370 E0028580 00A0202D */ daddu $a0, $a1, $zero /* 33D374 E0028584 24A50008 */ addiu $a1, $a1, 0x8 /* 33D378 E0028588 AE650000 */ sw $a1, 0x0($s3) /* 33D37C E002858C AC820000 */ sw $v0, 0x0($a0) /* 33D380 E0028590 24A20008 */ addiu $v0, $a1, 0x8 /* 33D384 E0028594 AE620000 */ sw $v0, 0x0($s3) /* 33D388 E0028598 8EE30010 */ lw $v1, 0x10($s7) /* 33D38C E002859C 24A20010 */ addiu $v0, $a1, 0x10 /* 33D390 E00285A0 AE620000 */ sw $v0, 0x0($s3) /* 33D394 E00285A4 8C62001C */ lw $v0, 0x1C($v1) /* 33D398 E00285A8 3C038000 */ lui $v1, (0x80000000 >> 16) /* 33D39C E00285AC 00431021 */ addu $v0, $v0, $v1 /* 33D3A0 E00285B0 AC820004 */ sw $v0, 0x4($a0) /* 33D3A4 E00285B4 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 33D3A8 E00285B8 ACA20000 */ sw $v0, 0x0($a1) /* 33D3AC E00285BC 3C020900 */ lui $v0, %hi(D_09001180_40E410) /* 33D3B0 E00285C0 24421180 */ addiu $v0, $v0, %lo(D_09001180_40E410) /* 33D3B4 E00285C4 ACA20004 */ sw $v0, 0x4($a1) /* 33D3B8 E00285C8 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 33D3BC E00285CC ACA20008 */ sw $v0, 0x8($a1) /* 33D3C0 E00285D0 92020027 */ lbu $v0, 0x27($s0) /* 33D3C4 E00285D4 24120001 */ addiu $s2, $zero, 0x1 /* 33D3C8 E00285D8 00461025 */ or $v0, $v0, $a2 /* 33D3CC E00285DC ACA2000C */ sw $v0, 0xC($a1) /* 33D3D0 E00285E0 8E050004 */ lw $a1, 0x4($s0) /* 33D3D4 E00285E4 8E060008 */ lw $a2, 0x8($s0) /* 33D3D8 E00285E8 8E07000C */ lw $a3, 0xC($s0) /* 33D3DC E00285EC 0C080108 */ jal shim_guTranslateF /* 33D3E0 E00285F0 27A40018 */ addiu $a0, $sp, 0x18 /* 33D3E4 E00285F4 27B10058 */ addiu $s1, $sp, 0x58 /* 33D3E8 E00285F8 4480A000 */ mtc1 $zero, $f20 /* 33D3EC E00285FC 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 33D3F0 E0028600 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 33D3F4 E0028604 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 33D3F8 E0028608 4481B000 */ mtc1 $at, $f22 /* 33D3FC E002860C 00031080 */ sll $v0, $v1, 2 /* 33D400 E0028610 00431021 */ addu $v0, $v0, $v1 /* 33D404 E0028614 00021080 */ sll $v0, $v0, 2 /* 33D408 E0028618 00431023 */ subu $v0, $v0, $v1 /* 33D40C E002861C 000218C0 */ sll $v1, $v0, 3 /* 33D410 E0028620 00431021 */ addu $v0, $v0, $v1 /* 33D414 E0028624 000210C0 */ sll $v0, $v0, 3 /* 33D418 E0028628 4406A000 */ mfc1 $a2, $f20 /* 33D41C E002862C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 33D420 E0028630 00220821 */ addu $at, $at, $v0 /* 33D424 E0028634 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 33D428 E0028638 4407B000 */ mfc1 $a3, $f22 /* 33D42C E002863C 46000007 */ neg.s $f0, $f0 /* 33D430 E0028640 44050000 */ mfc1 $a1, $f0 /* 33D434 E0028644 0220202D */ daddu $a0, $s1, $zero /* 33D438 E0028648 0C080104 */ jal shim_guRotateF /* 33D43C E002864C E7B40010 */ swc1 $f20, 0x10($sp) /* 33D440 E0028650 0220202D */ daddu $a0, $s1, $zero /* 33D444 E0028654 27A50018 */ addiu $a1, $sp, 0x18 /* 33D448 E0028658 0C080114 */ jal shim_guMtxCatF /* 33D44C E002865C 27A60098 */ addiu $a2, $sp, 0x98 /* 33D450 E0028660 8EE20008 */ lw $v0, 0x8($s7) /* 33D454 E0028664 0242102A */ slt $v0, $s2, $v0 /* 33D458 E0028668 1040004E */ beqz $v0, .LE00287A4 /* 33D45C E002866C 26100030 */ addiu $s0, $s0, 0x30 /* 33D460 E0028670 3C16800A */ lui $s6, %hi(gDisplayContext) /* 33D464 E0028674 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 33D468 E0028678 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 33D46C E002867C 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 33D470 E0028680 3C140001 */ lui $s4, (0x11630 >> 16) /* 33D474 E0028684 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 33D478 E0028688 26100020 */ addiu $s0, $s0, 0x20 .LE002868C: /* 33D47C E002868C 0220202D */ daddu $a0, $s1, $zero /* 33D480 E0028690 8E05FFE4 */ lw $a1, -0x1C($s0) /* 33D484 E0028694 8E06FFE8 */ lw $a2, -0x18($s0) /* 33D488 E0028698 8E07FFEC */ lw $a3, -0x14($s0) /* 33D48C E002869C 0C080108 */ jal shim_guTranslateF /* 33D490 E00286A0 26520001 */ addiu $s2, $s2, 0x1 /* 33D494 E00286A4 0220202D */ daddu $a0, $s1, $zero /* 33D498 E00286A8 27A50098 */ addiu $a1, $sp, 0x98 /* 33D49C E00286AC 0C080114 */ jal shim_guMtxCatF /* 33D4A0 E00286B0 27A60018 */ addiu $a2, $sp, 0x18 /* 33D4A4 E00286B4 E7B60010 */ swc1 $f22, 0x10($sp) /* 33D4A8 E00286B8 8E05FFF8 */ lw $a1, -0x8($s0) /* 33D4AC E00286BC 4406A000 */ mfc1 $a2, $f20 /* 33D4B0 E00286C0 4407A000 */ mfc1 $a3, $f20 /* 33D4B4 E00286C4 0C080104 */ jal shim_guRotateF /* 33D4B8 E00286C8 0220202D */ daddu $a0, $s1, $zero /* 33D4BC E00286CC 0220202D */ daddu $a0, $s1, $zero /* 33D4C0 E00286D0 27A50018 */ addiu $a1, $sp, 0x18 /* 33D4C4 E00286D4 0C080114 */ jal shim_guMtxCatF /* 33D4C8 E00286D8 00A0302D */ daddu $a2, $a1, $zero /* 33D4CC E00286DC 0220202D */ daddu $a0, $s1, $zero /* 33D4D0 E00286E0 E7B40010 */ swc1 $f20, 0x10($sp) /* 33D4D4 E00286E4 8E050000 */ lw $a1, 0x0($s0) /* 33D4D8 E00286E8 4406A000 */ mfc1 $a2, $f20 /* 33D4DC E00286EC 4407B000 */ mfc1 $a3, $f22 /* 33D4E0 E00286F0 0C080104 */ jal shim_guRotateF /* 33D4E4 E00286F4 26100030 */ addiu $s0, $s0, 0x30 /* 33D4E8 E00286F8 0220202D */ daddu $a0, $s1, $zero /* 33D4EC E00286FC 27A50018 */ addiu $a1, $sp, 0x18 /* 33D4F0 E0028700 0C080114 */ jal shim_guMtxCatF /* 33D4F4 E0028704 00A0302D */ daddu $a2, $a1, $zero /* 33D4F8 E0028708 27A40018 */ addiu $a0, $sp, 0x18 /* 33D4FC E002870C 96A50000 */ lhu $a1, 0x0($s5) /* 33D500 E0028710 8EC20000 */ lw $v0, 0x0($s6) /* 33D504 E0028714 00052980 */ sll $a1, $a1, 6 /* 33D508 E0028718 00B42821 */ addu $a1, $a1, $s4 /* 33D50C E002871C 0C080118 */ jal shim_guMtxF2L /* 33D510 E0028720 00452821 */ addu $a1, $v0, $a1 /* 33D514 E0028724 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 33D518 E0028728 8E640000 */ lw $a0, 0x0($s3) /* 33D51C E002872C 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 33D520 E0028730 0080282D */ daddu $a1, $a0, $zero /* 33D524 E0028734 24840008 */ addiu $a0, $a0, 0x8 /* 33D528 E0028738 AE640000 */ sw $a0, 0x0($s3) /* 33D52C E002873C 96A20000 */ lhu $v0, 0x0($s5) /* 33D530 E0028740 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 33D534 E0028744 ACA30000 */ sw $v1, 0x0($a1) /* 33D538 E0028748 24430001 */ addiu $v1, $v0, 0x1 /* 33D53C E002874C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 33D540 E0028750 00021180 */ sll $v0, $v0, 6 /* 33D544 E0028754 A6A30000 */ sh $v1, 0x0($s5) /* 33D548 E0028758 8EC30000 */ lw $v1, 0x0($s6) /* 33D54C E002875C 00541021 */ addu $v0, $v0, $s4 /* 33D550 E0028760 00621821 */ addu $v1, $v1, $v0 /* 33D554 E0028764 24820008 */ addiu $v0, $a0, 0x8 /* 33D558 E0028768 ACA30004 */ sw $v1, 0x4($a1) /* 33D55C E002876C AE620000 */ sw $v0, 0x0($s3) /* 33D560 E0028770 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 33D564 E0028774 AC820000 */ sw $v0, 0x0($a0) /* 33D568 E0028778 3C020900 */ lui $v0, %hi(D_09001230_40E4C0) /* 33D56C E002877C 24421230 */ addiu $v0, $v0, %lo(D_09001230_40E4C0) /* 33D570 E0028780 AC820004 */ sw $v0, 0x4($a0) /* 33D574 E0028784 24020040 */ addiu $v0, $zero, 0x40 /* 33D578 E0028788 AC860008 */ sw $a2, 0x8($a0) /* 33D57C E002878C AC82000C */ sw $v0, 0xC($a0) /* 33D580 E0028790 8EE20008 */ lw $v0, 0x8($s7) /* 33D584 E0028794 24840010 */ addiu $a0, $a0, 0x10 /* 33D588 E0028798 0242102A */ slt $v0, $s2, $v0 /* 33D58C E002879C 1440FFBB */ bnez $v0, .LE002868C /* 33D590 E00287A0 AE640000 */ sw $a0, 0x0($s3) .LE00287A4: /* 33D594 E00287A4 8FBF00F8 */ lw $ra, 0xF8($sp) /* 33D598 E00287A8 8FB700F4 */ lw $s7, 0xF4($sp) /* 33D59C E00287AC 8FB600F0 */ lw $s6, 0xF0($sp) /* 33D5A0 E00287B0 8FB500EC */ lw $s5, 0xEC($sp) /* 33D5A4 E00287B4 8FB400E8 */ lw $s4, 0xE8($sp) /* 33D5A8 E00287B8 8FB300E4 */ lw $s3, 0xE4($sp) /* 33D5AC E00287BC 8FB200E0 */ lw $s2, 0xE0($sp) /* 33D5B0 E00287C0 8FB100DC */ lw $s1, 0xDC($sp) /* 33D5B4 E00287C4 8FB000D8 */ lw $s0, 0xD8($sp) /* 33D5B8 E00287C8 D7B60108 */ ldc1 $f22, 0x108($sp) /* 33D5BC E00287CC D7B40100 */ ldc1 $f20, 0x100($sp) /* 33D5C0 E00287D0 03E00008 */ jr $ra /* 33D5C4 E00287D4 27BD0110 */ addiu $sp, $sp, 0x110 /* 33D5C8 E00287D8 00000000 */ nop /* 33D5CC E00287DC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void drop_leaves_appendGfx(void* effect) { DropLeavesFXData* part = ((EffectInstance*)effect)->data.dropLeaves; Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; s32 i; gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09001180_33E790); gDPSetPrimColor(gMainGfxPos++, 0, 0, 20, 100, 20, part->unk_24); shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp98); part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { shim_guTranslateF(sp58, part->unk_04, part->unk_08, part->unk_0C); shim_guMtxCatF(sp58, sp98, sp18); shim_guRotateF(sp58, part->unk_18, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, part->unk_20, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_09001230_33E840); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_amb_restore_voices /* 2D72C 8005232C 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 2D730 80052330 AFB60028 */ sw $s6, 0x28($sp) /* 2D734 80052334 0080B02D */ daddu $s6, $a0, $zero /* 2D738 80052338 AFB40020 */ sw $s4, 0x20($sp) /* 2D73C 8005233C 00A0A02D */ daddu $s4, $a1, $zero /* 2D740 80052340 AFBF0030 */ sw $ra, 0x30($sp) /* 2D744 80052344 AFB7002C */ sw $s7, 0x2C($sp) /* 2D748 80052348 AFB50024 */ sw $s5, 0x24($sp) /* 2D74C 8005234C AFB3001C */ sw $s3, 0x1C($sp) /* 2D750 80052350 AFB20018 */ sw $s2, 0x18($sp) /* 2D754 80052354 AFB10014 */ sw $s1, 0x14($sp) /* 2D758 80052358 AFB00010 */ sw $s0, 0x10($sp) /* 2D75C 8005235C 92820025 */ lbu $v0, 0x25($s4) /* 2D760 80052360 8ED70000 */ lw $s7, 0x0($s6) /* 2D764 80052364 14400081 */ bnez $v0, .L8005256C /* 2D768 80052368 0000A82D */ daddu $s5, $zero, $zero .L8005236C: /* 2D76C 8005236C 00151080 */ sll $v0, $s5, 2 /* 2D770 80052370 244201D4 */ addiu $v0, $v0, 0x1D4 /* 2D774 80052374 02829821 */ addu $s3, $s4, $v0 /* 2D778 80052378 92620001 */ lbu $v0, 0x1($s3) /* 2D77C 8005237C 50400076 */ beql $v0, $zero, .L80052558 /* 2D780 80052380 26B50001 */ addiu $s5, $s5, 0x1 /* 2D784 80052384 92620000 */ lbu $v0, 0x0($s3) /* 2D788 80052388 8E900030 */ lw $s0, 0x30($s4) /* 2D78C 8005238C 8E840034 */ lw $a0, 0x34($s4) /* 2D790 80052390 00021880 */ sll $v1, $v0, 2 /* 2D794 80052394 00621821 */ addu $v1, $v1, $v0 /* 2D798 80052398 000318C0 */ sll $v1, $v1, 3 /* 2D79C 8005239C 24630044 */ addiu $v1, $v1, 0x44 /* 2D7A0 800523A0 0204102B */ sltu $v0, $s0, $a0 /* 2D7A4 800523A4 10400012 */ beqz $v0, .L800523F0 /* 2D7A8 800523A8 02839021 */ addu $s2, $s4, $v1 /* 2D7AC 800523AC 001010C0 */ sll $v0, $s0, 3 /* 2D7B0 800523B0 00501021 */ addu $v0, $v0, $s0 /* 2D7B4 800523B4 000210C0 */ sll $v0, $v0, 3 /* 2D7B8 800523B8 24431320 */ addiu $v1, $v0, 0x1320 .L800523BC: /* 2D7BC 800523BC 02E38821 */ addu $s1, $s7, $v1 /* 2D7C0 800523C0 92220045 */ lbu $v0, 0x45($s1) /* 2D7C4 800523C4 10400005 */ beqz $v0, .L800523DC /* 2D7C8 800523C8 00000000 */ nop /* 2D7CC 800523CC 26100001 */ addiu $s0, $s0, 0x1 /* 2D7D0 800523D0 0204102B */ sltu $v0, $s0, $a0 /* 2D7D4 800523D4 1440FFF9 */ bnez $v0, .L800523BC /* 2D7D8 800523D8 24630048 */ addiu $v1, $v1, 0x48 .L800523DC: /* 2D7DC 800523DC 8E820034 */ lw $v0, 0x34($s4) /* 2D7E0 800523E0 0202102B */ sltu $v0, $s0, $v0 /* 2D7E4 800523E4 1440001C */ bnez $v0, .L80052458 /* 2D7E8 800523E8 00000000 */ nop /* 2D7EC 800523EC 8E900030 */ lw $s0, 0x30($s4) .L800523F0: /* 2D7F0 800523F0 8E820034 */ lw $v0, 0x34($s4) /* 2D7F4 800523F4 0202102B */ sltu $v0, $s0, $v0 /* 2D7F8 800523F8 10400056 */ beqz $v0, .L80052554 /* 2D7FC 800523FC 001010C0 */ sll $v0, $s0, 3 /* 2D800 80052400 00501021 */ addu $v0, $v0, $s0 /* 2D804 80052404 000210C0 */ sll $v0, $v0, 3 /* 2D808 80052408 24441320 */ addiu $a0, $v0, 0x1320 .L8005240C: /* 2D80C 8005240C 02E48821 */ addu $s1, $s7, $a0 /* 2D810 80052410 92220045 */ lbu $v0, 0x45($s1) /* 2D814 80052414 92C30022 */ lbu $v1, 0x22($s6) /* 2D818 80052418 0043102B */ sltu $v0, $v0, $v1 /* 2D81C 8005241C 50400006 */ beql $v0, $zero, .L80052438 /* 2D820 80052420 26100001 */ addiu $s0, $s0, 0x1 /* 2D824 80052424 0220202D */ daddu $a0, $s1, $zero /* 2D828 80052428 0C014E31 */ jal au_reset_voice /* 2D82C 8005242C 320500FF */ andi $a1, $s0, 0xFF /* 2D830 80052430 08014912 */ j .L80052448 /* 2D834 80052434 00000000 */ nop .L80052438: /* 2D838 80052438 8E820034 */ lw $v0, 0x34($s4) /* 2D83C 8005243C 0202102B */ sltu $v0, $s0, $v0 /* 2D840 80052440 1440FFF2 */ bnez $v0, .L8005240C /* 2D844 80052444 24840048 */ addiu $a0, $a0, 0x48 .L80052448: /* 2D848 80052448 8E820034 */ lw $v0, 0x34($s4) /* 2D84C 8005244C 0202102B */ sltu $v0, $s0, $v0 /* 2D850 80052450 50400041 */ beql $v0, $zero, .L80052558 /* 2D854 80052454 26B50001 */ addiu $s5, $s5, 0x1 .L80052458: /* 2D858 80052458 8E850030 */ lw $a1, 0x30($s4) /* 2D85C 8005245C 92640000 */ lbu $a0, 0x0($s3) /* 2D860 80052460 8E830014 */ lw $v1, 0x14($s4) /* 2D864 80052464 92620001 */ lbu $v0, 0x1($s3) /* 2D868 80052468 02052823 */ subu $a1, $s0, $a1 /* 2D86C 8005246C 000528C0 */ sll $a1, $a1, 3 /* 2D870 80052470 24A507B4 */ addiu $a1, $a1, 0x7B4 /* 2D874 80052474 02C52821 */ addu $a1, $s6, $a1 /* 2D878 80052478 00042400 */ sll $a0, $a0, 16 /* 2D87C 8005247C 00641821 */ addu $v1, $v1, $a0 /* 2D880 80052480 00021200 */ sll $v0, $v0, 8 /* 2D884 80052484 00621821 */ addu $v1, $v1, $v0 /* 2D888 80052488 ACA30000 */ sw $v1, 0x0($a1) /* 2D88C 8005248C 92630001 */ lbu $v1, 0x1($s3) /* 2D890 80052490 8E440000 */ lw $a0, 0x0($s2) /* 2D894 80052494 3063007F */ andi $v1, $v1, 0x7F /* 2D898 80052498 00031040 */ sll $v0, $v1, 1 /* 2D89C 8005249C 00431021 */ addu $v0, $v0, $v1 /* 2D8A0 800524A0 000210C0 */ sll $v0, $v0, 3 /* 2D8A4 800524A4 00431021 */ addu $v0, $v0, $v1 /* 2D8A8 800524A8 9483001E */ lhu $v1, 0x1E($a0) /* 2D8AC 800524AC 00021080 */ sll $v0, $v0, 2 /* 2D8B0 800524B0 00431023 */ subu $v0, $v0, $v1 /* 2D8B4 800524B4 A4A20004 */ sh $v0, 0x4($a1) /* 2D8B8 800524B8 92630002 */ lbu $v1, 0x2($s3) /* 2D8BC 800524BC 3063007F */ andi $v1, $v1, 0x7F /* 2D8C0 800524C0 A0A30006 */ sb $v1, 0x6($a1) /* 2D8C4 800524C4 82840038 */ lb $a0, 0x38($s4) /* 2D8C8 800524C8 86420018 */ lh $v0, 0x18($s2) /* 2D8CC 800524CC 00820018 */ mult $a0, $v0 /* 2D8D0 800524D0 00003012 */ mflo $a2 /* 2D8D4 800524D4 00000000 */ nop /* 2D8D8 800524D8 00000000 */ nop /* 2D8DC 800524DC 00C30018 */ mult $a2, $v1 /* 2D8E0 800524E0 00003012 */ mflo $a2 /* 2D8E4 800524E4 00061383 */ sra $v0, $a2, 14 /* 2D8E8 800524E8 A6220040 */ sh $v0, 0x40($s1) /* 2D8EC 800524EC 84A20004 */ lh $v0, 0x4($a1) /* 2D8F0 800524F0 8644000C */ lh $a0, 0xC($s2) /* 2D8F4 800524F4 0C014E3E */ jal au_compute_pitch_ratio /* 2D8F8 800524F8 00442021 */ addu $a0, $v0, $a0 /* 2D8FC 800524FC 8E420000 */ lw $v0, 0x0($s2) /* 2D900 80052500 C4420020 */ lwc1 $f2, 0x20($v0) /* 2D904 80052504 46020002 */ mul.s $f0, $f0, $f2 /* 2D908 80052508 00000000 */ nop /* 2D90C 8005250C E6200004 */ swc1 $f0, 0x4($s1) /* 2D910 80052510 92420024 */ lbu $v0, 0x24($s2) /* 2D914 80052514 A222000E */ sb $v0, 0xE($s1) /* 2D918 80052518 92420025 */ lbu $v0, 0x25($s2) /* 2D91C 8005251C A222000F */ sb $v0, 0xF($s1) /* 2D920 80052520 8E420000 */ lw $v0, 0x0($s2) /* 2D924 80052524 AE220000 */ sw $v0, 0x0($s1) /* 2D928 80052528 92C20023 */ lbu $v0, 0x23($s6) /* 2D92C 8005252C A2220010 */ sb $v0, 0x10($s1) /* 2D930 80052530 8E420004 */ lw $v0, 0x4($s2) /* 2D934 80052534 AE220014 */ sw $v0, 0x14($s1) /* 2D938 80052538 8E430008 */ lw $v1, 0x8($s2) /* 2D93C 8005253C 24020002 */ addiu $v0, $zero, 0x2 /* 2D940 80052540 A2220043 */ sb $v0, 0x43($s1) /* 2D944 80052544 AE230018 */ sw $v1, 0x18($s1) /* 2D948 80052548 92C20022 */ lbu $v0, 0x22($s6) /* 2D94C 8005254C A2220045 */ sb $v0, 0x45($s1) /* 2D950 80052550 A2220044 */ sb $v0, 0x44($s1) .L80052554: /* 2D954 80052554 26B50001 */ addiu $s5, $s5, 0x1 .L80052558: /* 2D958 80052558 2EA20004 */ sltiu $v0, $s5, 0x4 /* 2D95C 8005255C A2600000 */ sb $zero, 0x0($s3) /* 2D960 80052560 A2600001 */ sb $zero, 0x1($s3) /* 2D964 80052564 1440FF81 */ bnez $v0, .L8005236C /* 2D968 80052568 A2600002 */ sb $zero, 0x2($s3) .L8005256C: /* 2D96C 8005256C 8FBF0030 */ lw $ra, 0x30($sp) /* 2D970 80052570 8FB7002C */ lw $s7, 0x2C($sp) /* 2D974 80052574 8FB60028 */ lw $s6, 0x28($sp) /* 2D978 80052578 8FB50024 */ lw $s5, 0x24($sp) /* 2D97C 8005257C 8FB40020 */ lw $s4, 0x20($sp) /* 2D980 80052580 8FB3001C */ lw $s3, 0x1C($sp) /* 2D984 80052584 8FB20018 */ lw $s2, 0x18($sp) /* 2D988 80052588 8FB10014 */ lw $s1, 0x14($sp) /* 2D98C 8005258C 8FB00010 */ lw $s0, 0x10($sp) /* 2D990 80052590 03E00008 */ jr $ra /* 2D994 80052594 27BD0038 */ addiu $sp, $sp, 0x38 /* 2D998 80052598 00000000 */ nop /* 2D99C 8005259C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void au_amb_restore_voices(AmbienceManager* manager, AmbiencePlayer* player) { AuGlobals* globals; AuVoice* voice; AmbienceSavedVoice* savedVoice; AmbienceVoiceState* voiceState; AmbienceTrack* track; u32 i, j; globals = manager->globals; if (player->playState == AMB_PLAYER_PLAYING) { for (i = 0; i < ARRAY_COUNT(player->savedVoices); i++) { savedVoice = &player->savedVoices[i]; if (savedVoice->tune != 0) { track = &player->tracks[savedVoice->trackIndex]; // find first free voice for (j = player->firstVoiceIdx; j < player->lastVoiceIdx; j++) { voice = &globals->voices[j]; if (voice->priority == AU_PRIORITY_FREE) { break; } } // try stealing a voice with lower priority if (j >= player->lastVoiceIdx) { for (j = player->firstVoiceIdx; j < player->lastVoiceIdx; j++) { voice = &globals->voices[j]; if (voice->priority < manager->priority) { au_reset_voice(voice, j); break; } } } if (j < player->lastVoiceIdx) { voiceState = &manager->voiceStates[j - player->firstVoiceIdx]; voiceState->info.all = player->id.all + (savedVoice->trackIndex << 0x10) + (savedVoice->tune << 8); voiceState->pitch = (savedVoice->tune & 0x7F) * 100 - track->instrument->keyBase; voiceState->volume = savedVoice->volume & 0x7F; voice->clientVolume = ((player->fadeVolume >> 0x18) * (track->volumeLerp.current >> 0x10) * voiceState->volume) >> 0xE; voice->pitchRatio = au_compute_pitch_ratio(voiceState->pitch + (track->tuneLerp.current >> 0x10)) * track->instrument->pitchRatio; voice->pan = track->pan; voice->reverb = track->reverb; voice->instrument = track->instrument; voice->busId = manager->busId; voice->envelope.cmdListPress = track->envelope.cmdListPress; voice->envelope.cmdListRelease = track->envelope.cmdListRelease; voice->syncFlags = AU_VOICE_SYNC_FLAG_ALL; voice->priority = manager->priority; voice->clientPriority = voice->priority; } } savedVoice->trackIndex = 0; savedVoice->tune = 0; savedVoice->volume = 0; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel butterflies_appendGfx /* 3AAD24 E00AA404 27BDFF40 */ addiu $sp, $sp, -0xC0 /* 3AAD28 E00AA408 3C03DB06 */ lui $v1, (0xDB060024 >> 16) /* 3AAD2C E00AA40C AFB1009C */ sw $s1, 0x9C($sp) /* 3AAD30 E00AA410 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 3AAD34 E00AA414 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 3AAD38 E00AA418 34630024 */ ori $v1, $v1, (0xDB060024 & 0xFFFF) /* 3AAD3C E00AA41C AFB700B4 */ sw $s7, 0xB4($sp) /* 3AAD40 E00AA420 3C17E700 */ lui $s7, (0xE7000000 >> 16) /* 3AAD44 E00AA424 AFBF00B8 */ sw $ra, 0xB8($sp) /* 3AAD48 E00AA428 AFB600B0 */ sw $s6, 0xB0($sp) /* 3AAD4C E00AA42C AFB500AC */ sw $s5, 0xAC($sp) /* 3AAD50 E00AA430 AFB400A8 */ sw $s4, 0xA8($sp) /* 3AAD54 E00AA434 AFB300A4 */ sw $s3, 0xA4($sp) /* 3AAD58 E00AA438 AFB200A0 */ sw $s2, 0xA0($sp) /* 3AAD5C E00AA43C AFB00098 */ sw $s0, 0x98($sp) /* 3AAD60 E00AA440 8E250000 */ lw $a1, 0x0($s1) /* 3AAD64 E00AA444 8C93000C */ lw $s3, 0xC($a0) /* 3AAD68 E00AA448 00A0102D */ daddu $v0, $a1, $zero /* 3AAD6C E00AA44C 8E720024 */ lw $s2, 0x24($s3) /* 3AAD70 E00AA450 8E750000 */ lw $s5, 0x0($s3) /* 3AAD74 E00AA454 24A50008 */ addiu $a1, $a1, 0x8 /* 3AAD78 E00AA458 AC570000 */ sw $s7, 0x0($v0) /* 3AAD7C E00AA45C AC400004 */ sw $zero, 0x4($v0) /* 3AAD80 E00AA460 ACA30000 */ sw $v1, 0x0($a1) /* 3AAD84 E00AA464 8C820010 */ lw $v0, 0x10($a0) /* 3AAD88 E00AA468 AE250000 */ sw $a1, 0x0($s1) /* 3AAD8C E00AA46C 8C42001C */ lw $v0, 0x1C($v0) /* 3AAD90 E00AA470 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3AAD94 E00AA474 00431021 */ addu $v0, $v0, $v1 /* 3AAD98 E00AA478 ACA20004 */ sw $v0, 0x4($a1) /* 3AAD9C E00AA47C 8E62002C */ lw $v0, 0x2C($s3) /* 3AADA0 E00AA480 24A50008 */ addiu $a1, $a1, 0x8 /* 3AADA4 E00AA484 AE250000 */ sw $a1, 0x0($s1) /* 3AADA8 E00AA488 3C01E00B */ lui $at, (0xE00B0000 >> 16) /* 3AADAC E00AA48C 00220821 */ addu $at, $at, $v0 /* 3AADB0 E00AA490 8022A6EC */ lb $v0, -0x5914($at) /* 3AADB4 E00AA494 3C013E99 */ lui $at, (0x3E99999A >> 16) /* 3AADB8 E00AA498 3421999A */ ori $at, $at, (0x3E99999A & 0xFFFF) /* 3AADBC E00AA49C 44811000 */ mtc1 $at, $f2 /* 3AADC0 E00AA4A0 44820000 */ mtc1 $v0, $f0 /* 3AADC4 E00AA4A4 00000000 */ nop /* 3AADC8 E00AA4A8 46800020 */ cvt.s.w $f0, $f0 /* 3AADCC E00AA4AC 46020002 */ mul.s $f0, $f0, $f2 /* 3AADD0 E00AA4B0 00000000 */ nop /* 3AADD4 E00AA4B4 C6620010 */ lwc1 $f2, 0x10($s3) /* 3AADD8 E00AA4B8 46001080 */ add.s $f2, $f2, $f0 /* 3AADDC E00AA4BC 8E65000C */ lw $a1, 0xC($s3) /* 3AADE0 E00AA4C0 8E670014 */ lw $a3, 0x14($s3) /* 3AADE4 E00AA4C4 44061000 */ mfc1 $a2, $f2 /* 3AADE8 E00AA4C8 0C080108 */ jal shim_guTranslateF /* 3AADEC E00AA4CC 27A40018 */ addiu $a0, $sp, 0x18 /* 3AADF0 E00AA4D0 3C160001 */ lui $s6, (0x11630 >> 16) /* 3AADF4 E00AA4D4 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* 3AADF8 E00AA4D8 44800000 */ mtc1 $zero, $f0 /* 3AADFC E00AA4DC 27B00058 */ addiu $s0, $sp, 0x58 /* 3AAE00 E00AA4E0 E7A00010 */ swc1 $f0, 0x10($sp) /* 3AAE04 E00AA4E4 8E650028 */ lw $a1, 0x28($s3) /* 3AAE08 E00AA4E8 44060000 */ mfc1 $a2, $f0 /* 3AAE0C E00AA4EC 0C080104 */ jal shim_guRotateF /* 3AAE10 E00AA4F0 0200202D */ daddu $a0, $s0, $zero /* 3AAE14 E00AA4F4 0200202D */ daddu $a0, $s0, $zero /* 3AAE18 E00AA4F8 27A50018 */ addiu $a1, $sp, 0x18 /* 3AAE1C E00AA4FC 0C080114 */ jal shim_guMtxCatF /* 3AAE20 E00AA500 00A0302D */ daddu $a2, $a1, $zero /* 3AAE24 E00AA504 3C013CA3 */ lui $at, (0x3CA3D70A >> 16) /* 3AAE28 E00AA508 3421D70A */ ori $at, $at, (0x3CA3D70A & 0xFFFF) /* 3AAE2C E00AA50C 44810000 */ mtc1 $at, $f0 /* 3AAE30 E00AA510 36D61630 */ ori $s6, $s6, (0x11630 & 0xFFFF) /* 3AAE34 E00AA514 44050000 */ mfc1 $a1, $f0 /* 3AAE38 E00AA518 0200202D */ daddu $a0, $s0, $zero /* 3AAE3C E00AA51C 00A0302D */ daddu $a2, $a1, $zero /* 3AAE40 E00AA520 0C080110 */ jal shim_guScaleF /* 3AAE44 E00AA524 00A0382D */ daddu $a3, $a1, $zero /* 3AAE48 E00AA528 0200202D */ daddu $a0, $s0, $zero /* 3AAE4C E00AA52C 27A50018 */ addiu $a1, $sp, 0x18 /* 3AAE50 E00AA530 0C080114 */ jal shim_guMtxCatF /* 3AAE54 E00AA534 00A0302D */ daddu $a2, $a1, $zero /* 3AAE58 E00AA538 27A40018 */ addiu $a0, $sp, 0x18 /* 3AAE5C E00AA53C 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3AAE60 E00AA540 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3AAE64 E00AA544 3C14800A */ lui $s4, %hi(gDisplayContext) /* 3AAE68 E00AA548 2694A674 */ addiu $s4, $s4, %lo(gDisplayContext) /* 3AAE6C E00AA54C 96050000 */ lhu $a1, 0x0($s0) /* 3AAE70 E00AA550 8E820000 */ lw $v0, 0x0($s4) /* 3AAE74 E00AA554 00052980 */ sll $a1, $a1, 6 /* 3AAE78 E00AA558 00B62821 */ addu $a1, $a1, $s6 /* 3AAE7C E00AA55C 0C080118 */ jal shim_guMtxF2L /* 3AAE80 E00AA560 00452821 */ addu $a1, $v0, $a1 /* 3AAE84 E00AA564 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3AAE88 E00AA568 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3AAE8C E00AA56C 3C060100 */ lui $a2, (0x100600C >> 16) /* 3AAE90 E00AA570 34C6600C */ ori $a2, $a2, (0x100600C & 0xFFFF) /* 3AAE94 E00AA574 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 3AAE98 E00AA578 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 3AAE9C E00AA57C 325200FF */ andi $s2, $s2, 0xFF /* 3AAEA0 E00AA580 0015A880 */ sll $s5, $s5, 2 /* 3AAEA4 E00AA584 8E240000 */ lw $a0, 0x0($s1) /* 3AAEA8 E00AA588 96020000 */ lhu $v0, 0x0($s0) /* 3AAEAC E00AA58C 0080282D */ daddu $a1, $a0, $zero /* 3AAEB0 E00AA590 24840008 */ addiu $a0, $a0, 0x8 /* 3AAEB4 E00AA594 AE240000 */ sw $a0, 0x0($s1) /* 3AAEB8 E00AA598 ACA30000 */ sw $v1, 0x0($a1) /* 3AAEBC E00AA59C 24430001 */ addiu $v1, $v0, 0x1 /* 3AAEC0 E00AA5A0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3AAEC4 E00AA5A4 00021180 */ sll $v0, $v0, 6 /* 3AAEC8 E00AA5A8 A6030000 */ sh $v1, 0x0($s0) /* 3AAECC E00AA5AC 8E830000 */ lw $v1, 0x0($s4) /* 3AAED0 E00AA5B0 00561021 */ addu $v0, $v0, $s6 /* 3AAED4 E00AA5B4 00621821 */ addu $v1, $v1, $v0 /* 3AAED8 E00AA5B8 24820008 */ addiu $v0, $a0, 0x8 /* 3AAEDC E00AA5BC ACA30004 */ sw $v1, 0x4($a1) /* 3AAEE0 E00AA5C0 AE220000 */ sw $v0, 0x0($s1) /* 3AAEE4 E00AA5C4 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3AAEE8 E00AA5C8 AC820000 */ sw $v0, 0x0($a0) /* 3AAEEC E00AA5CC 00121600 */ sll $v0, $s2, 24 /* 3AAEF0 E00AA5D0 00121C00 */ sll $v1, $s2, 16 /* 3AAEF4 E00AA5D4 00431025 */ or $v0, $v0, $v1 /* 3AAEF8 E00AA5D8 00129200 */ sll $s2, $s2, 8 /* 3AAEFC E00AA5DC 00521025 */ or $v0, $v0, $s2 /* 3AAF00 E00AA5E0 344200FF */ ori $v0, $v0, 0xFF /* 3AAF04 E00AA5E4 AC820004 */ sw $v0, 0x4($a0) /* 3AAF08 E00AA5E8 24820010 */ addiu $v0, $a0, 0x10 /* 3AAF0C E00AA5EC 3C03DE00 */ lui $v1, (0xDE000000 >> 16) /* 3AAF10 E00AA5F0 AE220000 */ sw $v0, 0x0($s1) /* 3AAF14 E00AA5F4 3C020900 */ lui $v0, %hi(D_09003880_410B10) /* 3AAF18 E00AA5F8 24423880 */ addiu $v0, $v0, %lo(D_09003880_410B10) /* 3AAF1C E00AA5FC AC82000C */ sw $v0, 0xC($a0) /* 3AAF20 E00AA600 24820018 */ addiu $v0, $a0, 0x18 /* 3AAF24 E00AA604 AC830008 */ sw $v1, 0x8($a0) /* 3AAF28 E00AA608 AE220000 */ sw $v0, 0x0($s1) /* 3AAF2C E00AA60C AC830010 */ sw $v1, 0x10($a0) /* 3AAF30 E00AA610 3C05E00B */ lui $a1, (0xE00B0000 >> 16) /* 3AAF34 E00AA614 00B52821 */ addu $a1, $a1, $s5 /* 3AAF38 E00AA618 8CA5A6C0 */ lw $a1, -0x5940($a1) /* 3AAF3C E00AA61C 24820020 */ addiu $v0, $a0, 0x20 /* 3AAF40 E00AA620 AE220000 */ sw $v0, 0x0($s1) /* 3AAF44 E00AA624 24820028 */ addiu $v0, $a0, 0x28 /* 3AAF48 E00AA628 AC860018 */ sw $a2, 0x18($a0) /* 3AAF4C E00AA62C AE220000 */ sw $v0, 0x0($s1) /* 3AAF50 E00AA630 24820030 */ addiu $v0, $a0, 0x30 /* 3AAF54 E00AA634 AE220000 */ sw $v0, 0x0($s1) /* 3AAF58 E00AA638 AC850014 */ sw $a1, 0x14($a0) /* 3AAF5C E00AA63C 8E65002C */ lw $a1, 0x2C($s3) /* 3AAF60 E00AA640 24820038 */ addiu $v0, $a0, 0x38 /* 3AAF64 E00AA644 AE220000 */ sw $v0, 0x0($s1) /* 3AAF68 E00AA648 3C020900 */ lui $v0, %hi(D_09003DC8_411058) /* 3AAF6C E00AA64C 24423DC8 */ addiu $v0, $v0, %lo(D_09003DC8_411058) /* 3AAF70 E00AA650 AC820024 */ sw $v0, 0x24($a0) /* 3AAF74 E00AA654 24020040 */ addiu $v0, $zero, 0x40 /* 3AAF78 E00AA658 AC830020 */ sw $v1, 0x20($a0) /* 3AAF7C E00AA65C 3C030900 */ lui $v1, %hi(D_09002D40_40FFD0) /* 3AAF80 E00AA660 24632D40 */ addiu $v1, $v1, %lo(D_09002D40_40FFD0) /* 3AAF84 E00AA664 AC870028 */ sw $a3, 0x28($a0) /* 3AAF88 E00AA668 AC82002C */ sw $v0, 0x2C($a0) /* 3AAF8C E00AA66C AC970030 */ sw $s7, 0x30($a0) /* 3AAF90 E00AA670 AC800034 */ sw $zero, 0x34($a0) /* 3AAF94 E00AA674 00051040 */ sll $v0, $a1, 1 /* 3AAF98 E00AA678 00451021 */ addu $v0, $v0, $a1 /* 3AAF9C E00AA67C 00021140 */ sll $v0, $v0, 5 /* 3AAFA0 E00AA680 00431021 */ addu $v0, $v0, $v1 /* 3AAFA4 E00AA684 AC82001C */ sw $v0, 0x1C($a0) /* 3AAFA8 E00AA688 8FBF00B8 */ lw $ra, 0xB8($sp) /* 3AAFAC E00AA68C 8FB700B4 */ lw $s7, 0xB4($sp) /* 3AAFB0 E00AA690 8FB600B0 */ lw $s6, 0xB0($sp) /* 3AAFB4 E00AA694 8FB500AC */ lw $s5, 0xAC($sp) /* 3AAFB8 E00AA698 8FB400A8 */ lw $s4, 0xA8($sp) /* 3AAFBC E00AA69C 8FB300A4 */ lw $s3, 0xA4($sp) /* 3AAFC0 E00AA6A0 8FB200A0 */ lw $s2, 0xA0($sp) /* 3AAFC4 E00AA6A4 8FB1009C */ lw $s1, 0x9C($sp) /* 3AAFC8 E00AA6A8 8FB00098 */ lw $s0, 0x98($sp) /* 3AAFCC E00AA6AC 03E00008 */ jr $ra /* 3AAFD0 E00AA6B0 27BD00C0 */ addiu $sp, $sp, 0xC0 /* 3AAFD4 E00AA6B4 00000000 */ nop /* 3AAFD8 E00AA6B8 00000000 */ nop /* 3AAFDC E00AA6BC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void butterflies_appendGfx(void* effect) { EffectInstance* effectTemp = effect; ButterfliesFXData* data = effectTemp->data.butterflies; Matrix4f sp18; Matrix4f sp58; s32 primColor = data->unk_24; s32 type = data->unk_00; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data)); shim_guTranslateF(sp18, data->unk_0C, data->unk_10 + D_E00AA6EC[data->unk_2C] * 0.3f, data->unk_14); shim_guRotateF(sp58, data->unk_28, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guScaleF(sp58, 0.02f, 0.02f, 0.02f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, primColor, primColor, primColor, 255); gSPDisplayList(gMainGfxPos++, D_09003880_3AE8B0); gSPDisplayList(gMainGfxPos++, D_E00AA6C0[type]); gSPVertex(gMainGfxPos++, &D_09002D40_3ADD70[data->unk_2C], 6, 0); gSPDisplayList(gMainGfxPos++, D_09003DC8_3AEDF8); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel npc_update_decoration_charged /* 180B0 8003CCB0 27BDFF60 */ addiu $sp, $sp, -0xA0 /* 180B4 8003CCB4 AFB60080 */ sw $s6, 0x80($sp) /* 180B8 8003CCB8 0080B02D */ daddu $s6, $a0, $zero /* 180BC 8003CCBC AFB1006C */ sw $s1, 0x6C($sp) /* 180C0 8003CCC0 00A0882D */ daddu $s1, $a1, $zero /* 180C4 8003CCC4 AFB00068 */ sw $s0, 0x68($sp) /* 180C8 8003CCC8 02D18021 */ addu $s0, $s6, $s1 /* 180CC 8003CCCC AFBF0084 */ sw $ra, 0x84($sp) /* 180D0 8003CCD0 AFB5007C */ sw $s5, 0x7C($sp) /* 180D4 8003CCD4 AFB40078 */ sw $s4, 0x78($sp) /* 180D8 8003CCD8 AFB30074 */ sw $s3, 0x74($sp) /* 180DC 8003CCDC AFB20070 */ sw $s2, 0x70($sp) /* 180E0 8003CCE0 F7B80098 */ sdc1 $f24, 0x98($sp) /* 180E4 8003CCE4 F7B60090 */ sdc1 $f22, 0x90($sp) /* 180E8 8003CCE8 F7B40088 */ sdc1 $f20, 0x88($sp) /* 180EC 8003CCEC 82020330 */ lb $v0, 0x330($s0) /* 180F0 8003CCF0 1440000B */ bnez $v0, .L8003CD20 /* 180F4 8003CCF4 24050011 */ addiu $a1, $zero, 0x11 /* 180F8 8003CCF8 24060014 */ addiu $a2, $zero, 0x14 /* 180FC 8003CCFC 240200FF */ addiu $v0, $zero, 0xFF /* 18100 8003CD00 AFA00010 */ sw $zero, 0x10($sp) /* 18104 8003CD04 AFA20014 */ sw $v0, 0x14($sp) /* 18108 8003CD08 AFA00018 */ sw $zero, 0x18($sp) /* 1810C 8003CD0C 8EC40024 */ lw $a0, 0x24($s6) /* 18110 8003CD10 0C0B7A25 */ jal set_npc_imgfx_all /* 18114 8003CD14 0000382D */ daddu $a3, $zero, $zero /* 18118 8003CD18 24020001 */ addiu $v0, $zero, 0x1 /* 1811C 8003CD1C A2020330 */ sb $v0, 0x330($s0) .L8003CD20: /* 18120 8003CD20 82030330 */ lb $v1, 0x330($s0) /* 18124 8003CD24 24020001 */ addiu $v0, $zero, 0x1 /* 18128 8003CD28 14620090 */ bne $v1, $v0, .L8003CF6C /* 1812C 8003CD2C 00511004 */ sllv $v0, $s1, $v0 /* 18130 8003CD30 02C22821 */ addu $a1, $s6, $v0 /* 18134 8003CD34 94A20332 */ lhu $v0, 0x332($a1) /* 18138 8003CD38 24420007 */ addiu $v0, $v0, 0x7 /* 1813C 8003CD3C 00021C00 */ sll $v1, $v0, 16 /* 18140 8003CD40 00032403 */ sra $a0, $v1, 16 /* 18144 8003CD44 A4A20332 */ sh $v0, 0x332($a1) /* 18148 8003CD48 28820168 */ slti $v0, $a0, 0x168 /* 1814C 8003CD4C 14400010 */ bnez $v0, .L8003CD90 /* 18150 8003CD50 0000802D */ daddu $s0, $zero, $zero /* 18154 8003CD54 3C02B60B */ lui $v0, (0xB60B60B7 >> 16) /* 18158 8003CD58 344260B7 */ ori $v0, $v0, (0xB60B60B7 & 0xFFFF) /* 1815C 8003CD5C 00820018 */ mult $a0, $v0 /* 18160 8003CD60 00031FC3 */ sra $v1, $v1, 31 /* 18164 8003CD64 00004010 */ mfhi $t0 /* 18168 8003CD68 01041021 */ addu $v0, $t0, $a0 /* 1816C 8003CD6C 00021203 */ sra $v0, $v0, 8 /* 18170 8003CD70 00431023 */ subu $v0, $v0, $v1 /* 18174 8003CD74 00021840 */ sll $v1, $v0, 1 /* 18178 8003CD78 00621821 */ addu $v1, $v1, $v0 /* 1817C 8003CD7C 00031100 */ sll $v0, $v1, 4 /* 18180 8003CD80 00431023 */ subu $v0, $v0, $v1 /* 18184 8003CD84 000210C0 */ sll $v0, $v0, 3 /* 18188 8003CD88 00821023 */ subu $v0, $a0, $v0 /* 1818C 8003CD8C A4A20332 */ sh $v0, 0x332($a1) .L8003CD90: /* 18190 8003CD90 00A0902D */ daddu $s2, $a1, $zero /* 18194 8003CD94 3C138000 */ lui $s3, (0x80000000 >> 16) /* 18198 8003CD98 0200882D */ daddu $s1, $s0, $zero /* 1819C 8003CD9C 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 181A0 8003CDA0 4481C800 */ mtc1 $at, $f25 /* 181A4 8003CDA4 4480C000 */ mtc1 $zero, $f24 /* 181A8 8003CDA8 3C014054 */ lui $at, (0x40540000 >> 16) /* 181AC 8003CDAC 4481B800 */ mtc1 $at, $f23 /* 181B0 8003CDB0 4480B000 */ mtc1 $zero, $f22 /* 181B4 8003CDB4 3C0141E0 */ lui $at, (0x41E00000 >> 16) /* 181B8 8003CDB8 4481A800 */ mtc1 $at, $f21 /* 181BC 8003CDBC 4480A000 */ mtc1 $zero, $f20 .L8003CDC0: /* 181C0 8003CDC0 96440332 */ lhu $a0, 0x332($s2) /* 181C4 8003CDC4 00912021 */ addu $a0, $a0, $s1 /* 181C8 8003CDC8 00042400 */ sll $a0, $a0, 16 /* 181CC 8003CDCC 0C00A4F5 */ jal cosine /* 181D0 8003CDD0 00042403 */ sra $a0, $a0, 16 /* 181D4 8003CDD4 46000021 */ cvt.d.s $f0, $f0 /* 181D8 8003CDD8 46380000 */ add.d $f0, $f0, $f24 /* 181DC 8003CDDC 46360002 */ mul.d $f0, $f0, $f22 /* 181E0 8003CDE0 00000000 */ nop /* 181E4 8003CDE4 27A20020 */ addiu $v0, $sp, 0x20 /* 181E8 8003CDE8 4620A03E */ c.le.d $f20, $f0 /* 181EC 8003CDEC 00000000 */ nop /* 181F0 8003CDF0 45010005 */ bc1t .L8003CE08 /* 181F4 8003CDF4 00501021 */ addu $v0, $v0, $s0 /* 181F8 8003CDF8 4620008D */ trunc.w.d $f2, $f0 /* 181FC 8003CDFC 44031000 */ mfc1 $v1, $f2 /* 18200 8003CE00 0800F388 */ j .L8003CE20 /* 18204 8003CE04 A0430000 */ sb $v1, 0x0($v0) .L8003CE08: /* 18208 8003CE08 46340001 */ sub.d $f0, $f0, $f20 /* 1820C 8003CE0C 4620008D */ trunc.w.d $f2, $f0 /* 18210 8003CE10 44031000 */ mfc1 $v1, $f2 /* 18214 8003CE14 00000000 */ nop /* 18218 8003CE18 00731825 */ or $v1, $v1, $s3 /* 1821C 8003CE1C A0430000 */ sb $v1, 0x0($v0) .L8003CE20: /* 18220 8003CE20 96440332 */ lhu $a0, 0x332($s2) /* 18224 8003CE24 00912021 */ addu $a0, $a0, $s1 /* 18228 8003CE28 2484002D */ addiu $a0, $a0, 0x2D /* 1822C 8003CE2C 00042400 */ sll $a0, $a0, 16 /* 18230 8003CE30 0C00A4F5 */ jal cosine /* 18234 8003CE34 00042403 */ sra $a0, $a0, 16 /* 18238 8003CE38 46000021 */ cvt.d.s $f0, $f0 /* 1823C 8003CE3C 46380000 */ add.d $f0, $f0, $f24 /* 18240 8003CE40 46360002 */ mul.d $f0, $f0, $f22 /* 18244 8003CE44 00000000 */ nop /* 18248 8003CE48 27A20038 */ addiu $v0, $sp, 0x38 /* 1824C 8003CE4C 4620A03E */ c.le.d $f20, $f0 /* 18250 8003CE50 00000000 */ nop /* 18254 8003CE54 45010005 */ bc1t .L8003CE6C /* 18258 8003CE58 00501021 */ addu $v0, $v0, $s0 /* 1825C 8003CE5C 4620008D */ trunc.w.d $f2, $f0 /* 18260 8003CE60 44031000 */ mfc1 $v1, $f2 /* 18264 8003CE64 0800F3A1 */ j .L8003CE84 /* 18268 8003CE68 A0430000 */ sb $v1, 0x0($v0) .L8003CE6C: /* 1826C 8003CE6C 46340001 */ sub.d $f0, $f0, $f20 /* 18270 8003CE70 4620008D */ trunc.w.d $f2, $f0 /* 18274 8003CE74 44031000 */ mfc1 $v1, $f2 /* 18278 8003CE78 00000000 */ nop /* 1827C 8003CE7C 00731825 */ or $v1, $v1, $s3 /* 18280 8003CE80 A0430000 */ sb $v1, 0x0($v0) .L8003CE84: /* 18284 8003CE84 96440332 */ lhu $a0, 0x332($s2) /* 18288 8003CE88 00912021 */ addu $a0, $a0, $s1 /* 1828C 8003CE8C 2484005A */ addiu $a0, $a0, 0x5A /* 18290 8003CE90 00042400 */ sll $a0, $a0, 16 /* 18294 8003CE94 0C00A4F5 */ jal cosine /* 18298 8003CE98 00042403 */ sra $a0, $a0, 16 /* 1829C 8003CE9C 46000021 */ cvt.d.s $f0, $f0 /* 182A0 8003CEA0 46380000 */ add.d $f0, $f0, $f24 /* 182A4 8003CEA4 46360002 */ mul.d $f0, $f0, $f22 /* 182A8 8003CEA8 00000000 */ nop /* 182AC 8003CEAC 27A20050 */ addiu $v0, $sp, 0x50 /* 182B0 8003CEB0 4620A03E */ c.le.d $f20, $f0 /* 182B4 8003CEB4 00000000 */ nop /* 182B8 8003CEB8 45010005 */ bc1t .L8003CED0 /* 182BC 8003CEBC 00501021 */ addu $v0, $v0, $s0 /* 182C0 8003CEC0 4620008D */ trunc.w.d $f2, $f0 /* 182C4 8003CEC4 44031000 */ mfc1 $v1, $f2 /* 182C8 8003CEC8 0800F3BA */ j .L8003CEE8 /* 182CC 8003CECC A0430000 */ sb $v1, 0x0($v0) .L8003CED0: /* 182D0 8003CED0 46340001 */ sub.d $f0, $f0, $f20 /* 182D4 8003CED4 4620008D */ trunc.w.d $f2, $f0 /* 182D8 8003CED8 44031000 */ mfc1 $v1, $f2 /* 182DC 8003CEDC 00000000 */ nop /* 182E0 8003CEE0 00731825 */ or $v1, $v1, $s3 /* 182E4 8003CEE4 A0430000 */ sb $v1, 0x0($v0) .L8003CEE8: /* 182E8 8003CEE8 26100001 */ addiu $s0, $s0, 0x1 /* 182EC 8003CEEC 2A020014 */ slti $v0, $s0, 0x14 /* 182F0 8003CEF0 1440FFB3 */ bnez $v0, .L8003CDC0 /* 182F4 8003CEF4 26310019 */ addiu $s1, $s1, 0x19 /* 182F8 8003CEF8 241500FF */ addiu $s5, $zero, 0xFF /* 182FC 8003CEFC 0000802D */ daddu $s0, $zero, $zero /* 18300 8003CF00 27B30020 */ addiu $s3, $sp, 0x20 /* 18304 8003CF04 27B20038 */ addiu $s2, $sp, 0x38 /* 18308 8003CF08 27B10050 */ addiu $s1, $sp, 0x50 /* 1830C 8003CF0C 02A0A02D */ daddu $s4, $s5, $zero /* 18310 8003CF10 2405000C */ addiu $a1, $zero, 0xC .L8003CF14: /* 18314 8003CF14 0200302D */ daddu $a2, $s0, $zero /* 18318 8003CF18 02701021 */ addu $v0, $s3, $s0 /* 1831C 8003CF1C 02501821 */ addu $v1, $s2, $s0 /* 18320 8003CF20 02302021 */ addu $a0, $s1, $s0 /* 18324 8003CF24 90470000 */ lbu $a3, 0x0($v0) /* 18328 8003CF28 90620000 */ lbu $v0, 0x0($v1) /* 1832C 8003CF2C 90830000 */ lbu $v1, 0x0($a0) /* 18330 8003CF30 26100001 */ addiu $s0, $s0, 0x1 /* 18334 8003CF34 AFA00010 */ sw $zero, 0x10($sp) /* 18338 8003CF38 AFB40014 */ sw $s4, 0x14($sp) /* 1833C 8003CF3C AFA00018 */ sw $zero, 0x18($sp) /* 18340 8003CF40 8EC40024 */ lw $a0, 0x24($s6) /* 18344 8003CF44 00073E00 */ sll $a3, $a3, 24 /* 18348 8003CF48 00021400 */ sll $v0, $v0, 16 /* 1834C 8003CF4C 00E23825 */ or $a3, $a3, $v0 /* 18350 8003CF50 00031A00 */ sll $v1, $v1, 8 /* 18354 8003CF54 00E33825 */ or $a3, $a3, $v1 /* 18358 8003CF58 0C0B7A25 */ jal set_npc_imgfx_all /* 1835C 8003CF5C 00F53825 */ or $a3, $a3, $s5 /* 18360 8003CF60 2A020014 */ slti $v0, $s0, 0x14 /* 18364 8003CF64 1440FFEB */ bnez $v0, .L8003CF14 /* 18368 8003CF68 2405000C */ addiu $a1, $zero, 0xC .L8003CF6C: /* 1836C 8003CF6C 8FBF0084 */ lw $ra, 0x84($sp) /* 18370 8003CF70 8FB60080 */ lw $s6, 0x80($sp) /* 18374 8003CF74 8FB5007C */ lw $s5, 0x7C($sp) /* 18378 8003CF78 8FB40078 */ lw $s4, 0x78($sp) /* 1837C 8003CF7C 8FB30074 */ lw $s3, 0x74($sp) /* 18380 8003CF80 8FB20070 */ lw $s2, 0x70($sp) /* 18384 8003CF84 8FB1006C */ lw $s1, 0x6C($sp) /* 18388 8003CF88 8FB00068 */ lw $s0, 0x68($sp) /* 1838C 8003CF8C D7B80098 */ ldc1 $f24, 0x98($sp) /* 18390 8003CF90 D7B60090 */ ldc1 $f22, 0x90($sp) /* 18394 8003CF94 D7B40088 */ ldc1 $f20, 0x88($sp) /* 18398 8003CF98 03E00008 */ jr $ra /* 1839C 8003CF9C 27BD00A0 */ addiu $sp, $sp, 0xA0 ### DECOMPILED C INSTRUCTIONS: void npc_update_decoration_charged(Npc* npc, s32 idx) { u8 sp50[20]; u8 sp38[20]; u8 sp20[20]; s32 i; s32 temp3; if (!npc->decorationInitialised[idx]) { set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_ALLOC_COLOR_BUF, 20, 0, 0, 255, 0); npc->decorationInitialised[idx] = TRUE; } if (npc->decorationInitialised[idx] == TRUE) { npc->decorationUnk[idx] += 7; if (npc->decorationUnk[idx] >= 360) { npc->decorationUnk[idx] = npc->decorationUnk[idx] % 360; } for (i = 0; i < 20; i++) { sp50[i] = (cosine(npc->decorationUnk[idx] + i * 25) + 1.0) * 80.0f; sp38[i] = (cosine(npc->decorationUnk[idx] + i * 25 + 45) + 1.0) * 80.0f; sp20[i] = (cosine(npc->decorationUnk[idx] + i * 25 + 90) + 1.0) * 80.0f; } for (temp3 = 255, i = 0; i < 20; i++) { set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_COLOR_BUF_SET_MODULATE, i, (sp50[i] << 24) | (sp38[i] << 16) | (sp20[i] << 8) | temp3, 0, 255, 0); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel falling_leaves_appendGfx /* 35EDF4 E00584D4 27BDFEF0 */ addiu $sp, $sp, -0x110 /* 35EDF8 E00584D8 AFB700F4 */ sw $s7, 0xF4($sp) /* 35EDFC E00584DC 0080B82D */ daddu $s7, $a0, $zero /* 35EE00 E00584E0 3C02DB06 */ lui $v0, (0xDB060024 >> 16) /* 35EE04 E00584E4 34420024 */ ori $v0, $v0, (0xDB060024 & 0xFFFF) /* 35EE08 E00584E8 3C061464 */ lui $a2, (0x14641400 >> 16) /* 35EE0C E00584EC 34C61400 */ ori $a2, $a2, (0x14641400 & 0xFFFF) /* 35EE10 E00584F0 AFB300E4 */ sw $s3, 0xE4($sp) /* 35EE14 E00584F4 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 35EE18 E00584F8 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 35EE1C E00584FC AFBF00F8 */ sw $ra, 0xF8($sp) /* 35EE20 E0058500 AFB600F0 */ sw $s6, 0xF0($sp) /* 35EE24 E0058504 AFB500EC */ sw $s5, 0xEC($sp) /* 35EE28 E0058508 AFB400E8 */ sw $s4, 0xE8($sp) /* 35EE2C E005850C AFB200E0 */ sw $s2, 0xE0($sp) /* 35EE30 E0058510 AFB100DC */ sw $s1, 0xDC($sp) /* 35EE34 E0058514 AFB000D8 */ sw $s0, 0xD8($sp) /* 35EE38 E0058518 F7B60108 */ sdc1 $f22, 0x108($sp) /* 35EE3C E005851C F7B40100 */ sdc1 $f20, 0x100($sp) /* 35EE40 E0058520 8E650000 */ lw $a1, 0x0($s3) /* 35EE44 E0058524 8EF0000C */ lw $s0, 0xC($s7) /* 35EE48 E0058528 00A0202D */ daddu $a0, $a1, $zero /* 35EE4C E005852C 24A50008 */ addiu $a1, $a1, 0x8 /* 35EE50 E0058530 AE650000 */ sw $a1, 0x0($s3) /* 35EE54 E0058534 AC820000 */ sw $v0, 0x0($a0) /* 35EE58 E0058538 24A20008 */ addiu $v0, $a1, 0x8 /* 35EE5C E005853C AE620000 */ sw $v0, 0x0($s3) /* 35EE60 E0058540 8EE30010 */ lw $v1, 0x10($s7) /* 35EE64 E0058544 24A20010 */ addiu $v0, $a1, 0x10 /* 35EE68 E0058548 AE620000 */ sw $v0, 0x0($s3) /* 35EE6C E005854C 8C62001C */ lw $v0, 0x1C($v1) /* 35EE70 E0058550 3C038000 */ lui $v1, (0x80000000 >> 16) /* 35EE74 E0058554 00431021 */ addu $v0, $v0, $v1 /* 35EE78 E0058558 AC820004 */ sw $v0, 0x4($a0) /* 35EE7C E005855C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 35EE80 E0058560 ACA20000 */ sw $v0, 0x0($a1) /* 35EE84 E0058564 3C020900 */ lui $v0, %hi(D_09001100_40E390) /* 35EE88 E0058568 24421100 */ addiu $v0, $v0, %lo(D_09001100_40E390) /* 35EE8C E005856C ACA20004 */ sw $v0, 0x4($a1) /* 35EE90 E0058570 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 35EE94 E0058574 ACA20008 */ sw $v0, 0x8($a1) /* 35EE98 E0058578 92020027 */ lbu $v0, 0x27($s0) /* 35EE9C E005857C 24120001 */ addiu $s2, $zero, 0x1 /* 35EEA0 E0058580 00461025 */ or $v0, $v0, $a2 /* 35EEA4 E0058584 ACA2000C */ sw $v0, 0xC($a1) /* 35EEA8 E0058588 8E050004 */ lw $a1, 0x4($s0) /* 35EEAC E005858C 8E060008 */ lw $a2, 0x8($s0) /* 35EEB0 E0058590 8E07000C */ lw $a3, 0xC($s0) /* 35EEB4 E0058594 0C080108 */ jal shim_guTranslateF /* 35EEB8 E0058598 27A40018 */ addiu $a0, $sp, 0x18 /* 35EEBC E005859C 27B10058 */ addiu $s1, $sp, 0x58 /* 35EEC0 E00585A0 4480A000 */ mtc1 $zero, $f20 /* 35EEC4 E00585A4 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 35EEC8 E00585A8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 35EECC E00585AC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 35EED0 E00585B0 4481B000 */ mtc1 $at, $f22 /* 35EED4 E00585B4 00031080 */ sll $v0, $v1, 2 /* 35EED8 E00585B8 00431021 */ addu $v0, $v0, $v1 /* 35EEDC E00585BC 00021080 */ sll $v0, $v0, 2 /* 35EEE0 E00585C0 00431023 */ subu $v0, $v0, $v1 /* 35EEE4 E00585C4 000218C0 */ sll $v1, $v0, 3 /* 35EEE8 E00585C8 00431021 */ addu $v0, $v0, $v1 /* 35EEEC E00585CC 000210C0 */ sll $v0, $v0, 3 /* 35EEF0 E00585D0 4406A000 */ mfc1 $a2, $f20 /* 35EEF4 E00585D4 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 35EEF8 E00585D8 00220821 */ addu $at, $at, $v0 /* 35EEFC E00585DC C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 35EF00 E00585E0 4407B000 */ mfc1 $a3, $f22 /* 35EF04 E00585E4 46000007 */ neg.s $f0, $f0 /* 35EF08 E00585E8 44050000 */ mfc1 $a1, $f0 /* 35EF0C E00585EC 0220202D */ daddu $a0, $s1, $zero /* 35EF10 E00585F0 0C080104 */ jal shim_guRotateF /* 35EF14 E00585F4 E7B40010 */ swc1 $f20, 0x10($sp) /* 35EF18 E00585F8 0220202D */ daddu $a0, $s1, $zero /* 35EF1C E00585FC 27A50018 */ addiu $a1, $sp, 0x18 /* 35EF20 E0058600 0C080114 */ jal shim_guMtxCatF /* 35EF24 E0058604 27A60098 */ addiu $a2, $sp, 0x98 /* 35EF28 E0058608 8EE20008 */ lw $v0, 0x8($s7) /* 35EF2C E005860C 0242102A */ slt $v0, $s2, $v0 /* 35EF30 E0058610 1040004E */ beqz $v0, .LE005874C /* 35EF34 E0058614 26100034 */ addiu $s0, $s0, 0x34 /* 35EF38 E0058618 3C16800A */ lui $s6, %hi(gDisplayContext) /* 35EF3C E005861C 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 35EF40 E0058620 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 35EF44 E0058624 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 35EF48 E0058628 3C140001 */ lui $s4, (0x11630 >> 16) /* 35EF4C E005862C 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 35EF50 E0058630 26100020 */ addiu $s0, $s0, 0x20 .LE0058634: /* 35EF54 E0058634 0220202D */ daddu $a0, $s1, $zero /* 35EF58 E0058638 8E05FFE4 */ lw $a1, -0x1C($s0) /* 35EF5C E005863C 8E06FFE8 */ lw $a2, -0x18($s0) /* 35EF60 E0058640 8E07FFEC */ lw $a3, -0x14($s0) /* 35EF64 E0058644 0C080108 */ jal shim_guTranslateF /* 35EF68 E0058648 26520001 */ addiu $s2, $s2, 0x1 /* 35EF6C E005864C 0220202D */ daddu $a0, $s1, $zero /* 35EF70 E0058650 27A50098 */ addiu $a1, $sp, 0x98 /* 35EF74 E0058654 0C080114 */ jal shim_guMtxCatF /* 35EF78 E0058658 27A60018 */ addiu $a2, $sp, 0x18 /* 35EF7C E005865C E7B60010 */ swc1 $f22, 0x10($sp) /* 35EF80 E0058660 8E05FFF8 */ lw $a1, -0x8($s0) /* 35EF84 E0058664 4406A000 */ mfc1 $a2, $f20 /* 35EF88 E0058668 4407A000 */ mfc1 $a3, $f20 /* 35EF8C E005866C 0C080104 */ jal shim_guRotateF /* 35EF90 E0058670 0220202D */ daddu $a0, $s1, $zero /* 35EF94 E0058674 0220202D */ daddu $a0, $s1, $zero /* 35EF98 E0058678 27A50018 */ addiu $a1, $sp, 0x18 /* 35EF9C E005867C 0C080114 */ jal shim_guMtxCatF /* 35EFA0 E0058680 00A0302D */ daddu $a2, $a1, $zero /* 35EFA4 E0058684 0220202D */ daddu $a0, $s1, $zero /* 35EFA8 E0058688 E7B40010 */ swc1 $f20, 0x10($sp) /* 35EFAC E005868C 8E050000 */ lw $a1, 0x0($s0) /* 35EFB0 E0058690 4406A000 */ mfc1 $a2, $f20 /* 35EFB4 E0058694 4407B000 */ mfc1 $a3, $f22 /* 35EFB8 E0058698 0C080104 */ jal shim_guRotateF /* 35EFBC E005869C 26100034 */ addiu $s0, $s0, 0x34 /* 35EFC0 E00586A0 0220202D */ daddu $a0, $s1, $zero /* 35EFC4 E00586A4 27A50018 */ addiu $a1, $sp, 0x18 /* 35EFC8 E00586A8 0C080114 */ jal shim_guMtxCatF /* 35EFCC E00586AC 00A0302D */ daddu $a2, $a1, $zero /* 35EFD0 E00586B0 27A40018 */ addiu $a0, $sp, 0x18 /* 35EFD4 E00586B4 96A50000 */ lhu $a1, 0x0($s5) /* 35EFD8 E00586B8 8EC20000 */ lw $v0, 0x0($s6) /* 35EFDC E00586BC 00052980 */ sll $a1, $a1, 6 /* 35EFE0 E00586C0 00B42821 */ addu $a1, $a1, $s4 /* 35EFE4 E00586C4 0C080118 */ jal shim_guMtxF2L /* 35EFE8 E00586C8 00452821 */ addu $a1, $v0, $a1 /* 35EFEC E00586CC 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 35EFF0 E00586D0 8E640000 */ lw $a0, 0x0($s3) /* 35EFF4 E00586D4 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 35EFF8 E00586D8 0080282D */ daddu $a1, $a0, $zero /* 35EFFC E00586DC 24840008 */ addiu $a0, $a0, 0x8 /* 35F000 E00586E0 AE640000 */ sw $a0, 0x0($s3) /* 35F004 E00586E4 96A20000 */ lhu $v0, 0x0($s5) /* 35F008 E00586E8 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 35F00C E00586EC ACA30000 */ sw $v1, 0x0($a1) /* 35F010 E00586F0 24430001 */ addiu $v1, $v0, 0x1 /* 35F014 E00586F4 3042FFFF */ andi $v0, $v0, 0xFFFF /* 35F018 E00586F8 00021180 */ sll $v0, $v0, 6 /* 35F01C E00586FC A6A30000 */ sh $v1, 0x0($s5) /* 35F020 E0058700 8EC30000 */ lw $v1, 0x0($s6) /* 35F024 E0058704 00541021 */ addu $v0, $v0, $s4 /* 35F028 E0058708 00621821 */ addu $v1, $v1, $v0 /* 35F02C E005870C 24820008 */ addiu $v0, $a0, 0x8 /* 35F030 E0058710 ACA30004 */ sw $v1, 0x4($a1) /* 35F034 E0058714 AE620000 */ sw $v0, 0x0($s3) /* 35F038 E0058718 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 35F03C E005871C AC820000 */ sw $v0, 0x0($a0) /* 35F040 E0058720 3C020900 */ lui $v0, %hi(D_090011B0_40E440) /* 35F044 E0058724 244211B0 */ addiu $v0, $v0, %lo(D_090011B0_40E440) /* 35F048 E0058728 AC820004 */ sw $v0, 0x4($a0) /* 35F04C E005872C 24020040 */ addiu $v0, $zero, 0x40 /* 35F050 E0058730 AC860008 */ sw $a2, 0x8($a0) /* 35F054 E0058734 AC82000C */ sw $v0, 0xC($a0) /* 35F058 E0058738 8EE20008 */ lw $v0, 0x8($s7) /* 35F05C E005873C 24840010 */ addiu $a0, $a0, 0x10 /* 35F060 E0058740 0242102A */ slt $v0, $s2, $v0 /* 35F064 E0058744 1440FFBB */ bnez $v0, .LE0058634 /* 35F068 E0058748 AE640000 */ sw $a0, 0x0($s3) .LE005874C: /* 35F06C E005874C 8FBF00F8 */ lw $ra, 0xF8($sp) /* 35F070 E0058750 8FB700F4 */ lw $s7, 0xF4($sp) /* 35F074 E0058754 8FB600F0 */ lw $s6, 0xF0($sp) /* 35F078 E0058758 8FB500EC */ lw $s5, 0xEC($sp) /* 35F07C E005875C 8FB400E8 */ lw $s4, 0xE8($sp) /* 35F080 E0058760 8FB300E4 */ lw $s3, 0xE4($sp) /* 35F084 E0058764 8FB200E0 */ lw $s2, 0xE0($sp) /* 35F088 E0058768 8FB100DC */ lw $s1, 0xDC($sp) /* 35F08C E005876C 8FB000D8 */ lw $s0, 0xD8($sp) /* 35F090 E0058770 D7B60108 */ ldc1 $f22, 0x108($sp) /* 35F094 E0058774 D7B40100 */ ldc1 $f20, 0x100($sp) /* 35F098 E0058778 03E00008 */ jr $ra /* 35F09C E005877C 27BD0110 */ addiu $sp, $sp, 0x110 ### DECOMPILED C INSTRUCTIONS: void falling_leaves_appendGfx(void* effect) { FallingLeavesFXData* part = ((EffectInstance*)effect)->data.fallingLeaves; Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; s32 i; gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09001100_3601E0); gDPSetPrimColor(gMainGfxPos++, 0, 0, 20, 100, 20, part->unk_24); shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp98); part++; for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) { shim_guTranslateF(sp58, part->unk_04, part->unk_08, part->unk_0C); shim_guMtxCatF(sp58, sp98, sp18); shim_guRotateF(sp58, part->unk_18, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, part->unk_20, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090011B0_360290); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel PlayerPowerBounceEnemy /* 1A2D80 802744A0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 1A2D84 802744A4 AFB20018 */ sw $s2, 0x18($sp) /* 1A2D88 802744A8 0080902D */ daddu $s2, $a0, $zero /* 1A2D8C 802744AC AFBF0020 */ sw $ra, 0x20($sp) /* 1A2D90 802744B0 AFB3001C */ sw $s3, 0x1C($sp) /* 1A2D94 802744B4 AFB10014 */ sw $s1, 0x14($sp) /* 1A2D98 802744B8 AFB00010 */ sw $s0, 0x10($sp) /* 1A2D9C 802744BC 8E50000C */ lw $s0, 0xC($s2) /* 1A2DA0 802744C0 3C11800E */ lui $s1, %hi(gBattleStatus) /* 1A2DA4 802744C4 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) /* 1A2DA8 802744C8 8E130000 */ lw $s3, 0x0($s0) /* 1A2DAC 802744CC 26100004 */ addiu $s0, $s0, 0x4 /* 1A2DB0 802744D0 8E020000 */ lw $v0, 0x0($s0) /* 1A2DB4 802744D4 26100004 */ addiu $s0, $s0, 0x4 /* 1A2DB8 802744D8 AE220188 */ sw $v0, 0x188($s1) /* 1A2DBC 802744DC 8E020000 */ lw $v0, 0x0($s0) /* 1A2DC0 802744E0 26100004 */ addiu $s0, $s0, 0x4 /* 1A2DC4 802744E4 AE22018C */ sw $v0, 0x18C($s1) /* 1A2DC8 802744E8 8E020000 */ lw $v0, 0x0($s0) /* 1A2DCC 802744EC 26100004 */ addiu $s0, $s0, 0x4 /* 1A2DD0 802744F0 AE220190 */ sw $v0, 0x190($s1) /* 1A2DD4 802744F4 8E050000 */ lw $a1, 0x0($s0) /* 1A2DD8 802744F8 0C0B1EAF */ jal evt_get_variable /* 1A2DDC 802744FC 26100004 */ addiu $s0, $s0, 0x4 /* 1A2DE0 80274500 A622017E */ sh $v0, 0x17E($s1) /* 1A2DE4 80274504 8E050000 */ lw $a1, 0x0($s0) /* 1A2DE8 80274508 26100004 */ addiu $s0, $s0, 0x4 /* 1A2DEC 8027450C 0C0B1EAF */ jal evt_get_variable /* 1A2DF0 80274510 0240202D */ daddu $a0, $s2, $zero /* 1A2DF4 80274514 A2220198 */ sb $v0, 0x198($s1) /* 1A2DF8 80274518 8E100000 */ lw $s0, 0x0($s0) /* 1A2DFC 8027451C 24020030 */ addiu $v0, $zero, 0x30 /* 1A2E00 80274520 32030030 */ andi $v1, $s0, 0x30 /* 1A2E04 80274524 54620004 */ bnel $v1, $v0, .L80274538 /* 1A2E08 80274528 32020010 */ andi $v0, $s0, 0x10 /* 1A2E0C 8027452C 8E220000 */ lw $v0, 0x0($s1) /* 1A2E10 80274530 0809D15E */ j .L80274578 /* 1A2E14 80274534 34420030 */ ori $v0, $v0, 0x30 .L80274538: /* 1A2E18 80274538 10400004 */ beqz $v0, .L8027454C /* 1A2E1C 8027453C 2403FFDF */ addiu $v1, $zero, -0x21 /* 1A2E20 80274540 8E220000 */ lw $v0, 0x0($s1) /* 1A2E24 80274544 0809D15D */ j .L80274574 /* 1A2E28 80274548 34420010 */ ori $v0, $v0, 0x10 .L8027454C: /* 1A2E2C 8027454C 32020020 */ andi $v0, $s0, 0x20 /* 1A2E30 80274550 10400005 */ beqz $v0, .L80274568 /* 1A2E34 80274554 2403FFEF */ addiu $v1, $zero, -0x11 /* 1A2E38 80274558 8E220000 */ lw $v0, 0x0($s1) /* 1A2E3C 8027455C 00431024 */ and $v0, $v0, $v1 /* 1A2E40 80274560 0809D15E */ j .L80274578 /* 1A2E44 80274564 34420020 */ ori $v0, $v0, 0x20 .L80274568: /* 1A2E48 80274568 8E220000 */ lw $v0, 0x0($s1) /* 1A2E4C 8027456C 00431024 */ and $v0, $v0, $v1 /* 1A2E50 80274570 2403FFDF */ addiu $v1, $zero, -0x21 .L80274574: /* 1A2E54 80274574 00431024 */ and $v0, $v0, $v1 .L80274578: /* 1A2E58 80274578 AE220000 */ sw $v0, 0x0($s1) /* 1A2E5C 8027457C 32020040 */ andi $v0, $s0, 0x40 /* 1A2E60 80274580 10400007 */ beqz $v0, .L802745A0 /* 1A2E64 80274584 2404FFBF */ addiu $a0, $zero, -0x41 /* 1A2E68 80274588 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1A2E6C 8027458C 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1A2E70 80274590 8C620000 */ lw $v0, 0x0($v1) /* 1A2E74 80274594 34420040 */ ori $v0, $v0, 0x40 /* 1A2E78 80274598 0809D16D */ j .L802745B4 /* 1A2E7C 8027459C AC620000 */ sw $v0, 0x0($v1) .L802745A0: /* 1A2E80 802745A0 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1A2E84 802745A4 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1A2E88 802745A8 8C430000 */ lw $v1, 0x0($v0) /* 1A2E8C 802745AC 00641824 */ and $v1, $v1, $a0 /* 1A2E90 802745B0 AC430000 */ sw $v1, 0x0($v0) .L802745B4: /* 1A2E94 802745B4 32020200 */ andi $v0, $s0, 0x200 /* 1A2E98 802745B8 10400007 */ beqz $v0, .L802745D8 /* 1A2E9C 802745BC 2404FDFF */ addiu $a0, $zero, -0x201 /* 1A2EA0 802745C0 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1A2EA4 802745C4 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1A2EA8 802745C8 8C620000 */ lw $v0, 0x0($v1) /* 1A2EAC 802745CC 34420200 */ ori $v0, $v0, 0x200 /* 1A2EB0 802745D0 0809D17B */ j .L802745EC /* 1A2EB4 802745D4 AC620000 */ sw $v0, 0x0($v1) .L802745D8: /* 1A2EB8 802745D8 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1A2EBC 802745DC 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1A2EC0 802745E0 8C430000 */ lw $v1, 0x0($v0) /* 1A2EC4 802745E4 00641824 */ and $v1, $v1, $a0 /* 1A2EC8 802745E8 AC430000 */ sw $v1, 0x0($v0) .L802745EC: /* 1A2ECC 802745EC 32020080 */ andi $v0, $s0, 0x80 /* 1A2ED0 802745F0 10400007 */ beqz $v0, .L80274610 /* 1A2ED4 802745F4 2404FF7F */ addiu $a0, $zero, -0x81 /* 1A2ED8 802745F8 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1A2EDC 802745FC 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1A2EE0 80274600 8C620000 */ lw $v0, 0x0($v1) /* 1A2EE4 80274604 34420080 */ ori $v0, $v0, 0x80 /* 1A2EE8 80274608 0809D189 */ j .L80274624 /* 1A2EEC 8027460C AC620000 */ sw $v0, 0x0($v1) .L80274610: /* 1A2EF0 80274610 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1A2EF4 80274614 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1A2EF8 80274618 8C430000 */ lw $v1, 0x0($v0) /* 1A2EFC 8027461C 00641824 */ and $v1, $v1, $a0 /* 1A2F00 80274620 AC430000 */ sw $v1, 0x0($v0) .L80274624: /* 1A2F04 80274624 32020800 */ andi $v0, $s0, 0x800 /* 1A2F08 80274628 10400007 */ beqz $v0, .L80274648 /* 1A2F0C 8027462C 2404F7FF */ addiu $a0, $zero, -0x801 /* 1A2F10 80274630 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1A2F14 80274634 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1A2F18 80274638 8C620000 */ lw $v0, 0x0($v1) /* 1A2F1C 8027463C 34420800 */ ori $v0, $v0, 0x800 /* 1A2F20 80274640 0809D197 */ j .L8027465C /* 1A2F24 80274644 AC620000 */ sw $v0, 0x0($v1) .L80274648: /* 1A2F28 80274648 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1A2F2C 8027464C 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1A2F30 80274650 8C430000 */ lw $v1, 0x0($v0) /* 1A2F34 80274654 00641824 */ and $v1, $v1, $a0 /* 1A2F38 80274658 AC430000 */ sw $v1, 0x0($v0) .L8027465C: /* 1A2F3C 8027465C 0C09A75B */ jal get_actor /* 1A2F40 80274660 8E440148 */ lw $a0, 0x148($s2) /* 1A2F44 80274664 94430428 */ lhu $v1, 0x428($v0) /* 1A2F48 80274668 A62301A0 */ sh $v1, 0x1A0($s1) /* 1A2F4C 8027466C 92230193 */ lbu $v1, 0x193($s1) /* 1A2F50 80274670 90420426 */ lbu $v0, 0x426($v0) /* 1A2F54 80274674 A2230194 */ sb $v1, 0x194($s1) /* 1A2F58 80274678 306300FF */ andi $v1, $v1, 0xFF /* 1A2F5C 8027467C A22201A2 */ sb $v0, 0x1A2($s1) /* 1A2F60 80274680 240200FF */ addiu $v0, $zero, 0xFF /* 1A2F64 80274684 50620001 */ beql $v1, $v0, .L8027468C /* 1A2F68 80274688 A2200194 */ sb $zero, 0x194($s1) .L8027468C: /* 1A2F6C 8027468C 8E220190 */ lw $v0, 0x190($s1) /* 1A2F70 80274690 30420F00 */ andi $v0, $v0, 0xF00 /* 1A2F74 80274694 00021203 */ sra $v0, $v0, 8 /* 1A2F78 80274698 0C09C651 */ jal calc_player_damage_enemy /* 1A2F7C 8027469C A2220195 */ sb $v0, 0x195($s1) /* 1A2F80 802746A0 0440000B */ bltz $v0, .L802746D0 /* 1A2F84 802746A4 0240202D */ daddu $a0, $s2, $zero /* 1A2F88 802746A8 0260282D */ daddu $a1, $s3, $zero /* 1A2F8C 802746AC 0C0B2026 */ jal evt_set_variable /* 1A2F90 802746B0 0040302D */ daddu $a2, $v0, $zero /* 1A2F94 802746B4 0C0B1069 */ jal does_script_exist_by_ref /* 1A2F98 802746B8 0240202D */ daddu $a0, $s2, $zero /* 1A2F9C 802746BC 0040182D */ daddu $v1, $v0, $zero /* 1A2FA0 802746C0 10600004 */ beqz $v1, .L802746D4 /* 1A2FA4 802746C4 240200FF */ addiu $v0, $zero, 0xFF /* 1A2FA8 802746C8 0809D1B5 */ j .L802746D4 /* 1A2FAC 802746CC 24020002 */ addiu $v0, $zero, 0x2 .L802746D0: /* 1A2FB0 802746D0 240200FF */ addiu $v0, $zero, 0xFF .L802746D4: /* 1A2FB4 802746D4 8FBF0020 */ lw $ra, 0x20($sp) /* 1A2FB8 802746D8 8FB3001C */ lw $s3, 0x1C($sp) /* 1A2FBC 802746DC 8FB20018 */ lw $s2, 0x18($sp) /* 1A2FC0 802746E0 8FB10014 */ lw $s1, 0x14($sp) /* 1A2FC4 802746E4 8FB00010 */ lw $s0, 0x10($sp) /* 1A2FC8 802746E8 03E00008 */ jr $ra /* 1A2FCC 802746EC 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; s32 hitResultOutVar = *args++; s32 flags; Actor* target; HitResult hitResult; battleStatus->currentAttackElement = *args++; battleStatus->currentAttackEventSuppression = *args++; battleStatus->currentAttackStatus = *args++; battleStatus->currentAttackDamage = evt_get_variable(script, *args++); battleStatus->powerBounceCounter = evt_get_variable(script, *args++); flags = *args++; if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) { gBattleStatus.flags1 |= BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_10) { gBattleStatus.flags1 |= BS_FLAGS1_10; gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) { gBattleStatus.flags1 &= ~BS_FLAGS1_10; gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_10; gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } if (flags & BS_FLAGS1_40) { gBattleStatus.flags1 |= BS_FLAGS1_40; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_40; } if (flags & BS_FLAGS1_200) { gBattleStatus.flags1 |= BS_FLAGS1_200; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_200; } if (flags & BS_FLAGS1_80) { gBattleStatus.flags1 |= BS_FLAGS1_80; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_80; } if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) { gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE; } target = get_actor(script->owner1.actorID); battleStatus->currentTargetID = target->targetActorID; battleStatus->currentTargetPart = target->targetPartIndex; battleStatus->statusChance = battleStatus->currentAttackStatus; if (battleStatus->statusChance == STATUS_KEY_NEVER) { battleStatus->statusChance = 0; } battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8; hitResult = calc_player_damage_enemy(); if (hitResult < 0) { return ApiStatus_FINISH; } evt_set_variable(script, hitResultOutVar, hitResult); if (!does_script_exist_by_ref(script)) { return ApiStatus_FINISH; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel basic_ai_chase /* 25524 8004A124 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 25528 8004A128 AFB30044 */ sw $s3, 0x44($sp) /* 2552C 8004A12C 0080982D */ daddu $s3, $a0, $zero /* 25530 8004A130 AFBF0048 */ sw $ra, 0x48($sp) /* 25534 8004A134 AFB20040 */ sw $s2, 0x40($sp) /* 25538 8004A138 AFB1003C */ sw $s1, 0x3C($sp) /* 2553C 8004A13C AFB00038 */ sw $s0, 0x38($sp) /* 25540 8004A140 F7B40050 */ sdc1 $f20, 0x50($sp) /* 25544 8004A144 8E720148 */ lw $s2, 0x148($s3) /* 25548 8004A148 00A0882D */ daddu $s1, $a1, $zero /* 2554C 8004A14C 86440008 */ lh $a0, 0x8($s2) /* 25550 8004A150 0C00EABB */ jal get_npc_unsafe /* 25554 8004A154 00C0802D */ daddu $s0, $a2, $zero /* 25558 8004A158 0200202D */ daddu $a0, $s0, $zero /* 2555C 8004A15C 0240282D */ daddu $a1, $s2, $zero /* 25560 8004A160 24030001 */ addiu $v1, $zero, 0x1 /* 25564 8004A164 AFA30010 */ sw $v1, 0x10($sp) /* 25568 8004A168 8E260024 */ lw $a2, 0x24($s1) /* 2556C 8004A16C 8E270028 */ lw $a3, 0x28($s1) /* 25570 8004A170 0C01242D */ jal basic_ai_check_player_dist /* 25574 8004A174 0040802D */ daddu $s0, $v0, $zero /* 25578 8004A178 1440001D */ bnez $v0, .L8004A1F0 /* 2557C 8004A17C 24040002 */ addiu $a0, $zero, 0x2 /* 25580 8004A180 0200282D */ daddu $a1, $s0, $zero /* 25584 8004A184 0000302D */ daddu $a2, $zero, $zero /* 25588 8004A188 860300A8 */ lh $v1, 0xA8($s0) /* 2558C 8004A18C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 25590 8004A190 44810000 */ mtc1 $at, $f0 /* 25594 8004A194 3C014000 */ lui $at, (0x40000000 >> 16) /* 25598 8004A198 44811000 */ mtc1 $at, $f2 /* 2559C 8004A19C 3C01C1A0 */ lui $at, (0xC1A00000 >> 16) /* 255A0 8004A1A0 44812000 */ mtc1 $at, $f4 /* 255A4 8004A1A4 2402000F */ addiu $v0, $zero, 0xF /* 255A8 8004A1A8 AFA2001C */ sw $v0, 0x1C($sp) /* 255AC 8004A1AC 44833000 */ mtc1 $v1, $f6 /* 255B0 8004A1B0 00000000 */ nop /* 255B4 8004A1B4 468031A0 */ cvt.s.w $f6, $f6 /* 255B8 8004A1B8 44073000 */ mfc1 $a3, $f6 /* 255BC 8004A1BC 27A20028 */ addiu $v0, $sp, 0x28 /* 255C0 8004A1C0 AFA20020 */ sw $v0, 0x20($sp) /* 255C4 8004A1C4 E7A00010 */ swc1 $f0, 0x10($sp) /* 255C8 8004A1C8 E7A20014 */ swc1 $f2, 0x14($sp) /* 255CC 8004A1CC 0C01BFA4 */ jal fx_emote /* 255D0 8004A1D0 E7A40018 */ swc1 $f4, 0x18($sp) /* 255D4 8004A1D4 8E4200CC */ lw $v0, 0xCC($s2) /* 255D8 8004A1D8 8C430000 */ lw $v1, 0x0($v0) /* 255DC 8004A1DC 24020014 */ addiu $v0, $zero, 0x14 /* 255E0 8004A1E0 A602008E */ sh $v0, 0x8E($s0) /* 255E4 8004A1E4 2402000E */ addiu $v0, $zero, 0xE /* 255E8 8004A1E8 080128F1 */ j .L8004A3C4 /* 255EC 8004A1EC AE030028 */ sw $v1, 0x28($s0) .L8004A1F0: /* 255F0 8004A1F0 8E420018 */ lw $v0, 0x18($s2) /* 255F4 8004A1F4 9442002A */ lhu $v0, 0x2A($v0) /* 255F8 8004A1F8 30420004 */ andi $v0, $v0, 0x4 /* 255FC 8004A1FC 1040004A */ beqz $v0, .L8004A328 /* 25600 8004A200 0200202D */ daddu $a0, $s0, $zero /* 25604 8004A204 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) /* 25608 8004A208 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) /* 2560C 8004A20C C60C0038 */ lwc1 $f12, 0x38($s0) /* 25610 8004A210 C60E0040 */ lwc1 $f14, 0x40($s0) /* 25614 8004A214 8C460028 */ lw $a2, 0x28($v0) /* 25618 8004A218 0C00A7B5 */ jal dist2D /* 2561C 8004A21C 8C470030 */ lw $a3, 0x30($v0) /* 25620 8004A220 C6020018 */ lwc1 $f2, 0x18($s0) /* 25624 8004A224 3C014014 */ lui $at, (0x40140000 >> 16) /* 25628 8004A228 44812800 */ mtc1 $at, $f5 /* 2562C 8004A22C 44802000 */ mtc1 $zero, $f4 /* 25630 8004A230 460010A1 */ cvt.d.s $f2, $f2 /* 25634 8004A234 46241082 */ mul.d $f2, $f2, $f4 /* 25638 8004A238 00000000 */ nop /* 2563C 8004A23C 46000021 */ cvt.d.s $f0, $f0 /* 25640 8004A240 4620103C */ c.lt.d $f2, $f0 /* 25644 8004A244 00000000 */ nop /* 25648 8004A248 45000036 */ bc1f .L8004A324 /* 2564C 8004A24C 27A5002C */ addiu $a1, $sp, 0x2C /* 25650 8004A250 C6000038 */ lwc1 $f0, 0x38($s0) /* 25654 8004A254 C602003C */ lwc1 $f2, 0x3C($s0) /* 25658 8004A258 C6040040 */ lwc1 $f4, 0x40($s0) /* 2565C 8004A25C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 25660 8004A260 4481A000 */ mtc1 $at, $f20 /* 25664 8004A264 E7A0002C */ swc1 $f0, 0x2C($sp) /* 25668 8004A268 E7A20030 */ swc1 $f2, 0x30($sp) /* 2566C 8004A26C E7A40034 */ swc1 $f4, 0x34($sp) /* 25670 8004A270 E7B40010 */ swc1 $f20, 0x10($sp) /* 25674 8004A274 C600000C */ lwc1 $f0, 0xC($s0) /* 25678 8004A278 E7A00014 */ swc1 $f0, 0x14($sp) /* 2567C 8004A27C 860200A8 */ lh $v0, 0xA8($s0) /* 25680 8004A280 44820000 */ mtc1 $v0, $f0 /* 25684 8004A284 00000000 */ nop /* 25688 8004A288 46800020 */ cvt.s.w $f0, $f0 /* 2568C 8004A28C E7A00018 */ swc1 $f0, 0x18($sp) /* 25690 8004A290 860200A6 */ lh $v0, 0xA6($s0) /* 25694 8004A294 27A60030 */ addiu $a2, $sp, 0x30 /* 25698 8004A298 44820000 */ mtc1 $v0, $f0 /* 2569C 8004A29C 00000000 */ nop /* 256A0 8004A2A0 46800020 */ cvt.s.w $f0, $f0 /* 256A4 8004A2A4 E7A0001C */ swc1 $f0, 0x1C($sp) /* 256A8 8004A2A8 8E040080 */ lw $a0, 0x80($s0) /* 256AC 8004A2AC 0C037711 */ jal npc_test_move_simple_with_slipping /* 256B0 8004A2B0 27A70034 */ addiu $a3, $sp, 0x34 /* 256B4 8004A2B4 1040001B */ beqz $v0, .L8004A324 /* 256B8 8004A2B8 0200282D */ daddu $a1, $s0, $zero /* 256BC 8004A2BC 24040002 */ addiu $a0, $zero, 0x2 /* 256C0 8004A2C0 0000302D */ daddu $a2, $zero, $zero /* 256C4 8004A2C4 860300A8 */ lh $v1, 0xA8($s0) /* 256C8 8004A2C8 3C014000 */ lui $at, (0x40000000 >> 16) /* 256CC 8004A2CC 44810000 */ mtc1 $at, $f0 /* 256D0 8004A2D0 3C01C1A0 */ lui $at, (0xC1A00000 >> 16) /* 256D4 8004A2D4 44811000 */ mtc1 $at, $f2 /* 256D8 8004A2D8 2402000C */ addiu $v0, $zero, 0xC /* 256DC 8004A2DC AFA2001C */ sw $v0, 0x1C($sp) /* 256E0 8004A2E0 44833000 */ mtc1 $v1, $f6 /* 256E4 8004A2E4 00000000 */ nop /* 256E8 8004A2E8 468031A0 */ cvt.s.w $f6, $f6 /* 256EC 8004A2EC 44073000 */ mfc1 $a3, $f6 /* 256F0 8004A2F0 27A20028 */ addiu $v0, $sp, 0x28 /* 256F4 8004A2F4 E7B40010 */ swc1 $f20, 0x10($sp) /* 256F8 8004A2F8 AFA20020 */ sw $v0, 0x20($sp) /* 256FC 8004A2FC E7A00014 */ swc1 $f0, 0x14($sp) /* 25700 8004A300 0C01BFA4 */ jal fx_emote /* 25704 8004A304 E7A20018 */ swc1 $f2, 0x18($sp) /* 25708 8004A308 8E4200CC */ lw $v0, 0xCC($s2) /* 2570C 8004A30C 8C430000 */ lw $v1, 0x0($v0) /* 25710 8004A310 2402000F */ addiu $v0, $zero, 0xF /* 25714 8004A314 A602008E */ sh $v0, 0x8E($s0) /* 25718 8004A318 2402000E */ addiu $v0, $zero, 0xE /* 2571C 8004A31C 080128F1 */ j .L8004A3C4 /* 25720 8004A320 AE030028 */ sw $v1, 0x28($s0) .L8004A324: /* 25724 8004A324 0200202D */ daddu $a0, $s0, $zero .L8004A328: /* 25728 8004A328 0C00F598 */ jal spawn_surface_effects /* 2572C 8004A32C 24050001 */ addiu $a1, $zero, 0x1 /* 25730 8004A330 8E050018 */ lw $a1, 0x18($s0) /* 25734 8004A334 8E06000C */ lw $a2, 0xC($s0) /* 25738 8004A338 0C00EA95 */ jal npc_move_heading /* 2573C 8004A33C 0200202D */ daddu $a0, $s0, $zero /* 25740 8004A340 C6000018 */ lwc1 $f0, 0x18($s0) /* 25744 8004A344 3C014020 */ lui $at, (0x40200000 >> 16) /* 25748 8004A348 44811800 */ mtc1 $at, $f3 /* 2574C 8004A34C 44801000 */ mtc1 $zero, $f2 /* 25750 8004A350 46000021 */ cvt.d.s $f0, $f0 /* 25754 8004A354 4620103C */ c.lt.d $f2, $f0 /* 25758 8004A358 00000000 */ nop /* 2575C 8004A35C 45000012 */ bc1f .L8004A3A8 /* 25760 8004A360 00000000 */ nop /* 25764 8004A364 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 25768 8004A368 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 2576C 8004A36C 94430134 */ lhu $v1, 0x134($v0) /* 25770 8004A370 3C02CCCC */ lui $v0, (0xCCCCCCCD >> 16) /* 25774 8004A374 3442CCCD */ ori $v0, $v0, (0xCCCCCCCD & 0xFFFF) /* 25778 8004A378 00620019 */ multu $v1, $v0 /* 2577C 8004A37C 00004010 */ mfhi $t0 /* 25780 8004A380 00082082 */ srl $a0, $t0, 2 /* 25784 8004A384 00041080 */ sll $v0, $a0, 2 /* 25788 8004A388 00441021 */ addu $v0, $v0, $a0 /* 2578C 8004A38C 00621823 */ subu $v1, $v1, $v0 /* 25790 8004A390 3063FFFF */ andi $v1, $v1, 0xFFFF /* 25794 8004A394 14600004 */ bnez $v1, .L8004A3A8 /* 25798 8004A398 0200202D */ daddu $a0, $s0, $zero /* 2579C 8004A39C 240520C1 */ addiu $a1, $zero, 0x20C1 /* 257A0 8004A3A0 0C012530 */ jal ai_enemy_play_sound /* 257A4 8004A3A4 0000302D */ daddu $a2, $zero, $zero .L8004A3A8: /* 257A8 8004A3A8 8602008E */ lh $v0, 0x8E($s0) /* 257AC 8004A3AC 9603008E */ lhu $v1, 0x8E($s0) /* 257B0 8004A3B0 18400003 */ blez $v0, .L8004A3C0 /* 257B4 8004A3B4 2462FFFF */ addiu $v0, $v1, -0x1 /* 257B8 8004A3B8 080128F2 */ j .L8004A3C8 /* 257BC 8004A3BC A602008E */ sh $v0, 0x8E($s0) .L8004A3C0: /* 257C0 8004A3C0 2402000C */ addiu $v0, $zero, 0xC .L8004A3C4: /* 257C4 8004A3C4 AE620070 */ sw $v0, 0x70($s3) .L8004A3C8: /* 257C8 8004A3C8 8FBF0048 */ lw $ra, 0x48($sp) /* 257CC 8004A3CC 8FB30044 */ lw $s3, 0x44($sp) /* 257D0 8004A3D0 8FB20040 */ lw $s2, 0x40($sp) /* 257D4 8004A3D4 8FB1003C */ lw $s1, 0x3C($sp) /* 257D8 8004A3D8 8FB00038 */ lw $s0, 0x38($sp) /* 257DC 8004A3DC D7B40050 */ ldc1 $f20, 0x50($sp) /* 257E0 8004A3E0 03E00008 */ jr $ra /* 257E4 8004A3E4 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void basic_ai_chase_init(Evt* script, MobileAISettings* npcAISettings, EnemyDetectVolume* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 skipTurnAround = FALSE; if ((gPlayerStatusPtr->actionState == ACTION_STATE_JUMP || gPlayerStatusPtr->actionState == ACTION_STATE_BOUNCE || gPlayerStatusPtr->actionState == ACTION_STATE_HOP || gPlayerStatusPtr->actionState == ACTION_STATE_FALLING) && (f64)dist2D(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z) < npc->collisionDiameter) { skipTurnAround = TRUE; } if (!skipTurnAround) { f32 angle = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); f32 deltaAngleToPlayer = get_clamped_angle_diff(npc->yaw, angle); if (npcAISettings->chaseTurnRate < fabsf(deltaAngleToPlayer)) { angle = npc->yaw; if (deltaAngleToPlayer < 0.0f) { angle += -npcAISettings->chaseTurnRate; } else { angle += npcAISettings->chaseTurnRate; } } npc->yaw = clamp_angle(angle); npc->duration = (npcAISettings->chaseUpdateInterval / 2) + rand_int((npcAISettings->chaseUpdateInterval / 2) + 1); } else { npc->duration = 0; } npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_CHASE]; npc->moveSpeed = npcAISettings->chaseSpeed; script->AI_TEMP_STATE = AI_STATE_CHASE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel render_entities /* A65B4 8010FEB4 27BDFFE0 */ addiu $sp, $sp, -0x20 /* A65B8 8010FEB8 AFB10014 */ sw $s1, 0x14($sp) /* A65BC 8010FEBC 0000882D */ daddu $s1, $zero, $zero /* A65C0 8010FEC0 AFB20018 */ sw $s2, 0x18($sp) /* A65C4 8010FEC4 241200FF */ addiu $s2, $zero, 0xFF /* A65C8 8010FEC8 AFBF001C */ sw $ra, 0x1C($sp) /* A65CC 8010FECC AFB00010 */ sw $s0, 0x10($sp) .L8010FED0: /* A65D0 8010FED0 0C04417A */ jal get_entity_by_index /* A65D4 8010FED4 0220202D */ daddu $a0, $s1, $zero /* A65D8 8010FED8 0040802D */ daddu $s0, $v0, $zero /* A65DC 8010FEDC 52000070 */ beql $s0, $zero, .L801100A0 /* A65E0 8010FEE0 26310001 */ addiu $s1, $s1, 0x1 /* A65E4 8010FEE4 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* A65E8 8010FEE8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* A65EC 8010FEEC 80420070 */ lb $v0, 0x70($v0) /* A65F0 8010FEF0 14400025 */ bnez $v0, .L8010FF88 /* A65F4 8010FEF4 00000000 */ nop /* A65F8 8010FEF8 3C028015 */ lui $v0, %hi(gEntityHideMode) /* A65FC 8010FEFC 8C421310 */ lw $v0, %lo(gEntityHideMode)($v0) /* A6600 8010FF00 10400013 */ beqz $v0, .L8010FF50 /* A6604 8010FF04 3C030008 */ lui $v1, (0x80000 >> 16) /* A6608 8010FF08 8E020000 */ lw $v0, 0x0($s0) /* A660C 8010FF0C 00431024 */ and $v0, $v0, $v1 /* A6610 8010FF10 1440000F */ bnez $v0, .L8010FF50 /* A6614 8010FF14 00000000 */ nop /* A6618 8010FF18 8E060048 */ lw $a2, 0x48($s0) /* A661C 8010FF1C 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) /* A6620 8010FF20 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) /* A6624 8010FF24 8E070050 */ lw $a3, 0x50($s0) /* A6628 8010FF28 C44C0028 */ lwc1 $f12, 0x28($v0) /* A662C 8010FF2C 0C00A7B5 */ jal dist2D /* A6630 8010FF30 C44E0030 */ lwc1 $f14, 0x30($v0) /* A6634 8010FF34 3C014348 */ lui $at, (0x43480000 >> 16) /* A6638 8010FF38 44811000 */ mtc1 $at, $f2 /* A663C 8010FF3C 00000000 */ nop /* A6640 8010FF40 4600103C */ c.lt.s $f2, $f0 /* A6644 8010FF44 00000000 */ nop /* A6648 8010FF48 45030055 */ bc1tl .L801100A0 /* A664C 8010FF4C 26310001 */ addiu $s1, $s1, 0x1 .L8010FF50: /* A6650 8010FF50 3C038015 */ lui $v1, %hi(gEntityHideMode) /* A6654 8010FF54 8C631310 */ lw $v1, %lo(gEntityHideMode)($v1) /* A6658 8010FF58 24020001 */ addiu $v0, $zero, 0x1 /* A665C 8010FF5C 54620004 */ bnel $v1, $v0, .L8010FF70 /* A6660 8010FF60 24020002 */ addiu $v0, $zero, 0x2 /* A6664 8010FF64 8E020000 */ lw $v0, 0x0($s0) /* A6668 8010FF68 08043FE0 */ j .L8010FF80 /* A666C 8010FF6C 30420002 */ andi $v0, $v0, 0x2 .L8010FF70: /* A6670 8010FF70 14620005 */ bne $v1, $v0, .L8010FF88 /* A6674 8010FF74 3C030004 */ lui $v1, (0x40000 >> 16) /* A6678 8010FF78 8E020000 */ lw $v0, 0x0($s0) /* A667C 8010FF7C 00431024 */ and $v0, $v0, $v1 .L8010FF80: /* A6680 8010FF80 50400047 */ beql $v0, $zero, .L801100A0 /* A6684 8010FF84 26310001 */ addiu $s1, $s1, 0x1 .L8010FF88: /* A6688 8010FF88 8E030000 */ lw $v1, 0x0($s0) /* A668C 8010FF8C 30620001 */ andi $v0, $v1, 0x1 /* A6690 8010FF90 54400043 */ bnel $v0, $zero, .L801100A0 /* A6694 8010FF94 26310001 */ addiu $s1, $s1, 0x1 /* A6698 8010FF98 30620008 */ andi $v0, $v1, 0x8 /* A669C 8010FF9C 1040001F */ beqz $v0, .L8011001C /* A66A0 8010FFA0 00000000 */ nop /* A66A4 8010FFA4 3C028015 */ lui $v0, %hi(D_8014AFB0) /* A66A8 8010FFA8 8C42AFB0 */ lw $v0, %lo(D_8014AFB0)($v0) /* A66AC 8010FFAC 14520007 */ bne $v0, $s2, .L8010FFCC /* A66B0 8010FFB0 00000000 */ nop /* A66B4 8010FFB4 8E06003C */ lw $a2, 0x3C($s0) /* A66B8 8010FFB8 10C0000A */ beqz $a2, .L8010FFE4 /* A66BC 8010FFBC 00000000 */ nop /* A66C0 8010FFC0 86040014 */ lh $a0, 0x14($s0) /* A66C4 8010FFC4 08043FF7 */ j .L8010FFDC /* A66C8 8010FFC8 92050004 */ lbu $a1, 0x4($s0) .L8010FFCC: /* A66CC 8010FFCC 86040014 */ lh $a0, 0x14($s0) /* A66D0 8010FFD0 92050004 */ lbu $a1, 0x4($s0) /* A66D4 8010FFD4 3C068011 */ lui $a2, %hi(func_8010FE44) /* A66D8 8010FFD8 24C6FE44 */ addiu $a2, $a2, %lo(func_8010FE44) .L8010FFDC: /* A66DC 8010FFDC 0C048000 */ jal set_animator_render_callback /* A66E0 8010FFE0 00000000 */ nop .L8010FFE4: /* A66E4 8010FFE4 8E070044 */ lw $a3, 0x44($s0) /* A66E8 8010FFE8 14E00006 */ bnez $a3, .L80110004 /* A66EC 8010FFEC 00000000 */ nop /* A66F0 8010FFF0 86040014 */ lh $a0, 0x14($s0) /* A66F4 8010FFF4 0C047CC1 */ jal render_animated_model /* A66F8 8010FFF8 260500B8 */ addiu $a1, $s0, 0xB8 /* A66FC 8010FFFC 08044028 */ j .L801100A0 /* A6700 80110000 26310001 */ addiu $s1, $s1, 0x1 .L80110004: /* A6704 80110004 86040014 */ lh $a0, 0x14($s0) /* A6708 80110008 86060012 */ lh $a2, 0x12($s0) /* A670C 8011000C 0C047CFA */ jal render_animated_model_with_vertices /* A6710 80110010 260500B8 */ addiu $a1, $s0, 0xB8 /* A6714 80110014 08044028 */ j .L801100A0 /* A6718 80110018 26310001 */ addiu $s1, $s1, 0x1 .L8011001C: /* A671C 8011001C 3C028015 */ lui $v0, %hi(D_8014AFB0) /* A6720 80110020 8C42AFB0 */ lw $v0, %lo(D_8014AFB0)($v0) /* A6724 80110024 1452000B */ bne $v0, $s2, .L80110054 /* A6728 80110028 00000000 */ nop /* A672C 8011002C 8E06003C */ lw $a2, 0x3C($s0) /* A6730 80110030 10C00004 */ beqz $a2, .L80110044 /* A6734 80110034 00000000 */ nop /* A6738 80110038 86040014 */ lh $a0, 0x14($s0) /* A673C 8011003C 08044019 */ j .L80110064 /* A6740 80110040 92050004 */ lbu $a1, 0x4($s0) .L80110044: /* A6744 80110044 0C048B77 */ jal get_entity_model /* A6748 80110048 86040014 */ lh $a0, 0x14($s0) /* A674C 8011004C 0804401B */ j .L8011006C /* A6750 80110050 AC400060 */ sw $zero, 0x60($v0) .L80110054: /* A6754 80110054 86040014 */ lh $a0, 0x14($s0) /* A6758 80110058 92050004 */ lbu $a1, 0x4($s0) /* A675C 8011005C 3C068011 */ lui $a2, %hi(func_8010FE44) /* A6760 80110060 24C6FE44 */ addiu $a2, $a2, %lo(func_8010FE44) .L80110064: /* A6764 80110064 0C048BD9 */ jal bind_entity_model_setupGfx /* A6768 80110068 00000000 */ nop .L8011006C: /* A676C 8011006C 8E070044 */ lw $a3, 0x44($s0) /* A6770 80110070 14E00006 */ bnez $a3, .L8011008C /* A6774 80110074 00000000 */ nop /* A6778 80110078 86040014 */ lh $a0, 0x14($s0) /* A677C 8011007C 0C04873A */ jal draw_entity_model_A /* A6780 80110080 260500B8 */ addiu $a1, $s0, 0xB8 /* A6784 80110084 08044028 */ j .L801100A0 /* A6788 80110088 26310001 */ addiu $s1, $s1, 0x1 .L8011008C: /* A678C 8011008C 86040014 */ lh $a0, 0x14($s0) /* A6790 80110090 86060012 */ lh $a2, 0x12($s0) /* A6794 80110094 0C0487AE */ jal draw_entity_model_B /* A6798 80110098 260500B8 */ addiu $a1, $s0, 0xB8 /* A679C 8011009C 26310001 */ addiu $s1, $s1, 0x1 .L801100A0: /* A67A0 801100A0 2A22001E */ slti $v0, $s1, 0x1E /* A67A4 801100A4 1440FF8A */ bnez $v0, .L8010FED0 /* A67A8 801100A8 00000000 */ nop /* A67AC 801100AC 0C044033 */ jal render_shadows /* A67B0 801100B0 00000000 */ nop /* A67B4 801100B4 8FBF001C */ lw $ra, 0x1C($sp) /* A67B8 801100B8 8FB20018 */ lw $s2, 0x18($sp) /* A67BC 801100BC 8FB10014 */ lw $s1, 0x14($sp) /* A67C0 801100C0 8FB00010 */ lw $s0, 0x10($sp) /* A67C4 801100C4 03E00008 */ jr $ra /* A67C8 801100C8 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void render_entities(void) { s32 i; for (i = 0; i < MAX_ENTITIES; i++) { Entity* entity = get_entity_by_index(i); if (entity != NULL) { if (!gGameStatusPtr->isBattle) { if (gEntityHideMode != ENTITY_HIDE_MODE_0 && !(entity->flags & ENTITY_FLAG_IGNORE_DISTANCE_CULLING) && dist2D(gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z, entity->position.x, entity->position.z) > 200.0f ) { continue; } if (gEntityHideMode == ENTITY_HIDE_MODE_1) { if (!(entity->flags & ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE1)) { continue; } } else if (gEntityHideMode == ENTITY_HIDE_MODE_2) { if (!(entity->flags & ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2)) { continue; } } } if (!(entity->flags & ENTITY_FLAG_HIDDEN)) { if (entity->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) { if (D_8014AFB0 == 0xFF) { if (entity->renderSetupFunc != NULL) { set_animator_render_callback( entity->virtualModelIndex, (void*)(u32) entity->listIndex, (void (*)(void*)) entity->renderSetupFunc ); } } else { set_animator_render_callback( entity->virtualModelIndex, (void*)(u32) entity->listIndex, func_8010FE44 ); } if (entity->gfxBaseAddr == NULL) { render_animated_model(entity->virtualModelIndex, &entity->transformMatrix); } else { render_animated_model_with_vertices(entity->virtualModelIndex, &entity->transformMatrix, entity->vertexSegment, entity->gfxBaseAddr); } } else { if (D_8014AFB0 == 0xFF) { if (entity->renderSetupFunc != NULL) { bind_entity_model_setupGfx( entity->virtualModelIndex, (void*)(u32) entity->listIndex, (void (*)(void*)) entity->renderSetupFunc ); } else { get_entity_model(entity->virtualModelIndex)->fpSetupGfxCallback = NULL; } } else { bind_entity_model_setupGfx(entity->virtualModelIndex, (void*)(u32)entity->listIndex, func_8010FE44); } if (entity->gfxBaseAddr == NULL) { draw_entity_model_A(entity->virtualModelIndex, &entity->transformMatrix); } else { draw_entity_model_B(entity->virtualModelIndex, &entity->transformMatrix, entity->vertexSegment, entity->gfxBaseAddr); } } } } } render_shadows(); }
### RAW ASSEMBLY INSTRUCTIONS: glabel throw_spiny_appendGfx /* 3CF7F4 E00C8454 27BDFF38 */ addiu $sp, $sp, -0xC8 /* 3CF7F8 E00C8458 0080302D */ daddu $a2, $a0, $zero /* 3CF7FC E00C845C 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3CF800 E00C8460 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3CF804 E00C8464 AFB300A4 */ sw $s3, 0xA4($sp) /* 3CF808 E00C8468 3C13800A */ lui $s3, %hi(gMainGfxPos) /* 3CF80C E00C846C 2673A66C */ addiu $s3, $s3, %lo(gMainGfxPos) /* 3CF810 E00C8470 27A40018 */ addiu $a0, $sp, 0x18 /* 3CF814 E00C8474 AFBF00B8 */ sw $ra, 0xB8($sp) /* 3CF818 E00C8478 AFB700B4 */ sw $s7, 0xB4($sp) /* 3CF81C E00C847C AFB600B0 */ sw $s6, 0xB0($sp) /* 3CF820 E00C8480 AFB500AC */ sw $s5, 0xAC($sp) /* 3CF824 E00C8484 AFB400A8 */ sw $s4, 0xA8($sp) /* 3CF828 E00C8488 AFB200A0 */ sw $s2, 0xA0($sp) /* 3CF82C E00C848C AFB1009C */ sw $s1, 0x9C($sp) /* 3CF830 E00C8490 AFB00098 */ sw $s0, 0x98($sp) /* 3CF834 E00C8494 F7B400C0 */ sdc1 $f20, 0xC0($sp) /* 3CF838 E00C8498 8E650000 */ lw $a1, 0x0($s3) /* 3CF83C E00C849C 8CD2000C */ lw $s2, 0xC($a2) /* 3CF840 E00C84A0 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3CF844 E00C84A4 D4208740 */ ldc1 $f0, -0x78C0($at) /* 3CF848 E00C84A8 00A0182D */ daddu $v1, $a1, $zero /* 3CF84C E00C84AC 24A50008 */ addiu $a1, $a1, 0x8 /* 3CF850 E00C84B0 AE650000 */ sw $a1, 0x0($s3) /* 3CF854 E00C84B4 8E55003C */ lw $s5, 0x3C($s2) /* 3CF858 E00C84B8 8E560000 */ lw $s6, 0x0($s2) /* 3CF85C E00C84BC C6540040 */ lwc1 $f20, 0x40($s2) /* 3CF860 E00C84C0 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3CF864 E00C84C4 AC620000 */ sw $v0, 0x0($v1) /* 3CF868 E00C84C8 AC600004 */ sw $zero, 0x4($v1) /* 3CF86C E00C84CC ACA70000 */ sw $a3, 0x0($a1) /* 3CF870 E00C84D0 8CC30010 */ lw $v1, 0x10($a2) /* 3CF874 E00C84D4 24A20008 */ addiu $v0, $a1, 0x8 /* 3CF878 E00C84D8 AE620000 */ sw $v0, 0x0($s3) /* 3CF87C E00C84DC 8C62001C */ lw $v0, 0x1C($v1) /* 3CF880 E00C84E0 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3CF884 E00C84E4 4600A521 */ cvt.d.s $f20, $f20 /* 3CF888 E00C84E8 4620A502 */ mul.d $f20, $f20, $f0 /* 3CF88C E00C84EC 00000000 */ nop /* 3CF890 E00C84F0 00431021 */ addu $v0, $v0, $v1 /* 3CF894 E00C84F4 3C03800B */ lui $v1, %hi(gCameras) /* 3CF898 E00C84F8 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* 3CF89C E00C84FC ACA20004 */ sw $v0, 0x4($a1) /* 3CF8A0 E00C8500 8E450004 */ lw $a1, 0x4($s2) /* 3CF8A4 E00C8504 8E460008 */ lw $a2, 0x8($s2) /* 3CF8A8 E00C8508 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 3CF8AC E00C850C 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 3CF8B0 E00C8510 8E47000C */ lw $a3, 0xC($s2) /* 3CF8B4 E00C8514 00028880 */ sll $s1, $v0, 2 /* 3CF8B8 E00C8518 02228821 */ addu $s1, $s1, $v0 /* 3CF8BC E00C851C 00118880 */ sll $s1, $s1, 2 /* 3CF8C0 E00C8520 02228823 */ subu $s1, $s1, $v0 /* 3CF8C4 E00C8524 001110C0 */ sll $v0, $s1, 3 /* 3CF8C8 E00C8528 02228821 */ addu $s1, $s1, $v0 /* 3CF8CC E00C852C 001188C0 */ sll $s1, $s1, 3 /* 3CF8D0 E00C8530 02238821 */ addu $s1, $s1, $v1 /* 3CF8D4 E00C8534 0C080108 */ jal shim_guTranslateF /* 3CF8D8 E00C8538 4620A520 */ cvt.s.d $f20, $f20 /* 3CF8DC E00C853C C6400058 */ lwc1 $f0, 0x58($s2) /* 3CF8E0 E00C8540 4600A002 */ mul.s $f0, $f20, $f0 /* 3CF8E4 E00C8544 00000000 */ nop /* 3CF8E8 E00C8548 44050000 */ mfc1 $a1, $f0 /* 3CF8EC E00C854C C640005C */ lwc1 $f0, 0x5C($s2) /* 3CF8F0 E00C8550 4600A002 */ mul.s $f0, $f20, $f0 /* 3CF8F4 E00C8554 00000000 */ nop /* 3CF8F8 E00C8558 3C170001 */ lui $s7, (0x11630 >> 16) /* 3CF8FC E00C855C 27B00058 */ addiu $s0, $sp, 0x58 /* 3CF900 E00C8560 4407A000 */ mfc1 $a3, $f20 /* 3CF904 E00C8564 44060000 */ mfc1 $a2, $f0 /* 3CF908 E00C8568 0C080110 */ jal shim_guScaleF /* 3CF90C E00C856C 0200202D */ daddu $a0, $s0, $zero /* 3CF910 E00C8570 0200202D */ daddu $a0, $s0, $zero /* 3CF914 E00C8574 27A50018 */ addiu $a1, $sp, 0x18 /* 3CF918 E00C8578 0C080114 */ jal shim_guMtxCatF /* 3CF91C E00C857C 00A0302D */ daddu $a2, $a1, $zero /* 3CF920 E00C8580 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3CF924 E00C8584 44810000 */ mtc1 $at, $f0 /* 3CF928 E00C8588 36F71630 */ ori $s7, $s7, (0x11630 & 0xFFFF) /* 3CF92C E00C858C E7A00010 */ swc1 $f0, 0x10($sp) /* 3CF930 E00C8590 44800000 */ mtc1 $zero, $f0 /* 3CF934 E00C8594 0200202D */ daddu $a0, $s0, $zero /* 3CF938 E00C8598 44060000 */ mfc1 $a2, $f0 /* 3CF93C E00C859C 8E450050 */ lw $a1, 0x50($s2) /* 3CF940 E00C85A0 0C080104 */ jal shim_guRotateF /* 3CF944 E00C85A4 00C0382D */ daddu $a3, $a2, $zero /* 3CF948 E00C85A8 0200202D */ daddu $a0, $s0, $zero /* 3CF94C E00C85AC 27A50018 */ addiu $a1, $sp, 0x18 /* 3CF950 E00C85B0 0C080114 */ jal shim_guMtxCatF /* 3CF954 E00C85B4 00A0302D */ daddu $a2, $a1, $zero /* 3CF958 E00C85B8 27A40018 */ addiu $a0, $sp, 0x18 /* 3CF95C E00C85BC 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3CF960 E00C85C0 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3CF964 E00C85C4 3C14800A */ lui $s4, %hi(gDisplayContext) /* 3CF968 E00C85C8 2694A674 */ addiu $s4, $s4, %lo(gDisplayContext) /* 3CF96C E00C85CC 96050000 */ lhu $a1, 0x0($s0) /* 3CF970 E00C85D0 8E820000 */ lw $v0, 0x0($s4) /* 3CF974 E00C85D4 00052980 */ sll $a1, $a1, 6 /* 3CF978 E00C85D8 00B72821 */ addu $a1, $a1, $s7 /* 3CF97C E00C85DC 0C080118 */ jal shim_guMtxF2L /* 3CF980 E00C85E0 00452821 */ addu $a1, $v0, $a1 /* 3CF984 E00C85E4 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 3CF988 E00C85E8 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 3CF98C E00C85EC 3C06DA38 */ lui $a2, (0xDA380001 >> 16) /* 3CF990 E00C85F0 34C60001 */ ori $a2, $a2, (0xDA380001 & 0xFFFF) /* 3CF994 E00C85F4 3C08D838 */ lui $t0, (0xD8380002 >> 16) /* 3CF998 E00C85F8 35080002 */ ori $t0, $t0, (0xD8380002 & 0xFFFF) /* 3CF99C E00C85FC 3C07DE00 */ lui $a3, (0xDE000000 >> 16) /* 3CF9A0 E00C8600 32B500FF */ andi $s5, $s5, 0xFF /* 3CF9A4 E00C8604 0016B080 */ sll $s6, $s6, 2 /* 3CF9A8 E00C8608 8E640000 */ lw $a0, 0x0($s3) /* 3CF9AC E00C860C 96020000 */ lhu $v0, 0x0($s0) /* 3CF9B0 E00C8610 0080282D */ daddu $a1, $a0, $zero /* 3CF9B4 E00C8614 24840008 */ addiu $a0, $a0, 0x8 /* 3CF9B8 E00C8618 AE640000 */ sw $a0, 0x0($s3) /* 3CF9BC E00C861C ACA30000 */ sw $v1, 0x0($a1) /* 3CF9C0 E00C8620 24430001 */ addiu $v1, $v0, 0x1 /* 3CF9C4 E00C8624 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3CF9C8 E00C8628 00021180 */ sll $v0, $v0, 6 /* 3CF9CC E00C862C A6030000 */ sh $v1, 0x0($s0) /* 3CF9D0 E00C8630 8E830000 */ lw $v1, 0x0($s4) /* 3CF9D4 E00C8634 00571021 */ addu $v0, $v0, $s7 /* 3CF9D8 E00C8638 00621821 */ addu $v1, $v1, $v0 /* 3CF9DC E00C863C 24820008 */ addiu $v0, $a0, 0x8 /* 3CF9E0 E00C8640 ACA30004 */ sw $v1, 0x4($a1) /* 3CF9E4 E00C8644 AE620000 */ sw $v0, 0x0($s3) /* 3CF9E8 E00C8648 24820010 */ addiu $v0, $a0, 0x10 /* 3CF9EC E00C864C AC860000 */ sw $a2, 0x0($a0) /* 3CF9F0 E00C8650 AE620000 */ sw $v0, 0x0($s3) /* 3CF9F4 E00C8654 8E230204 */ lw $v1, 0x204($s1) /* 3CF9F8 E00C8658 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3CF9FC E00C865C AC820008 */ sw $v0, 0x8($a0) /* 3CFA00 E00C8660 AC830004 */ sw $v1, 0x4($a0) /* 3CFA04 E00C8664 92430033 */ lbu $v1, 0x33($s2) /* 3CFA08 E00C8668 92450037 */ lbu $a1, 0x37($s2) /* 3CFA0C E00C866C 9246003B */ lbu $a2, 0x3B($s2) /* 3CFA10 E00C8670 24820018 */ addiu $v0, $a0, 0x18 /* 3CFA14 E00C8674 AE620000 */ sw $v0, 0x0($s3) /* 3CFA18 E00C8678 24820020 */ addiu $v0, $a0, 0x20 /* 3CFA1C E00C867C AC870010 */ sw $a3, 0x10($a0) /* 3CFA20 E00C8680 AE620000 */ sw $v0, 0x0($s3) /* 3CFA24 E00C8684 00031E00 */ sll $v1, $v1, 24 /* 3CFA28 E00C8688 00052C00 */ sll $a1, $a1, 16 /* 3CFA2C E00C868C 00651825 */ or $v1, $v1, $a1 /* 3CFA30 E00C8690 00063200 */ sll $a2, $a2, 8 /* 3CFA34 E00C8694 00661825 */ or $v1, $v1, $a2 /* 3CFA38 E00C8698 00751825 */ or $v1, $v1, $s5 /* 3CFA3C E00C869C AC83000C */ sw $v1, 0xC($a0) /* 3CFA40 E00C86A0 3C03E00D */ lui $v1, (0xE00D0000 >> 16) /* 3CFA44 E00C86A4 00761821 */ addu $v1, $v1, $s6 /* 3CFA48 E00C86A8 8C638710 */ lw $v1, -0x78F0($v1) /* 3CFA4C E00C86AC 24820028 */ addiu $v0, $a0, 0x28 /* 3CFA50 E00C86B0 AE620000 */ sw $v0, 0x0($s3) /* 3CFA54 E00C86B4 3C020900 */ lui $v0, %hi(D_090009F0_415A50) /* 3CFA58 E00C86B8 244209F0 */ addiu $v0, $v0, %lo(D_090009F0_415A50) /* 3CFA5C E00C86BC AC82001C */ sw $v0, 0x1C($a0) /* 3CFA60 E00C86C0 24020040 */ addiu $v0, $zero, 0x40 /* 3CFA64 E00C86C4 AC870018 */ sw $a3, 0x18($a0) /* 3CFA68 E00C86C8 AC880020 */ sw $t0, 0x20($a0) /* 3CFA6C E00C86CC AC820024 */ sw $v0, 0x24($a0) /* 3CFA70 E00C86D0 AC830014 */ sw $v1, 0x14($a0) /* 3CFA74 E00C86D4 8FBF00B8 */ lw $ra, 0xB8($sp) /* 3CFA78 E00C86D8 8FB700B4 */ lw $s7, 0xB4($sp) /* 3CFA7C E00C86DC 8FB600B0 */ lw $s6, 0xB0($sp) /* 3CFA80 E00C86E0 8FB500AC */ lw $s5, 0xAC($sp) /* 3CFA84 E00C86E4 8FB400A8 */ lw $s4, 0xA8($sp) /* 3CFA88 E00C86E8 8FB300A4 */ lw $s3, 0xA4($sp) /* 3CFA8C E00C86EC 8FB200A0 */ lw $s2, 0xA0($sp) /* 3CFA90 E00C86F0 8FB1009C */ lw $s1, 0x9C($sp) /* 3CFA94 E00C86F4 8FB00098 */ lw $s0, 0x98($sp) /* 3CFA98 E00C86F8 D7B400C0 */ ldc1 $f20, 0xC0($sp) /* 3CFA9C E00C86FC 03E00008 */ jr $ra /* 3CFAA0 E00C8700 27BD00C8 */ addiu $sp, $sp, 0xC8 /* 3CFAA4 E00C8704 00000000 */ nop /* 3CFAA8 E00C8708 00000000 */ nop /* 3CFAAC E00C870C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void throw_spiny_appendGfx(void* effect) { Matrix4f sp18; Matrix4f sp58; Camera* camera = &gCameras[gCurrentCameraID]; ThrowSpinyFXData* data = ((EffectInstance*)effect)->data.throwSpiny; s32 temp_s5 = data->rgba; s32 temp_s6 = data->unk_00; f32 scale = data->unk_40 * SPRITE_WORLD_SCALE_D; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z); shim_guScaleF(sp58, scale * data->xScale, scale * data->yScale, scale); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, data->yaw, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_30, data->unk_34, data->unk_38, temp_s5); gSPDisplayList(gMainGfxPos++, D_E00C8710[temp_s6]); gSPDisplayList(gMainGfxPos++, D_090009F0_3D04E0); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel evt_get_variable /* EC46C 802C7ABC 27BDFFE8 */ addiu $sp, $sp, -0x18 /* EC470 802C7AC0 3C07EFE8 */ lui $a3, (0xEFE82080 >> 16) /* EC474 802C7AC4 34E72080 */ ori $a3, $a3, (0xEFE82080 & 0xFFFF) /* EC478 802C7AC8 00E5102A */ slt $v0, $a3, $a1 /* EC47C 802C7ACC 104000B2 */ beqz $v0, .L802C7D98 /* EC480 802C7AD0 AFBF0010 */ sw $ra, 0x10($sp) /* EC484 802C7AD4 3C02F119 */ lui $v0, (0xF1194D80 >> 16) /* EC488 802C7AD8 34424D80 */ ori $v0, $v0, (0xF1194D80 & 0xFFFF) /* EC48C 802C7ADC 0045102A */ slt $v0, $v0, $a1 /* EC490 802C7AE0 104000AD */ beqz $v0, .L802C7D98 /* EC494 802C7AE4 3C06F2E3 */ lui $a2, (0xF2E31100 >> 16) /* EC498 802C7AE8 34C61100 */ ori $a2, $a2, (0xF2E31100 & 0xFFFF) /* EC49C 802C7AEC 00C5102A */ slt $v0, $a2, $a1 /* EC4A0 802C7AF0 14400007 */ bnez $v0, .L802C7B10 /* EC4A4 802C7AF4 3C02F414 */ lui $v0, (0xF4143E00 >> 16) /* EC4A8 802C7AF8 0C0B1248 */ jal evt_fixed_var_to_float /* EC4AC 802C7AFC 00A0202D */ daddu $a0, $a1, $zero /* EC4B0 802C7B00 4600008D */ trunc.w.s $f2, $f0 /* EC4B4 802C7B04 44021000 */ mfc1 $v0, $f2 /* EC4B8 802C7B08 080B1F67 */ j .L802C7D9C /* EC4BC 802C7B0C 00000000 */ nop .L802C7B10: /* EC4C0 802C7B10 34423E00 */ ori $v0, $v0, (0xF4143E00 & 0xFFFF) /* EC4C4 802C7B14 0045102A */ slt $v0, $v0, $a1 /* EC4C8 802C7B18 14400011 */ bnez $v0, .L802C7B60 /* EC4CC 802C7B1C 3C02F545 */ lui $v0, (0xF5456B00 >> 16) /* EC4D0 802C7B20 3C020C84 */ lui $v0, (0xC845880 >> 16) /* EC4D4 802C7B24 34425880 */ ori $v0, $v0, (0xC845880 & 0xFFFF) /* EC4D8 802C7B28 00A22821 */ addu $a1, $a1, $v0 /* EC4DC 802C7B2C 04A10002 */ bgez $a1, .L802C7B38 /* EC4E0 802C7B30 00A0182D */ daddu $v1, $a1, $zero /* EC4E4 802C7B34 24A3001F */ addiu $v1, $a1, 0x1F .L802C7B38: /* EC4E8 802C7B38 00033143 */ sra $a2, $v1, 5 /* EC4EC 802C7B3C 00C0182D */ daddu $v1, $a2, $zero /* EC4F0 802C7B40 00031140 */ sll $v0, $v1, 5 /* EC4F4 802C7B44 00A23023 */ subu $a2, $a1, $v0 /* EC4F8 802C7B48 8C820140 */ lw $v0, 0x140($a0) /* EC4FC 802C7B4C 00031880 */ sll $v1, $v1, 2 /* EC500 802C7B50 00621821 */ addu $v1, $v1, $v0 /* EC504 802C7B54 8C630000 */ lw $v1, 0x0($v1) /* EC508 802C7B58 080B1F37 */ j .L802C7CDC /* EC50C 802C7B5C 24020001 */ addiu $v0, $zero, 0x1 .L802C7B60: /* EC510 802C7B60 34426B00 */ ori $v0, $v0, (0xF5456B00 & 0xFFFF) /* EC514 802C7B64 0045102A */ slt $v0, $v0, $a1 /* EC518 802C7B68 1440000D */ bnez $v0, .L802C7BA0 /* EC51C 802C7B6C 3C02F676 */ lui $v0, (0xF6769800 >> 16) /* EC520 802C7B70 3C020B53 */ lui $v0, (0xB532B80 >> 16) /* EC524 802C7B74 34422B80 */ ori $v0, $v0, (0xB532B80 & 0xFFFF) /* EC528 802C7B78 00A22821 */ addu $a1, $a1, $v0 /* EC52C 802C7B7C 8C83013C */ lw $v1, 0x13C($a0) /* EC530 802C7B80 00051080 */ sll $v0, $a1, 2 /* EC534 802C7B84 00431021 */ addu $v0, $v0, $v1 /* EC538 802C7B88 8C450000 */ lw $a1, 0x0($v0) /* EC53C 802C7B8C 00E5102A */ slt $v0, $a3, $a1 /* EC540 802C7B90 10400081 */ beqz $v0, .L802C7D98 /* EC544 802C7B94 00C5102A */ slt $v0, $a2, $a1 /* EC548 802C7B98 080B1F5F */ j .L802C7D7C /* EC54C 802C7B9C 00000000 */ nop .L802C7BA0: /* EC550 802C7BA0 34429800 */ ori $v0, $v0, (0xF6769800 & 0xFFFF) /* EC554 802C7BA4 0045102A */ slt $v0, $v0, $a1 /* EC558 802C7BA8 14400007 */ bnez $v0, .L802C7BC8 /* EC55C 802C7BAC 3C02F7A7 */ lui $v0, (0xF7A7C500 >> 16) /* EC560 802C7BB0 3C040A21 */ lui $a0, (0xA21FE80 >> 16) /* EC564 802C7BB4 3484FE80 */ ori $a0, $a0, (0xA21FE80 & 0xFFFF) /* EC568 802C7BB8 0C05154E */ jal get_global_byte /* EC56C 802C7BBC 00A42021 */ addu $a0, $a1, $a0 /* EC570 802C7BC0 080B1F67 */ j .L802C7D9C /* EC574 802C7BC4 00000000 */ nop .L802C7BC8: /* EC578 802C7BC8 3442C500 */ ori $v0, $v0, (0xF7A7C500 & 0xFFFF) /* EC57C 802C7BCC 0045102A */ slt $v0, $v0, $a1 /* EC580 802C7BD0 14400007 */ bnez $v0, .L802C7BF0 /* EC584 802C7BD4 3C02F8D8 */ lui $v0, (0xF8D8F200 >> 16) /* EC588 802C7BD8 3C0408F0 */ lui $a0, (0x8F0D180 >> 16) /* EC58C 802C7BDC 3484D180 */ ori $a0, $a0, (0x8F0D180 & 0xFFFF) /* EC590 802C7BE0 0C051594 */ jal get_area_byte /* EC594 802C7BE4 00A42021 */ addu $a0, $a1, $a0 /* EC598 802C7BE8 080B1F67 */ j .L802C7D9C /* EC59C 802C7BEC 00000000 */ nop .L802C7BF0: /* EC5A0 802C7BF0 3442F200 */ ori $v0, $v0, (0xF8D8F200 & 0xFFFF) /* EC5A4 802C7BF4 0045102A */ slt $v0, $v0, $a1 /* EC5A8 802C7BF8 14400007 */ bnez $v0, .L802C7C18 /* EC5AC 802C7BFC 3C02FA0A */ lui $v0, (0xFA0A1F00 >> 16) /* EC5B0 802C7C00 3C0407BF */ lui $a0, (0x7BFA480 >> 16) /* EC5B4 802C7C04 3484A480 */ ori $a0, $a0, (0x7BFA480 & 0xFFFF) /* EC5B8 802C7C08 0C05152F */ jal get_global_flag /* EC5BC 802C7C0C 00A42021 */ addu $a0, $a1, $a0 /* EC5C0 802C7C10 080B1F67 */ j .L802C7D9C /* EC5C4 802C7C14 00000000 */ nop .L802C7C18: /* EC5C8 802C7C18 34421F00 */ ori $v0, $v0, (0xFA0A1F00 & 0xFFFF) /* EC5CC 802C7C1C 0045102A */ slt $v0, $v0, $a1 /* EC5D0 802C7C20 14400007 */ bnez $v0, .L802C7C40 /* EC5D4 802C7C24 3C02FB3B */ lui $v0, (0xFB3B4C00 >> 16) /* EC5D8 802C7C28 3C04068E */ lui $a0, (0x68E7780 >> 16) /* EC5DC 802C7C2C 34847780 */ ori $a0, $a0, (0x68E7780 & 0xFFFF) /* EC5E0 802C7C30 0C05157C */ jal get_area_flag /* EC5E4 802C7C34 00A42021 */ addu $a0, $a1, $a0 /* EC5E8 802C7C38 080B1F67 */ j .L802C7D9C /* EC5EC 802C7C3C 00000000 */ nop .L802C7C40: /* EC5F0 802C7C40 34424C00 */ ori $v0, $v0, (0xFB3B4C00 & 0xFFFF) /* EC5F4 802C7C44 0045102A */ slt $v0, $v0, $a1 /* EC5F8 802C7C48 14400012 */ bnez $v0, .L802C7C94 /* EC5FC 802C7C4C 3C02FC6C */ lui $v0, (0xFC6C7900 >> 16) /* EC600 802C7C50 3C02055D */ lui $v0, (0x55D4A80 >> 16) /* EC604 802C7C54 34424A80 */ ori $v0, $v0, (0x55D4A80 & 0xFFFF) /* EC608 802C7C58 00A22821 */ addu $a1, $a1, $v0 /* EC60C 802C7C5C 04A10002 */ bgez $a1, .L802C7C68 /* EC610 802C7C60 00A0182D */ daddu $v1, $a1, $zero /* EC614 802C7C64 24A3001F */ addiu $v1, $a1, 0x1F .L802C7C68: /* EC618 802C7C68 00033143 */ sra $a2, $v1, 5 /* EC61C 802C7C6C 00C0182D */ daddu $v1, $a2, $zero /* EC620 802C7C70 00031140 */ sll $v0, $v1, 5 /* EC624 802C7C74 00A23023 */ subu $a2, $a1, $v0 /* EC628 802C7C78 3C02802E */ lui $v0, %hi(gMapFlags) /* EC62C 802C7C7C 8C42A480 */ lw $v0, %lo(gMapFlags)($v0) /* EC630 802C7C80 00031880 */ sll $v1, $v1, 2 /* EC634 802C7C84 00621821 */ addu $v1, $v1, $v0 /* EC638 802C7C88 8C630000 */ lw $v1, 0x0($v1) /* EC63C 802C7C8C 080B1F37 */ j .L802C7CDC /* EC640 802C7C90 24020001 */ addiu $v0, $zero, 0x1 .L802C7C94: /* EC644 802C7C94 34427900 */ ori $v0, $v0, (0xFC6C7900 & 0xFFFF) /* EC648 802C7C98 0045102A */ slt $v0, $v0, $a1 /* EC64C 802C7C9C 14400013 */ bnez $v0, .L802C7CEC /* EC650 802C7CA0 3C02FD9D */ lui $v0, (0xFD9DA600 >> 16) /* EC654 802C7CA4 3C02042C */ lui $v0, (0x42C1D80 >> 16) /* EC658 802C7CA8 34421D80 */ ori $v0, $v0, (0x42C1D80 & 0xFFFF) /* EC65C 802C7CAC 00A22821 */ addu $a1, $a1, $v0 /* EC660 802C7CB0 04A10002 */ bgez $a1, .L802C7CBC /* EC664 802C7CB4 00A0182D */ daddu $v1, $a1, $zero /* EC668 802C7CB8 24A3001F */ addiu $v1, $a1, 0x1F .L802C7CBC: /* EC66C 802C7CBC 00033143 */ sra $a2, $v1, 5 /* EC670 802C7CC0 00C0182D */ daddu $v1, $a2, $zero /* EC674 802C7CC4 00031140 */ sll $v0, $v1, 5 /* EC678 802C7CC8 00A23023 */ subu $a2, $a1, $v0 /* EC67C 802C7CCC 00031880 */ sll $v1, $v1, 2 /* EC680 802C7CD0 00831821 */ addu $v1, $a0, $v1 /* EC684 802C7CD4 24020001 */ addiu $v0, $zero, 0x1 /* EC688 802C7CD8 8C6300C4 */ lw $v1, 0xC4($v1) .L802C7CDC: /* EC68C 802C7CDC 00C21004 */ sllv $v0, $v0, $a2 /* EC690 802C7CE0 00622824 */ and $a1, $v1, $v0 /* EC694 802C7CE4 080B1F67 */ j .L802C7D9C /* EC698 802C7CE8 0005102B */ sltu $v0, $zero, $a1 .L802C7CEC: /* EC69C 802C7CEC 3442A600 */ ori $v0, $v0, (0xFD9DA600 & 0xFFFF) /* EC6A0 802C7CF0 0045102A */ slt $v0, $v0, $a1 /* EC6A4 802C7CF4 14400010 */ bnez $v0, .L802C7D38 /* EC6A8 802C7CF8 3C02FECE */ lui $v0, (0xFECED300 >> 16) /* EC6AC 802C7CFC 3C0202FA */ lui $v0, (0x2FAF080 >> 16) /* EC6B0 802C7D00 3442F080 */ ori $v0, $v0, (0x2FAF080 & 0xFFFF) /* EC6B4 802C7D04 00A22821 */ addu $a1, $a1, $v0 /* EC6B8 802C7D08 3C03EFE8 */ lui $v1, (0xEFE82080 >> 16) /* EC6BC 802C7D0C 3C04802E */ lui $a0, %hi(gMapVars) /* EC6C0 802C7D10 8C84A484 */ lw $a0, %lo(gMapVars)($a0) /* EC6C4 802C7D14 00051080 */ sll $v0, $a1, 2 /* EC6C8 802C7D18 00441021 */ addu $v0, $v0, $a0 /* EC6CC 802C7D1C 8C450000 */ lw $a1, 0x0($v0) /* EC6D0 802C7D20 34632080 */ ori $v1, $v1, (0xEFE82080 & 0xFFFF) /* EC6D4 802C7D24 0065182A */ slt $v1, $v1, $a1 /* EC6D8 802C7D28 1060001B */ beqz $v1, .L802C7D98 /* EC6DC 802C7D2C 3C02F2E3 */ lui $v0, (0xF2E3D300 >> 16) /* EC6E0 802C7D30 080B1F5E */ j .L802C7D78 /* EC6E4 802C7D34 34421100 */ ori $v0, $v0, (0xF2E31100 & 0xFFFF) .L802C7D38: /* EC6E8 802C7D38 3442D300 */ ori $v0, $v0, (0xF2E3D300 & 0xFFFF) /* EC6EC 802C7D3C 0045102A */ slt $v0, $v0, $a1 /* EC6F0 802C7D40 14400016 */ bnez $v0, .L802C7D9C /* EC6F4 802C7D44 00A0102D */ daddu $v0, $a1, $zero /* EC6F8 802C7D48 3C0201C9 */ lui $v0, (0x1C9C380 >> 16) /* EC6FC 802C7D4C 3442C380 */ ori $v0, $v0, (0x1C9C380 & 0xFFFF) /* EC700 802C7D50 00A22821 */ addu $a1, $a1, $v0 /* EC704 802C7D54 00051080 */ sll $v0, $a1, 2 /* EC708 802C7D58 00821021 */ addu $v0, $a0, $v0 /* EC70C 802C7D5C 8C450084 */ lw $a1, 0x84($v0) /* EC710 802C7D60 3C02EFE8 */ lui $v0, (0xEFE82080 >> 16) /* EC714 802C7D64 34422080 */ ori $v0, $v0, (0xEFE82080 & 0xFFFF) /* EC718 802C7D68 0045102A */ slt $v0, $v0, $a1 /* EC71C 802C7D6C 1040000A */ beqz $v0, .L802C7D98 /* EC720 802C7D70 3C02F2E3 */ lui $v0, (0xF2E31100 >> 16) /* EC724 802C7D74 34421100 */ ori $v0, $v0, (0xF2E31100 & 0xFFFF) .L802C7D78: /* EC728 802C7D78 0045102A */ slt $v0, $v0, $a1 .L802C7D7C: /* EC72C 802C7D7C 14400007 */ bnez $v0, .L802C7D9C /* EC730 802C7D80 00A0102D */ daddu $v0, $a1, $zero /* EC734 802C7D84 0C0B1248 */ jal evt_fixed_var_to_float /* EC738 802C7D88 00A0202D */ daddu $a0, $a1, $zero /* EC73C 802C7D8C 4600008D */ trunc.w.s $f2, $f0 /* EC740 802C7D90 44051000 */ mfc1 $a1, $f2 /* EC744 802C7D94 00000000 */ nop .L802C7D98: /* EC748 802C7D98 00A0102D */ daddu $v0, $a1, $zero .L802C7D9C: /* EC74C 802C7D9C 8FBF0010 */ lw $ra, 0x10($sp) /* EC750 802C7DA0 03E00008 */ jr $ra /* EC754 802C7DA4 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: if ((evt_get_variable(script, var) & *args++) == 0) { script->ptrNextLine = evt_skip_if(script); return ApiStatus_DONE2; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel parasol_get_npc /* E287F0 802B6000 27BDFFD0 */ addiu $sp, $sp, -0x30 /* E287F4 802B6004 AFB00020 */ sw $s0, 0x20($sp) /* E287F8 802B6008 3C108011 */ lui $s0, %hi(gPlayerStatus) /* E287FC 802B600C 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) /* E28800 802B6010 AFBF0028 */ sw $ra, 0x28($sp) /* E28804 802B6014 AFB10024 */ sw $s1, 0x24($sp) .L802B6018: /* E28808 802B6018 8E030000 */ lw $v1, 0x0($s0) /* E2880C 802B601C 0461003E */ bgez $v1, .L802B6118 /* E28810 802B6020 0200882D */ daddu $s1, $s0, $zero /* E28814 802B6024 3C027FFF */ lui $v0, (0x7FFFFFFF >> 16) /* E28818 802B6028 3442FFFF */ ori $v0, $v0, (0x7FFFFFFF & 0xFFFF) /* E2881C 802B602C 3C040001 */ lui $a0, (0x10017 >> 16) /* E28820 802B6030 34840017 */ ori $a0, $a0, (0x10017 & 0xFFFF) /* E28824 802B6034 00621024 */ and $v0, $v1, $v0 /* E28828 802B6038 0C037FDE */ jal suggest_player_anim_always_forward /* E2882C 802B603C AE020000 */ sw $v0, 0x0($s0) .L802B6040: /* E28830 802B6040 C60C0028 */ lwc1 $f12, 0x28($s0) .L802B6044: /* E28834 802B6044 C60E0030 */ lwc1 $f14, 0x30($s0) glabel action_hammer_play_hit_fx /* E28838 802B6048 86020016 */ lh $v0, 0x16($s0) .L802B604C: /* E2883C 802B604C 3C014192 */ lui $at, (0x4192C745 >> 16) .L802B6050: /* E28840 802B6050 3421C745 */ ori $at, $at, (0x4192C745 & 0xFFFF) /* E28844 802B6054 44810000 */ mtc1 $at, $f0 .L802B6058: /* E28848 802B6058 3C01C06F */ lui $at, (0xC06F3B64 >> 16) /* E2884C 802B605C 34213B64 */ ori $at, $at, (0xC06F3B64 & 0xFFFF) glabel action_update_sliding /* E28850 802B6060 44811000 */ mtc1 $at, $f2 /* E28854 802B6064 3C013F4E */ lui $at, (0x3F4E4F76 >> 16) .L802B6068: /* E28858 802B6068 34214F76 */ ori $at, $at, (0x3F4E4F76 & 0xFFFF) /* E2885C 802B606C 44812000 */ mtc1 $at, $f4 /* E28860 802B6070 3C01BDCA */ lui $at, (0xBDCA233A >> 16) .L802B6074: /* E28864 802B6074 3421233A */ ori $at, $at, (0xBDCA233A & 0xFFFF) /* E28868 802B6078 44813000 */ mtc1 $at, $f6 glabel .L802B607C /* E2886C 802B607C 8604001A */ lh $a0, 0x1A($s0) .L802B6080: /* E28870 802B6080 3C03800B */ lui $v1, %hi(gCameras) /* E28874 802B6084 24631D80 */ addiu $v1, $v1, %lo(gCameras) /* E28878 802B6088 A20000B6 */ sb $zero, 0xB6($s0) .L802B608C: /* E2887C 802B608C 44824000 */ mtc1 $v0, $f8 .L802B6090: /* E28880 802B6090 00000000 */ nop .L802B6094: /* E28884 802B6094 46804220 */ cvt.s.w $f8, $f8 /* E28888 802B6098 44064000 */ mfc1 $a2, $f8 glabel action_update_state_23 /* E2888C 802B609C 8E020000 */ lw $v0, 0x0($s0) /* E28890 802B60A0 44844000 */ mtc1 $a0, $f8 glabel action_update_use_spinning_flower /* E28894 802B60A4 00000000 */ nop .L802B60A8: /* E28898 802B60A8 46804220 */ cvt.s.w $f8, $f8 .L802B60AC: /* E2889C 802B60AC E6000070 */ swc1 $f0, 0x70($s0) /* E288A0 802B60B0 E6020074 */ swc1 $f2, 0x74($s0) glabel action_update_jump /* E288A4 802B60B4 E6040078 */ swc1 $f4, 0x78($s0) /* E288A8 802B60B8 E606007C */ swc1 $f6, 0x7C($s0) /* E288AC 802B60BC 34420008 */ ori $v0, $v0, 0x8 /* E288B0 802B60C0 AE020000 */ sw $v0, 0x0($s0) /* E288B4 802B60C4 94620002 */ lhu $v0, 0x2($v1) .L802B60C8: /* E288B8 802B60C8 44074000 */ mfc1 $a3, $f8 /* E288BC 802B60CC 34420001 */ ori $v0, $v0, 0x1 glabel .L802B60D0 /* E288C0 802B60D0 0C00A720 */ jal atan2 .L802B60D4: /* E288C4 802B60D4 A4620002 */ sh $v0, 0x2($v1) /* E288C8 802B60D8 86020016 */ lh $v0, 0x16($s0) /* E288CC 802B60DC 8603001A */ lh $v1, 0x1A($s0) /* E288D0 802B60E0 3C01802B */ lui $at, %hi(.L802B6240) /* E288D4 802B60E4 E4206240 */ swc1 $f0, %lo(.L802B6240)($at) .L802B60E8: /* E288D8 802B60E8 44826000 */ mtc1 $v0, $f12 .L802B60EC: /* E288DC 802B60EC 00000000 */ nop .L802B60F0: /* E288E0 802B60F0 46806320 */ cvt.s.w $f12, $f12 glabel .L802B60F4 /* E288E4 802B60F4 44837000 */ mtc1 $v1, $f14 /* E288E8 802B60F8 00000000 */ nop /* E288EC 802B60FC 0C038022 */ jal get_xz_dist_to_player .L802B6100: /* E288F0 802B6100 468073A0 */ cvt.s.w $f14, $f14 .L802B6104: /* E288F4 802B6104 3C014190 */ lui $at, (0x41900000 >> 16) .L802B6108: /* E288F8 802B6108 44811000 */ mtc1 $at, $f2 glabel .L802B610C /* E288FC 802B610C 00000000 */ nop .L802B6110: /* E28900 802B6110 46020003 */ div.s $f0, $f0, $f2 /* E28904 802B6114 E6000054 */ swc1 $f0, 0x54($s0) .L802B6118: /* E28908 802B6118 3C01802B */ lui $at, %hi(.L802B6240) /* E2890C 802B611C C42C6240 */ lwc1 $f12, %lo(.L802B6240)($at) glabel action_update_parasol /* E28910 802B6120 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) .L802B6124: /* E28914 802B6124 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) .L802B6128: /* E28918 802B6128 44810000 */ mtc1 $at, $f0 /* E2891C 802B612C 00000000 */ nop /* E28920 802B6130 46006302 */ mul.s $f12, $f12, $f0 glabel .L802B6134 /* E28924 802B6134 00000000 */ nop /* E28928 802B6138 27A50010 */ addiu $a1, $sp, 0x10 .L802B613C: /* E2892C 802B613C 3C0143B4 */ lui $at, (0x43B40000 >> 16) .L802B6140: /* E28930 802B6140 44810000 */ mtc1 $at, $f0 .L802B6144: /* E28934 802B6144 27A60014 */ addiu $a2, $sp, 0x14 /* E28938 802B6148 0C00A82D */ jal sin_cos_rad .L802B614C: /* E2893C 802B614C 46006303 */ div.s $f12, $f12, $f0 .L802B6150: /* E28940 802B6150 3C030004 */ lui $v1, (0x40000 >> 16) .L802B6154: /* E28944 802B6154 8E020000 */ lw $v0, 0x0($s0) .L802B6158: /* E28948 802B6158 C6020054 */ lwc1 $f2, 0x54($s0) .L802B615C: /* E2894C 802B615C 00431024 */ and $v0, $v0, $v1 /* E28950 802B6160 10400006 */ beqz $v0, .L802B617C .L802B6164: /* E28954 802B6164 00000000 */ nop .L802B6168: /* E28958 802B6168 3C013F00 */ lui $at, (0x3F000000 >> 16) /* E2895C 802B616C 44810000 */ mtc1 $at, $f0 glabel .L802B6170 /* E28960 802B6170 00000000 */ nop glabel .L802B6174 /* E28964 802B6174 46001082 */ mul.s $f2, $f2, $f0 /* E28968 802B6178 00000000 */ nop .L802B617C: /* E2896C 802B617C C7A00010 */ lwc1 $f0, 0x10($sp) .L802B6180: /* E28970 802B6180 46001002 */ mul.s $f0, $f2, $f0 glabel .L802B6184 /* E28974 802B6184 00000000 */ nop .L802B6188: /* E28978 802B6188 C7A40014 */ lwc1 $f4, 0x14($sp) .L802B618C: /* E2897C 802B618C 46041102 */ mul.s $f4, $f2, $f4 .L802B6190: /* E28980 802B6190 00000000 */ nop .L802B6194: /* E28984 802B6194 C6020028 */ lwc1 $f2, 0x28($s0) glabel func_802B6198 /* E28988 802B6198 46001080 */ add.s $f2, $f2, $f0 /* E2898C 802B619C C6000030 */ lwc1 $f0, 0x30($s0) .L802B61A0: /* E28990 802B61A0 820200B6 */ lb $v0, 0xB6($s0) .L802B61A4: /* E28994 802B61A4 46040001 */ sub.s $f0, $f0, $f4 .L802B61A8: /* E28998 802B61A8 E6020028 */ swc1 $f2, 0x28($s0) .L802B61AC: /* E2899C 802B61AC 14400012 */ bnez $v0, .L802B61F8 .L802B61B0: /* E289A0 802B61B0 E6000030 */ swc1 $f0, 0x30($s0) .L802B61B4: /* E289A4 802B61B4 0C038D12 */ jal integrate_gravity /* E289A8 802B61B8 00000000 */ nop /* E289AC 802B61BC C600002C */ lwc1 $f0, 0x2C($s0) glabel func_802B61C0 /* E289B0 802B61C0 C6040070 */ lwc1 $f4, 0x70($s0) /* E289B4 802B61C4 46040000 */ add.s $f0, $f0, $f4 .L802B61C8: /* E289B8 802B61C8 44801000 */ mtc1 $zero, $f2 .L802B61CC: /* E289BC 802B61CC 00000000 */ nop /* E289C0 802B61D0 4602203C */ c.lt.s $f4, $f2 .L802B61D4: /* E289C4 802B61D4 00000000 */ nop .L802B61D8: /* E289C8 802B61D8 45000014 */ bc1f .L802B622C .L802B61DC: /* E289CC 802B61DC E600002C */ swc1 $f0, 0x2C($s0) /* E289D0 802B61E0 8E020000 */ lw $v0, 0x0($s0) glabel func_802B61E4 /* E289D4 802B61E4 24030001 */ addiu $v1, $zero, 0x1 .L802B61E8: /* E289D8 802B61E8 A20300B6 */ sb $v1, 0xB6($s0) .L802B61EC: /* E289DC 802B61EC 34420004 */ ori $v0, $v0, 0x4 .L802B61F0: /* E289E0 802B61F0 080AD88B */ j .L802B622C .L802B61F4: /* E289E4 802B61F4 AE020000 */ sw $v0, 0x0($s0) .L802B61F8: /* E289E8 802B61F8 0C038D36 */ jal func_800E34D8 .L802B61FC: /* E289EC 802B61FC 00000000 */ nop .L802B6200: /* E289F0 802B6200 46000306 */ mov.s $f12, $f0 .L802B6204: /* E289F4 802B6204 0C038D45 */ jal player_check_collision_below glabel .L802B6208 /* E289F8 802B6208 27A50018 */ addiu $a1, $sp, 0x18 /* E289FC 802B620C 8FA40018 */ lw $a0, 0x18($sp) .L802B6210: /* E28A00 802B6210 04800006 */ bltz $a0, .L802B622C .L802B6214: /* E28A04 802B6214 E620002C */ swc1 $f0, 0x2C($s1) glabel .L802B6218 /* E28A08 802B6218 0C016F6A */ jal get_collider_flags /* E28A0C 802B621C 00000000 */ nop .L802B6220: /* E28A10 802B6220 AFA20018 */ sw $v0, 0x18($sp) .L802B6224: /* E28A14 802B6224 0C039769 */ jal set_action_state glabel .L802B6228 /* E28A18 802B6228 2404000A */ addiu $a0, $zero, 0xA .L802B622C: /* E28A1C 802B622C 8FBF0028 */ lw $ra, 0x28($sp) glabel action_update_step_up_peach /* E28A20 802B6230 8FB10024 */ lw $s1, 0x24($sp) /* E28A24 802B6234 8FB00020 */ lw $s0, 0x20($sp) glabel .L802B6238 /* E28A28 802B6238 03E00008 */ jr $ra glabel .L802B623C /* E28A2C 802B623C 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void action_update_knockback(void) { PlayerStatus* playerStatus = &gPlayerStatus; f32 dx, dy; f32 speed; static f32 ReturnAngle; if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) { playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED; suggest_player_anim_always_forward(ANIM_Mario1_Hurt); playerStatus->flags |= PS_FLAG_FLYING; playerStatus->actionSubstate = SUBSTATE_FLYING; playerStatus->gravityIntegrator[0] = 18.3473f; playerStatus->gravityIntegrator[1] = -3.738f; playerStatus->gravityIntegrator[2] = 0.8059f; playerStatus->gravityIntegrator[3] = -0.0987f; gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y; ReturnAngle = atan2(playerStatus->position.x, playerStatus->position.z, playerStatus->lastGoodPosition.x, playerStatus->lastGoodPosition.z); playerStatus->currentSpeed = get_xz_dist_to_player(playerStatus->lastGoodPosition.x, playerStatus->lastGoodPosition.z) / 18.0f; } sin_cos_rad(DEG_TO_RAD(ReturnAngle), &dx, &dy); speed = playerStatus->currentSpeed; if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) { speed *= 0.5f; } playerStatus->position.x += speed * dx; playerStatus->position.z -= speed * dy; if (playerStatus->actionSubstate == SUBSTATE_FLYING) { integrate_gravity(); playerStatus->position.y += playerStatus->gravityIntegrator[0]; if (playerStatus->gravityIntegrator[0] < 0.0f) { playerStatus->actionSubstate = SUBSTATE_FALLING; playerStatus->flags |= PS_FLAG_FALLING; } } else { s32 colliderID; playerStatus->position.y = player_check_collision_below(player_fall_distance(), &colliderID); if (colliderID >= 0) { colliderID = get_collider_flags(colliderID); //TODO surfaceType set_action_state(ACTION_STATE_LAND); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel load_engine_data /* 21DC 80026DDC 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 21E0 80026DE0 3C040010 */ lui $a0, %hi(D_FEE30) /* 21E4 80026DE4 2484EE30 */ addiu $a0, $a0, %lo(D_FEE30) /* 21E8 80026DE8 3C050010 */ lui $a1, %hi(D_102610) /* 21EC 80026DEC 24A52610 */ addiu $a1, $a1, %lo(D_102610) /* 21F0 80026DF0 3C06802E */ lui $a2, %hi(spr_init_quad_cache) /* 21F4 80026DF4 24C6BD40 */ addiu $a2, $a2, %lo(spr_init_quad_cache) /* 21F8 80026DF8 AFBF0014 */ sw $ra, 0x14($sp) /* 21FC 80026DFC 0C00A5CF */ jal dma_copy /* 2200 80026E00 AFB00010 */ sw $s0, 0x10($sp) /* 2204 80026E04 3C040007 */ lui $a0, %hi(D_759B0) /* 2208 80026E08 248459B0 */ addiu $a0, $a0, %lo(D_759B0) /* 220C 80026E0C 3C05000A */ lui $a1, %hi(D_A5DD0) /* 2210 80026E10 24A55DD0 */ addiu $a1, $a1, %lo(D_A5DD0) /* 2214 80026E14 3C06800E */ lui $a2, %hi(npc_raycast_down) /* 2218 80026E18 24C6C500 */ addiu $a2, $a2, %lo(npc_raycast_down) /* 221C 80026E1C 0C00A5CF */ jal dma_copy /* 2220 80026E20 00000000 */ nop /* 2224 80026E24 3C04000E */ lui $a0, %hi(D_E79B0) /* 2228 80026E28 248479B0 */ addiu $a0, $a0, %lo(D_E79B0) /* 222C 80026E2C 3C050010 */ lui $a1, %hi(D_FEE30) /* 2230 80026E30 24A5EE30 */ addiu $a1, $a1, %lo(D_FEE30) /* 2234 80026E34 3C06802C */ lui $a2, %hi(sort_scripts) /* 2238 80026E38 24C63000 */ addiu $a2, $a2, %lo(sort_scripts) /* 223C 80026E3C 0C00A5CF */ jal dma_copy /* 2240 80026E40 00000000 */ nop /* 2244 80026E44 3C040010 */ lui $a0, %hi(D_102610) /* 2248 80026E48 24842610 */ addiu $a0, $a0, %lo(D_102610) /* 224C 80026E4C 3C050011 */ lui $a1, %hi(D_10CC10) /* 2250 80026E50 24A5CC10 */ addiu $a1, $a1, %lo(D_10CC10) /* 2254 80026E54 3C06802E */ lui $a2, %hi(entity_Shadow_init) /* 2258 80026E58 24C60D90 */ addiu $a2, $a2, %lo(entity_Shadow_init) /* 225C 80026E5C 0C00A5CF */ jal dma_copy /* 2260 80026E60 00000000 */ nop /* 2264 80026E64 3C04000A */ lui $a0, %hi(D_A5DD0) /* 2268 80026E68 24845DD0 */ addiu $a0, $a0, %lo(D_A5DD0) /* 226C 80026E6C 3C05000E */ lui $a1, %hi(D_E79B0) /* 2270 80026E70 24A579B0 */ addiu $a1, $a1, %lo(D_E79B0) /* 2274 80026E74 3C068011 */ lui $a2, %hi(update_entities) /* 2278 80026E78 24C6F6D0 */ addiu $a2, $a2, %lo(update_entities) /* 227C 80026E7C 0C00A5CF */ jal dma_copy /* 2280 80026E80 00000000 */ nop /* 2284 80026E84 3C040011 */ lui $a0, %hi(D_10CC10) /* 2288 80026E88 2484CC10 */ addiu $a0, $a0, %lo(D_10CC10) /* 228C 80026E8C 3C050011 */ lui $a1, %hi(D_10F1B0) /* 2290 80026E90 24A5F1B0 */ addiu $a1, $a1, %lo(D_10F1B0) /* 2294 80026E94 3C06802F */ lui $a2, %hi(D_802EB3D0) /* 2298 80026E98 24C6B3D0 */ addiu $a2, $a2, %lo(D_802EB3D0) /* 229C 80026E9C 0C00A5CF */ jal dma_copy /* 22A0 80026EA0 00000000 */ nop /* 22A4 80026EA4 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 22A8 80026EA8 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 22AC 80026EAC 8E020000 */ lw $v0, 0x0($s0) /* 22B0 80026EB0 3C01800A */ lui $at, %hi(gOverrideFlags) /* 22B4 80026EB4 AC20A650 */ sw $zero, %lo(gOverrideFlags)($at) /* 22B8 80026EB8 A0400079 */ sb $zero, 0x79($v0) /* 22BC 80026EBC 8E030000 */ lw $v1, 0x0($s0) /* 22C0 80026EC0 24040001 */ addiu $a0, $zero, 0x1 /* 22C4 80026EC4 A064007A */ sb $a0, 0x7A($v1) /* 22C8 80026EC8 8E020000 */ lw $v0, 0x0($s0) /* 22CC 80026ECC A4600148 */ sh $zero, 0x148($v1) /* 22D0 80026ED0 A044007C */ sb $a0, 0x7C($v0) /* 22D4 80026ED4 8E030000 */ lw $v1, 0x0($s0) /* 22D8 80026ED8 2402FFFF */ addiu $v0, $zero, -0x1 /* 22DC 80026EDC A06200A8 */ sb $v0, 0xA8($v1) /* 22E0 80026EE0 8E020000 */ lw $v0, 0x0($s0) /* 22E4 80026EE4 A04000AA */ sb $zero, 0xAA($v0) /* 22E8 80026EE8 8E020000 */ lw $v0, 0x0($s0) /* 22EC 80026EEC A0400081 */ sb $zero, 0x81($v0) /* 22F0 80026EF0 8E030000 */ lw $v1, 0x0($s0) /* 22F4 80026EF4 2402FFF8 */ addiu $v0, $zero, -0x8 /* 22F8 80026EF8 A0620082 */ sb $v0, 0x82($v1) /* 22FC 80026EFC 8E030000 */ lw $v1, 0x0($s0) /* 2300 80026F00 24020004 */ addiu $v0, $zero, 0x4 /* 2304 80026F04 A0620083 */ sb $v0, 0x83($v1) /* 2308 80026F08 8E020000 */ lw $v0, 0x0($s0) /* 230C 80026F0C 3C01800A */ lui $at, %hi(timeFreezeMode) /* 2310 80026F10 AC20A5D8 */ sw $zero, %lo(timeFreezeMode)($at) /* 2314 80026F14 A440013C */ sh $zero, 0x13C($v0) /* 2318 80026F18 A0400075 */ sb $zero, 0x75($v0) /* 231C 80026F1C 8E030000 */ lw $v1, 0x0($s0) /* 2320 80026F20 24020005 */ addiu $v0, $zero, 0x5 /* 2324 80026F24 3C018007 */ lui $at, %hi(gGameStepDelayCount) /* 2328 80026F28 A0224021 */ sb $v0, %lo(gGameStepDelayCount)($at) /* 232C 80026F2C 0C00AE13 */ jal fio_init_flash /* 2330 80026F30 AC600168 */ sw $zero, 0x168($v1) /* 2334 80026F34 0C00A20E */ jal func_80028838 /* 2338 80026F38 00000000 */ nop /* 233C 80026F3C 0C00AB00 */ jal general_heap_create /* 2340 80026F40 00000000 */ nop /* 2344 80026F44 0C047624 */ jal clear_render_tasks /* 2348 80026F48 00000000 */ nop /* 234C 80026F4C 0C048C2E */ jal clear_worker_list /* 2350 80026F50 00000000 */ nop /* 2354 80026F54 0C0B0C77 */ jal clear_script_list /* 2358 80026F58 00000000 */ nop /* 235C 80026F5C 0C00B7BD */ jal create_cameras_a /* 2360 80026F60 00000000 */ nop /* 2364 80026F64 0C037F14 */ jal clear_player_status /* 2368 80026F68 00000000 */ nop /* 236C 80026F6C 0C0B763E */ jal spr_init_sprites /* 2370 80026F70 0000202D */ daddu $a0, $zero, $zero /* 2374 80026F74 0C0482EC */ jal clear_entity_models /* 2378 80026F78 00000000 */ nop /* 237C 80026F7C 0C047889 */ jal clear_animator_list /* 2380 80026F80 00000000 */ nop /* 2384 80026F84 0C045751 */ jal clear_model_data /* 2388 80026F88 00000000 */ nop /* 238C 80026F8C 0C052010 */ jal clear_sprite_shading_data /* 2390 80026F90 00000000 */ nop /* 2394 80026F94 0C05177E */ jal reset_background_settings /* 2398 80026F98 00000000 */ nop /* 239C 80026F9C 0C048D98 */ jal clear_character_set /* 23A0 80026FA0 00000000 */ nop /* 23A4 80026FA4 0C048D9D */ jal clear_printers /* 23A8 80026FA8 00000000 */ nop /* 23AC 80026FAC 0C044AE6 */ jal clear_game_modes /* 23B0 80026FB0 00000000 */ nop /* 23B4 80026FB4 0C00E12F */ jal clear_npcs /* 23B8 80026FB8 00000000 */ nop /* 23BC 80026FBC 0C050440 */ jal hud_element_clear_cache /* 23C0 80026FC0 00000000 */ nop /* 23C4 80026FC4 0C0515A0 */ jal clear_trigger_data /* 23C8 80026FC8 00000000 */ nop /* 23CC 80026FCC 0C04432E */ jal clear_entity_data /* 23D0 80026FD0 0000202D */ daddu $a0, $zero, $zero /* 23D4 80026FD4 0C039CE8 */ jal clear_player_data /* 23D8 80026FD8 00000000 */ nop /* 23DC 80026FDC 0C00F8CE */ jal init_encounter_status /* 23E0 80026FE0 00000000 */ nop /* 23E4 80026FE4 0C04E042 */ jal clear_screen_overlays /* 23E8 80026FE8 00000000 */ nop /* 23EC 80026FEC 0C016727 */ jal clear_effect_data /* 23F0 80026FF0 00000000 */ nop /* 23F4 80026FF4 0C0514C8 */ jal clear_saved_variables /* 23F8 80026FF8 00000000 */ nop /* 23FC 80026FFC 0C04C3FC */ jal clear_item_entity_data /* 2400 80027000 00000000 */ nop /* 2404 80027004 0C052926 */ jal bgm_reset_sequence_players /* 2408 80027008 00000000 */ nop /* 240C 8002700C 0C051C8C */ jal reset_ambient_sounds /* 2410 80027010 00000000 */ nop /* 2414 80027014 0C052586 */ jal sfx_clear_sounds /* 2418 80027018 00000000 */ nop /* 241C 8002701C 0C051CFC */ jal clear_windows /* 2420 80027020 00000000 */ nop /* 2424 80027024 0C00AE90 */ jal initialize_curtains /* 2428 80027028 00000000 */ nop /* 242C 8002702C 0C00A3B8 */ jal poll_rumble /* 2430 80027030 00000000 */ nop /* 2434 80027034 0000182D */ daddu $v1, $zero, $zero /* 2438 80027038 24050003 */ addiu $a1, $zero, 0x3 /* 243C 8002703C 2404000C */ addiu $a0, $zero, 0xC /* 2440 80027040 8E100000 */ lw $s0, 0x0($s0) .L80027044: /* 2444 80027044 A6050050 */ sh $a1, 0x50($s0) /* 2448 80027048 A6040048 */ sh $a0, 0x48($s0) /* 244C 8002704C 24630001 */ addiu $v1, $v1, 0x1 /* 2450 80027050 28620004 */ slti $v0, $v1, 0x4 /* 2454 80027054 1440FFFB */ bnez $v0, .L80027044 /* 2458 80027058 26100002 */ addiu $s0, $s0, 0x2 /* 245C 8002705C 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 2460 80027060 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 2464 80027064 8C620000 */ lw $v0, 0x0($v1) /* 2468 80027068 0000202D */ daddu $a0, $zero, $zero /* 246C 8002706C 34420008 */ ori $v0, $v0, 0x8 /* 2470 80027070 0C00CD3C */ jal set_game_mode /* 2474 80027074 AC620000 */ sw $v0, 0x0($v1) /* 2478 80027078 8FBF0014 */ lw $ra, 0x14($sp) /* 247C 8002707C 8FB00010 */ lw $s0, 0x10($sp) /* 2480 80027080 03E00008 */ jr $ra /* 2484 80027084 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void load_engine_data(void) { s32 i; dma_copy(engine4_ROM_START, engine4_ROM_END, engine4_VRAM); dma_copy(engine1_ROM_START, engine1_ROM_END, engine1_VRAM); dma_copy(evt_ROM_START, evt_ROM_END, evt_VRAM); dma_copy(entity_ROM_START, entity_ROM_END, entity_VRAM); dma_copy(engine2_ROM_START, engine2_ROM_END, engine2_VRAM); dma_copy(font_width_ROM_START, font_width_ROM_END, font_width_VRAM); gOverrideFlags = 0; gGameStatusPtr->unk_79 = 0; gGameStatusPtr->backgroundFlags = 0; gGameStatusPtr->musicEnabled = 1; gGameStatusPtr->unk_7C = 1; gGameStatusPtr->creditsViewportMode = -1; gGameStatusPtr->demoFlags = 0; gGameStatusPtr->multiplayerEnabled = 0; gGameStatusPtr->unk_82 = -8; gGameStatusPtr->unk_83 = 4; timeFreezeMode = 0; gGameStatusPtr->debugQuizmo = gGameStatusPtr->unk_13C = 0; gGameStepDelayCount = 5; gGameStatusPtr->saveCount = 0; fio_init_flash(); func_80028838(); general_heap_create(); clear_render_tasks(); clear_worker_list(); clear_script_list(); create_cameras_a(); clear_player_status(); spr_init_sprites(PLAYER_SPRITES_MARIO_WORLD); clear_entity_models(); clear_animator_list(); clear_model_data(); clear_sprite_shading_data(); reset_background_settings(); clear_character_set(); clear_printers(); clear_game_modes(); clear_npcs(); hud_element_clear_cache(); clear_trigger_data(); clear_entity_data(0); clear_player_data(); init_encounter_status(); clear_screen_overlays(); clear_effect_data(); clear_saved_variables(); clear_item_entity_data(); bgm_reset_sequence_players(); reset_ambient_sounds(); sfx_clear_sounds(); clear_windows(); initialize_curtains(); poll_rumble(); for (i = 0; i < ARRAY_COUNT(gGameStatusPtr->unk_50); i++) { gGameStatusPtr->unk_50[i] = 3; gGameStatusPtr->unk_48[i] = 12; } gOverrideFlags |= GLOBAL_OVERRIDES_8; set_game_mode(GAME_MODE_STARTUP); }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_bgm_dispatch_player_event /* 28BE0 8004D7E0 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 28BE4 8004D7E4 AFB20018 */ sw $s2, 0x18($sp) /* 28BE8 8004D7E8 0080902D */ daddu $s2, $a0, $zero /* 28BEC 8004D7EC AFB50024 */ sw $s5, 0x24($sp) /* 28BF0 8004D7F0 AFBF0028 */ sw $ra, 0x28($sp) /* 28BF4 8004D7F4 AFB40020 */ sw $s4, 0x20($sp) /* 28BF8 8004D7F8 AFB3001C */ sw $s3, 0x1C($sp) /* 28BFC 8004D7FC AFB10014 */ sw $s1, 0x14($sp) glabel func_8004D800 /* 28C00 8004D800 AFB00010 */ sw $s0, 0x10($sp) /* 28C04 8004D804 8E540000 */ lw $s4, 0x0($s2) /* 28C08 8004D808 8E530010 */ lw $s3, 0x10($s2) /* 28C0C 8004D80C 12800074 */ beqz $s4, .L8004D9E0 /* 28C10 8004D810 0000A82D */ daddu $s5, $zero, $zero /* 28C14 8004D814 0C0135E5 */ jal au_bgm_get_player_with_song_name /* 28C18 8004D818 0280202D */ daddu $a0, $s4, $zero /* 28C1C 8004D81C 0040802D */ daddu $s0, $v0, $zero /* 28C20 8004D820 52000070 */ beql $s0, $zero, .L8004D9E4 /* 28C24 8004D824 24150002 */ addiu $s5, $zero, 0x2 /* 28C28 8004D828 8E020064 */ lw $v0, 0x64($s0) /* 28C2C 8004D82C 8E450004 */ lw $a1, 0x4($s2) /* 28C30 8004D830 10A00008 */ beqz $a1, .L8004D854 /* 28C34 8004D834 24510010 */ addiu $s1, $v0, 0x10 /* 28C38 8004D838 28A22711 */ slti $v0, $a1, 0x2711 /* 28C3C 8004D83C 14400003 */ bnez $v0, .L8004D84C /* 28C40 8004D840 28A200FA */ slti $v0, $a1, 0xFA /* 28C44 8004D844 08013615 */ j .L8004D854 /* 28C48 8004D848 24052710 */ addiu $a1, $zero, 0x2710 .L8004D84C: /* 28C4C 8004D84C 54400001 */ bnel $v0, $zero, .L8004D854 /* 28C50 8004D850 240500FA */ addiu $a1, $zero, 0xFA .L8004D854: /* 28C54 8004D854 8E460008 */ lw $a2, 0x8($s2) /* 28C58 8004D858 28C20080 */ slti $v0, $a2, 0x80 /* 28C5C 8004D85C 50400001 */ beql $v0, $zero, .L8004D864 /* 28C60 8004D860 2406007F */ addiu $a2, $zero, 0x7F .L8004D864: /* 28C64 8004D864 10C00002 */ beqz $a2, .L8004D870 /* 28C68 8004D868 00061200 */ sll $v0, $a2, 8 /* 28C6C 8004D86C 344600FF */ ori $a2, $v0, 0xFF .L8004D870: /* 28C70 8004D870 8E47000C */ lw $a3, 0xC($s2) /* 28C74 8004D874 28E20080 */ slti $v0, $a3, 0x80 /* 28C78 8004D878 50400001 */ beql $v0, $zero, .L8004D880 /* 28C7C 8004D87C 2407007F */ addiu $a3, $zero, 0x7F .L8004D880: /* 28C80 8004D880 10E00003 */ beqz $a3, .L8004D890 /* 28C84 8004D884 00071200 */ sll $v0, $a3, 8 /* 28C88 8004D888 08013625 */ j .L8004D894 /* 28C8C 8004D88C 344700FF */ ori $a3, $v0, 0xFF .L8004D890: /* 28C90 8004D890 24077FFF */ addiu $a3, $zero, 0x7FFF .L8004D894: /* 28C94 8004D894 0C014E5D */ jal au_fade_init /* 28C98 8004D898 2604002C */ addiu $a0, $s0, 0x2C /* 28C9C 8004D89C 0200202D */ daddu $a0, $s0, $zero /* 28CA0 8004D8A0 24027FFF */ addiu $v0, $zero, 0x7FFF /* 28CA4 8004D8A4 A6020044 */ sh $v0, 0x44($s0) /* 28CA8 8004D8A8 24020001 */ addiu $v0, $zero, 0x1 /* 28CAC 8004D8AC A6020046 */ sh $v0, 0x46($s0) /* 28CB0 8004D8B0 92220000 */ lbu $v0, 0x0($s1) /* 28CB4 8004D8B4 3C050002 */ lui $a1, (0x2625A >> 16) /* 28CB8 8004D8B8 30420007 */ andi $v0, $v0, 0x7 /* 28CBC 8004D8BC 3C068008 */ lui $a2, %hi(D_80078510) /* 28CC0 8004D8C0 00C23021 */ addu $a2, $a2, $v0 /* 28CC4 8004D8C4 90C68510 */ lbu $a2, %lo(D_80078510)($a2) /* 28CC8 8004D8C8 0C013A20 */ jal func_8004E880 /* 28CCC 8004D8CC 34A5625A */ ori $a1, $a1, (0x2625A & 0xFFFF) /* 28CD0 8004D8D0 2E620004 */ sltiu $v0, $s3, 0x4 /* 28CD4 8004D8D4 10400005 */ beqz $v0, .L8004D8EC /* 28CD8 8004D8D8 00131040 */ sll $v0, $s3, 1 /* 28CDC 8004D8DC 02221021 */ addu $v0, $s1, $v0 glabel func_8004D8E0 /* 28CE0 8004D8E0 94420004 */ lhu $v0, 0x4($v0) /* 28CE4 8004D8E4 14400003 */ bnez $v0, .L8004D8F4 /* 28CE8 8004D8E8 00131040 */ sll $v0, $s3, 1 .L8004D8EC: /* 28CEC 8004D8EC 0000982D */ daddu $s3, $zero, $zero /* 28CF0 8004D8F0 00131040 */ sll $v0, $s3, 1 .L8004D8F4: /* 28CF4 8004D8F4 02221021 */ addu $v0, $s1, $v0 /* 28CF8 8004D8F8 AE130060 */ sw $s3, 0x60($s0) /* 28CFC 8004D8FC 94420004 */ lhu $v0, 0x4($v0) /* 28D00 8004D900 8E030064 */ lw $v1, 0x64($s0) /* 28D04 8004D904 00021080 */ sll $v0, $v0, 2 /* 28D08 8004D908 00431021 */ addu $v0, $v0, $v1 /* 28D0C 8004D90C AE02006C */ sw $v0, 0x6C($s0) /* 28D10 8004D910 AE020068 */ sw $v0, 0x68($s0) /* 28D14 8004D914 9622000C */ lhu $v0, 0xC($s1) /* 28D18 8004D918 1040001F */ beqz $v0, .L8004D998 /* 28D1C 8004D91C 00021080 */ sll $v0, $v0, 2 /* 28D20 8004D920 00431021 */ addu $v0, $v0, $v1 /* 28D24 8004D924 AE020078 */ sw $v0, 0x78($s0) /* 28D28 8004D928 9222000F */ lbu $v0, 0xF($s1) /* 28D2C 8004D92C A202021C */ sb $v0, 0x21C($s0) /* 28D30 8004D930 304200FF */ andi $v0, $v0, 0xFF /* 28D34 8004D934 1040000C */ beqz $v0, .L8004D968 /* 28D38 8004D938 0000182D */ daddu $v1, $zero, $zero /* 28D3C 8004D93C 0200282D */ daddu $a1, $s0, $zero /* 28D40 8004D940 0060202D */ daddu $a0, $v1, $zero .L8004D944: /* 28D44 8004D944 8E020078 */ lw $v0, 0x78($s0) /* 28D48 8004D948 24630001 */ addiu $v1, $v1, 0x1 /* 28D4C 8004D94C 00441021 */ addu $v0, $v0, $a0 /* 28D50 8004D950 ACA20080 */ sw $v0, 0x80($a1) /* 28D54 8004D954 24A50004 */ addiu $a1, $a1, 0x4 /* 28D58 8004D958 9202021C */ lbu $v0, 0x21C($s0) /* 28D5C 8004D95C 0062102B */ sltu $v0, $v1, $v0 /* 28D60 8004D960 1440FFF8 */ bnez $v0, .L8004D944 /* 28D64 8004D964 2484000C */ addiu $a0, $a0, 0xC .L8004D968: /* 28D68 8004D968 2C62000C */ sltiu $v0, $v1, 0xC /* 28D6C 8004D96C 1040000C */ beqz $v0, .L8004D9A0 /* 28D70 8004D970 00031080 */ sll $v0, $v1, 2 /* 28D74 8004D974 00502021 */ addu $a0, $v0, $s0 .L8004D978: /* 28D78 8004D978 8E020080 */ lw $v0, 0x80($s0) /* 28D7C 8004D97C 24630001 */ addiu $v1, $v1, 0x1 /* 28D80 8004D980 AC820080 */ sw $v0, 0x80($a0) /* 28D84 8004D984 2C62000C */ sltiu $v0, $v1, 0xC /* 28D88 8004D988 1440FFFB */ bnez $v0, .L8004D978 /* 28D8C 8004D98C 24840004 */ addiu $a0, $a0, 0x4 /* 28D90 8004D990 08013668 */ j .L8004D9A0 /* 28D94 8004D994 00000000 */ nop .L8004D998: /* 28D98 8004D998 AE000078 */ sw $zero, 0x78($s0) /* 28D9C 8004D99C A200021C */ sb $zero, 0x21C($s0) .L8004D9A0: /* 28DA0 8004D9A0 96220010 */ lhu $v0, 0x10($s1) /* 28DA4 8004D9A4 10400007 */ beqz $v0, .L8004D9C4 /* 28DA8 8004D9A8 00021080 */ sll $v0, $v0, 2 /* 28DAC 8004D9AC 8E030064 */ lw $v1, 0x64($s0) /* 28DB0 8004D9B0 00431021 */ addu $v0, $v0, $v1 /* 28DB4 8004D9B4 AE02007C */ sw $v0, 0x7C($s0) /* 28DB8 8004D9B8 92220013 */ lbu $v0, 0x13($s1) /* 28DBC 8004D9BC 08013673 */ j .L8004D9CC glabel func_8004D9C0 /* 28DC0 8004D9C0 A202021D */ sb $v0, 0x21D($s0) .L8004D9C4: /* 28DC4 8004D9C4 AE00007C */ sw $zero, 0x7C($s0) /* 28DC8 8004D9C8 A200021D */ sb $zero, 0x21D($s0) .L8004D9CC: /* 28DCC 8004D9CC AE14001C */ sw $s4, 0x1C($s0) /* 28DD0 8004D9D0 0C013976 */ jal au_bgm_player_initialize /* 28DD4 8004D9D4 0200202D */ daddu $a0, $s0, $zero /* 28DD8 8004D9D8 0801367A */ j .L8004D9E8 /* 28DDC 8004D9DC 02A0102D */ daddu $v0, $s5, $zero .L8004D9E0: /* 28DE0 8004D9E0 24150003 */ addiu $s5, $zero, 0x3 .L8004D9E4: /* 28DE4 8004D9E4 02A0102D */ daddu $v0, $s5, $zero .L8004D9E8: /* 28DE8 8004D9E8 8FBF0028 */ lw $ra, 0x28($sp) /* 28DEC 8004D9EC 8FB50024 */ lw $s5, 0x24($sp) /* 28DF0 8004D9F0 8FB40020 */ lw $s4, 0x20($sp) /* 28DF4 8004D9F4 8FB3001C */ lw $s3, 0x1C($sp) /* 28DF8 8004D9F8 8FB20018 */ lw $s2, 0x18($sp) /* 28DFC 8004D9FC 8FB10014 */ lw $s1, 0x14($sp) /* 28E00 8004DA00 8FB00010 */ lw $s0, 0x10($sp) /* 28E04 8004DA04 03E00008 */ jr $ra /* 28E08 8004DA08 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: AuResult au_bgm_dispatch_player_event(SongUpdateEvent* event) { BGMPlayer* player; BGMFileInfo* fileInfo; s32 songName; s32 variation; s32 duration; s32 volume0; s32 volume1; AuResult status; u32 i; status = AU_RESULT_OK; songName = event->songName; variation = event->variation; if (songName != 0) { player = au_bgm_get_player_with_song_name(songName); if (player != NULL) { fileInfo = &player->bgmFile->info; duration = event->duration; if (duration != 0) { if (duration > SND_MAX_DURATION) { duration = SND_MAX_DURATION; } else if (duration < SND_MIN_DURATION) { duration = SND_MIN_DURATION; } } volume0 = event->startVolume; if (volume0 > 0x7F) { volume0 = 0x7F; } if (volume0 != 0) { volume0 = (volume0 << 8) | 0xFF; } volume1 = event->finalVolume; if (volume1 > 0x7F) { volume1 = 0x7F; } if (volume1 != 0) { volume1 = (volume1 << 8) | 0xFF; } else { volume1 = 0x7FFF; } au_fade_init(&player->fadeInfo, duration, volume0, volume1); player->fadeInfo.targetVolScale = 0x7FFF; player->fadeInfo.volScaleTime = 1; func_8004E880(player, BGM_SAMPLE_RATE, BgmDivisors[fileInfo->numSegments & 7]); if (variation < 0 || variation >= 4 || fileInfo->segments[variation] == 0) { variation = 0; } player->curSegmentID = variation; player->segmentStartPos = AU_FILE_RELATIVE(player->bgmFile, fileInfo->segments[variation] << 2); player->segmentReadPos = player->segmentStartPos; if (fileInfo->drums != 0) { player->drumsInfo = AU_FILE_RELATIVE(player->bgmFile, fileInfo->drums << 2); player->bgmDrumCount = fileInfo->drumCount; for (i = 0; i < player->bgmDrumCount; i++) { BGMDrumInfo* drum = &player->drumsInfo[i]; player->drums[i] = drum; } for (; i < ARRAY_COUNT(player->drums); i++) { player->drums[i] = player->drums[0]; } } else { player->drumsInfo = NULL; player->bgmDrumCount = 0; } if (fileInfo->instruments != 0) { player->instrumentsInfo = AU_FILE_RELATIVE(player->bgmFile, fileInfo->instruments << 2); player->bgmInstrumentCount = fileInfo->instrumentCount; } else { player->instrumentsInfo = NULL; player->bgmInstrumentCount = 0; } player->songName = songName; au_bgm_player_initialize(player); } else { status = AU_ERROR_SONG_NOT_PLAYING; } } else { status = AU_ERROR_NULL_SONG_NAME; } return status; }
### RAW ASSEMBLY INSTRUCTIONS: glabel InterpCamTargetPos /* EF9B8 802CB008 27BDFFD0 */ addiu $sp, $sp, -0x30 /* EF9BC 802CB00C AFB3001C */ sw $s3, 0x1C($sp) /* EF9C0 802CB010 0080982D */ daddu $s3, $a0, $zero /* EF9C4 802CB014 AFBF002C */ sw $ra, 0x2C($sp) /* EF9C8 802CB018 AFB60028 */ sw $s6, 0x28($sp) /* EF9CC 802CB01C AFB50024 */ sw $s5, 0x24($sp) /* EF9D0 802CB020 AFB40020 */ sw $s4, 0x20($sp) /* EF9D4 802CB024 AFB20018 */ sw $s2, 0x18($sp) /* EF9D8 802CB028 AFB10014 */ sw $s1, 0x14($sp) /* EF9DC 802CB02C AFB00010 */ sw $s0, 0x10($sp) /* EF9E0 802CB030 10A00066 */ beqz $a1, .L802CB1CC /* EF9E4 802CB034 8E72000C */ lw $s2, 0xC($s3) /* EF9E8 802CB038 8E450000 */ lw $a1, 0x0($s2) /* EF9EC 802CB03C 0C0B1EAF */ jal evt_get_variable /* EF9F0 802CB040 26520004 */ addiu $s2, $s2, 0x4 /* EF9F4 802CB044 8E450000 */ lw $a1, 0x0($s2) /* EF9F8 802CB048 26520004 */ addiu $s2, $s2, 0x4 /* EF9FC 802CB04C 0260202D */ daddu $a0, $s3, $zero /* EFA00 802CB050 0C0B1EAF */ jal evt_get_variable /* EFA04 802CB054 0040802D */ daddu $s0, $v0, $zero /* EFA08 802CB058 8E450000 */ lw $a1, 0x0($s2) /* EFA0C 802CB05C 26520004 */ addiu $s2, $s2, 0x4 /* EFA10 802CB060 0260202D */ daddu $a0, $s3, $zero /* EFA14 802CB064 0C0B1EAF */ jal evt_get_variable /* EFA18 802CB068 0040882D */ daddu $s1, $v0, $zero /* EFA1C 802CB06C 8E450000 */ lw $a1, 0x0($s2) /* EFA20 802CB070 26520004 */ addiu $s2, $s2, 0x4 /* EFA24 802CB074 0260202D */ daddu $a0, $s3, $zero /* EFA28 802CB078 0C0B1EAF */ jal evt_get_variable /* EFA2C 802CB07C 0040A02D */ daddu $s4, $v0, $zero /* EFA30 802CB080 8E450000 */ lw $a1, 0x0($s2) /* EFA34 802CB084 26520004 */ addiu $s2, $s2, 0x4 /* EFA38 802CB088 0260202D */ daddu $a0, $s3, $zero /* EFA3C 802CB08C 0C0B1EAF */ jal evt_get_variable /* EFA40 802CB090 0040A82D */ daddu $s5, $v0, $zero /* EFA44 802CB094 0260202D */ daddu $a0, $s3, $zero /* EFA48 802CB098 8E450000 */ lw $a1, 0x0($s2) /* EFA4C 802CB09C 0C0B1EAF */ jal evt_get_variable /* EFA50 802CB0A0 0040B02D */ daddu $s6, $v0, $zero /* EFA54 802CB0A4 24040018 */ addiu $a0, $zero, 0x18 /* EFA58 802CB0A8 0C00AB39 */ jal heap_malloc /* EFA5C 802CB0AC 0040902D */ daddu $s2, $v0, $zero /* EFA60 802CB0B0 0040282D */ daddu $a1, $v0, $zero /* EFA64 802CB0B4 3C04800B */ lui $a0, %hi(gCameras) /* EFA68 802CB0B8 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* EFA6C 802CB0BC 00101080 */ sll $v0, $s0, 2 /* EFA70 802CB0C0 00501021 */ addu $v0, $v0, $s0 /* EFA74 802CB0C4 00021080 */ sll $v0, $v0, 2 /* EFA78 802CB0C8 00501023 */ subu $v0, $v0, $s0 /* EFA7C 802CB0CC 000218C0 */ sll $v1, $v0, 3 /* EFA80 802CB0D0 00431021 */ addu $v0, $v0, $v1 /* EFA84 802CB0D4 000210C0 */ sll $v0, $v0, 3 /* EFA88 802CB0D8 AE650060 */ sw $a1, 0x60($s3) /* EFA8C 802CB0DC ACB10004 */ sw $s1, 0x4($a1) /* EFA90 802CB0E0 0220302D */ daddu $a2, $s1, $zero /* EFA94 802CB0E4 00441821 */ addu $v1, $v0, $a0 /* EFA98 802CB0E8 ACA30000 */ sw $v1, 0x0($a1) /* EFA9C 802CB0EC 10C00006 */ beqz $a2, .L802CB108 /* EFAA0 802CB0F0 ACB20014 */ sw $s2, 0x14($a1) /* EFAA4 802CB0F4 24020001 */ addiu $v0, $zero, 0x1 /* EFAA8 802CB0F8 10C20018 */ beq $a2, $v0, .L802CB15C /* EFAAC 802CB0FC 00000000 */ nop /* EFAB0 802CB100 080B2C73 */ j .L802CB1CC /* EFAB4 802CB104 00000000 */ nop .L802CB108: /* EFAB8 802CB108 C4620054 */ lwc1 $f2, 0x54($v1) /* EFABC 802CB10C 44940000 */ mtc1 $s4, $f0 /* EFAC0 802CB110 00000000 */ nop /* EFAC4 802CB114 46800020 */ cvt.s.w $f0, $f0 /* EFAC8 802CB118 46020001 */ sub.s $f0, $f0, $f2 /* EFACC 802CB11C 44921000 */ mtc1 $s2, $f2 /* EFAD0 802CB120 00000000 */ nop /* EFAD4 802CB124 468010A0 */ cvt.s.w $f2, $f2 /* EFAD8 802CB128 46020003 */ div.s $f0, $f0, $f2 /* EFADC 802CB12C E4A00008 */ swc1 $f0, 0x8($a1) /* EFAE0 802CB130 C4620058 */ lwc1 $f2, 0x58($v1) /* EFAE4 802CB134 44950000 */ mtc1 $s5, $f0 /* EFAE8 802CB138 00000000 */ nop /* EFAEC 802CB13C 46800020 */ cvt.s.w $f0, $f0 /* EFAF0 802CB140 46020001 */ sub.s $f0, $f0, $f2 /* EFAF4 802CB144 C4A20014 */ lwc1 $f2, 0x14($a1) /* EFAF8 802CB148 468010A0 */ cvt.s.w $f2, $f2 /* EFAFC 802CB14C 46020003 */ div.s $f0, $f0, $f2 /* EFB00 802CB150 E4A0000C */ swc1 $f0, 0xC($a1) /* EFB04 802CB154 080B2C6B */ j .L802CB1AC /* EFB08 802CB158 C462005C */ lwc1 $f2, 0x5C($v1) .L802CB15C: /* EFB0C 802CB15C C4620060 */ lwc1 $f2, 0x60($v1) /* EFB10 802CB160 44940000 */ mtc1 $s4, $f0 /* EFB14 802CB164 00000000 */ nop /* EFB18 802CB168 46800020 */ cvt.s.w $f0, $f0 /* EFB1C 802CB16C 46020001 */ sub.s $f0, $f0, $f2 /* EFB20 802CB170 44921000 */ mtc1 $s2, $f2 /* EFB24 802CB174 00000000 */ nop /* EFB28 802CB178 468010A0 */ cvt.s.w $f2, $f2 /* EFB2C 802CB17C 46020003 */ div.s $f0, $f0, $f2 /* EFB30 802CB180 E4A00008 */ swc1 $f0, 0x8($a1) /* EFB34 802CB184 C4620064 */ lwc1 $f2, 0x64($v1) /* EFB38 802CB188 44950000 */ mtc1 $s5, $f0 /* EFB3C 802CB18C 00000000 */ nop /* EFB40 802CB190 46800020 */ cvt.s.w $f0, $f0 /* EFB44 802CB194 46020001 */ sub.s $f0, $f0, $f2 /* EFB48 802CB198 C4A20014 */ lwc1 $f2, 0x14($a1) /* EFB4C 802CB19C 468010A0 */ cvt.s.w $f2, $f2 /* EFB50 802CB1A0 46020003 */ div.s $f0, $f0, $f2 /* EFB54 802CB1A4 E4A0000C */ swc1 $f0, 0xC($a1) /* EFB58 802CB1A8 C4620068 */ lwc1 $f2, 0x68($v1) .L802CB1AC: /* EFB5C 802CB1AC 44960000 */ mtc1 $s6, $f0 /* EFB60 802CB1B0 00000000 */ nop /* EFB64 802CB1B4 46800020 */ cvt.s.w $f0, $f0 /* EFB68 802CB1B8 46020001 */ sub.s $f0, $f0, $f2 /* EFB6C 802CB1BC C4A20014 */ lwc1 $f2, 0x14($a1) /* EFB70 802CB1C0 468010A0 */ cvt.s.w $f2, $f2 /* EFB74 802CB1C4 46020003 */ div.s $f0, $f0, $f2 /* EFB78 802CB1C8 E4A00010 */ swc1 $f0, 0x10($a1) .L802CB1CC: /* EFB7C 802CB1CC 8E650060 */ lw $a1, 0x60($s3) /* EFB80 802CB1D0 8CA40004 */ lw $a0, 0x4($a1) /* EFB84 802CB1D4 8CA30000 */ lw $v1, 0x0($a1) /* EFB88 802CB1D8 10800005 */ beqz $a0, .L802CB1F0 /* EFB8C 802CB1DC 24020001 */ addiu $v0, $zero, 0x1 /* EFB90 802CB1E0 10820010 */ beq $a0, $v0, .L802CB224 /* EFB94 802CB1E4 00000000 */ nop /* EFB98 802CB1E8 080B2C95 */ j .L802CB254 /* EFB9C 802CB1EC 00000000 */ nop .L802CB1F0: /* EFBA0 802CB1F0 C4600054 */ lwc1 $f0, 0x54($v1) /* EFBA4 802CB1F4 C4A20008 */ lwc1 $f2, 0x8($a1) /* EFBA8 802CB1F8 46020000 */ add.s $f0, $f0, $f2 /* EFBAC 802CB1FC E4600054 */ swc1 $f0, 0x54($v1) /* EFBB0 802CB200 C4600058 */ lwc1 $f0, 0x58($v1) /* EFBB4 802CB204 C4A2000C */ lwc1 $f2, 0xC($a1) /* EFBB8 802CB208 46020000 */ add.s $f0, $f0, $f2 /* EFBBC 802CB20C E4600058 */ swc1 $f0, 0x58($v1) /* EFBC0 802CB210 C460005C */ lwc1 $f0, 0x5C($v1) /* EFBC4 802CB214 C4A20010 */ lwc1 $f2, 0x10($a1) /* EFBC8 802CB218 46020000 */ add.s $f0, $f0, $f2 /* EFBCC 802CB21C 080B2C95 */ j .L802CB254 /* EFBD0 802CB220 E460005C */ swc1 $f0, 0x5C($v1) .L802CB224: /* EFBD4 802CB224 C4600060 */ lwc1 $f0, 0x60($v1) /* EFBD8 802CB228 C4A20008 */ lwc1 $f2, 0x8($a1) /* EFBDC 802CB22C 46020000 */ add.s $f0, $f0, $f2 /* EFBE0 802CB230 E4600060 */ swc1 $f0, 0x60($v1) /* EFBE4 802CB234 C4600064 */ lwc1 $f0, 0x64($v1) /* EFBE8 802CB238 C4A2000C */ lwc1 $f2, 0xC($a1) /* EFBEC 802CB23C 46020000 */ add.s $f0, $f0, $f2 /* EFBF0 802CB240 E4600064 */ swc1 $f0, 0x64($v1) /* EFBF4 802CB244 C4600068 */ lwc1 $f0, 0x68($v1) /* EFBF8 802CB248 C4A20010 */ lwc1 $f2, 0x10($a1) /* EFBFC 802CB24C 46020000 */ add.s $f0, $f0, $f2 /* EFC00 802CB250 E4600068 */ swc1 $f0, 0x68($v1) .L802CB254: /* EFC04 802CB254 8CA20014 */ lw $v0, 0x14($a1) /* EFC08 802CB258 2442FFFF */ addiu $v0, $v0, -0x1 /* EFC0C 802CB25C 10400003 */ beqz $v0, .L802CB26C /* EFC10 802CB260 ACA20014 */ sw $v0, 0x14($a1) /* EFC14 802CB264 080B2CA0 */ j .L802CB280 /* EFC18 802CB268 0000102D */ daddu $v0, $zero, $zero .L802CB26C: /* EFC1C 802CB26C 8E640060 */ lw $a0, 0x60($s3) /* EFC20 802CB270 0C00AB4B */ jal heap_free /* EFC24 802CB274 00000000 */ nop /* EFC28 802CB278 24020002 */ addiu $v0, $zero, 0x2 /* EFC2C 802CB27C AE600060 */ sw $zero, 0x60($s3) .L802CB280: /* EFC30 802CB280 8FBF002C */ lw $ra, 0x2C($sp) /* EFC34 802CB284 8FB60028 */ lw $s6, 0x28($sp) /* EFC38 802CB288 8FB50024 */ lw $s5, 0x24($sp) /* EFC3C 802CB28C 8FB40020 */ lw $s4, 0x20($sp) /* EFC40 802CB290 8FB3001C */ lw $s3, 0x1C($sp) /* EFC44 802CB294 8FB20018 */ lw $s2, 0x18($sp) /* EFC48 802CB298 8FB10014 */ lw $s1, 0x14($sp) /* EFC4C 802CB29C 8FB00010 */ lw $s0, 0x10($sp) /* EFC50 802CB2A0 03E00008 */ jr $ra /* EFC54 802CB2A4 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: ApiStatus InterpCamTargetPos(Evt* script, s32 isInitialCall) { typedef struct CamInterpData { /* 0x00 */ Camera* cam; /* 0x04 */ s32 useTarget; /* 0x08 */ Vec3f vel; /* 0x14 */ s32 time; } CamInterpData; // size = 0x18 Bytecode* args = script->ptrReadPos; CamInterpData* data; Camera* cam; if (isInitialCall) { s32 camID = evt_get_variable(script, *args++); s32 useTarget = evt_get_variable(script, *args++); s32 posX = evt_get_variable(script, *args++); s32 posY = evt_get_variable(script, *args++); s32 posZ = evt_get_variable(script, *args++); s32 time = evt_get_variable(script, *args++); data = heap_malloc(sizeof(*data)); script->userData = data; cam = &gCameras[camID]; data->cam = cam; data->useTarget = useTarget; data->time = time; switch (data->useTarget) { case 0: data->vel.x = (posX - cam->lookAt_obj_target.x) / data->time; data->vel.y = (posY - cam->lookAt_obj_target.y) / data->time; data->vel.z = (posZ - cam->lookAt_obj_target.z) / data->time; break; case 1: data->vel.x = (posX - cam->targetPos.x) / data->time; data->vel.y = (posY - cam->targetPos.y) / data->time; data->vel.z = (posZ - cam->targetPos.z) / data->time; break; } } data = script->userData; cam = data->cam; switch (data->useTarget) { case 0: cam->lookAt_obj_target.x += data->vel.x; cam->lookAt_obj_target.y += data->vel.y; cam->lookAt_obj_target.z += data->vel.z; break; case 1: cam->targetPos.x += data->vel.x; cam->targetPos.y += data->vel.y; cam->targetPos.z += data->vel.z; break; } data->time--; if (data->time == 0) { heap_free(script->userData); script->userData = NULL; return ApiStatus_DONE2; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_load_BK_to_bank /* 2FBC8 800547C8 27BDFF80 */ addiu $sp, $sp, -0x80 /* 2FBCC 800547CC AFB5006C */ sw $s5, 0x6C($sp) /* 2FBD0 800547D0 0080A82D */ daddu $s5, $a0, $zero /* 2FBD4 800547D4 AFB40068 */ sw $s4, 0x68($sp) /* 2FBD8 800547D8 00A0A02D */ daddu $s4, $a1, $zero /* 2FBDC 800547DC AFB70074 */ sw $s7, 0x74($sp) /* 2FBE0 800547E0 00C0B82D */ daddu $s7, $a2, $zero /* 2FBE4 800547E4 AFBE0078 */ sw $fp, 0x78($sp) /* 2FBE8 800547E8 00E0F02D */ daddu $fp, $a3, $zero /* 2FBEC 800547EC AFB1005C */ sw $s1, 0x5C($sp) /* 2FBF0 800547F0 27B10018 */ addiu $s1, $sp, 0x18 /* 2FBF4 800547F4 0220282D */ daddu $a1, $s1, $zero /* 2FBF8 800547F8 3C028008 */ lui $v0, %hi(gSynDriverPtr) /* 2FBFC 800547FC 8C428E54 */ lw $v0, %lo(gSynDriverPtr)($v0) /* 2FC00 80054800 24060040 */ addiu $a2, $zero, 0x40 /* 2FC04 80054804 AFB30064 */ sw $s3, 0x64($sp) /* 2FC08 80054808 2413000B */ addiu $s3, $zero, 0xB /* 2FC0C 8005480C AFB20060 */ sw $s2, 0x60($sp) /* 2FC10 80054810 AFBF007C */ sw $ra, 0x7C($sp) /* 2FC14 80054814 AFB60070 */ sw $s6, 0x70($sp) /* 2FC18 80054818 AFB00058 */ sw $s0, 0x58($sp) /* 2FC1C 8005481C 8C560018 */ lw $s6, 0x18($v0) /* 2FC20 80054820 0C015380 */ jal au_read_rom /* 2FC24 80054824 24120001 */ addiu $s2, $zero, 0x1 /* 2FC28 80054828 3263FFFF */ andi $v1, $s3, 0xFFFF .L8005482C: /* 2FC2C 8005482C 2402006F */ addiu $v0, $zero, 0x6F /* 2FC30 80054830 10620057 */ beq $v1, $v0, .L80054990 /* 2FC34 80054834 28620070 */ slti $v0, $v1, 0x70 /* 2FC38 80054838 1040005E */ beqz $v0, .L800549B4 /* 2FC3C 8005483C 2402000B */ addiu $v0, $zero, 0xB /* 2FC40 80054840 1062000A */ beq $v1, $v0, .L8005486C /* 2FC44 80054844 2862000C */ slti $v0, $v1, 0xC /* 2FC48 80054848 5440005B */ bnel $v0, $zero, .L800549B8 /* 2FC4C 8005484C 0000902D */ daddu $s2, $zero, $zero /* 2FC50 80054850 24020015 */ addiu $v0, $zero, 0x15 /* 2FC54 80054854 1062000E */ beq $v1, $v0, .L80054890 /* 2FC58 80054858 24020065 */ addiu $v0, $zero, 0x65 /* 2FC5C 8005485C 1062001A */ beq $v1, $v0, .L800548C8 /* 2FC60 80054860 00000000 */ nop /* 2FC64 80054864 0801526E */ j .L800549B8 /* 2FC68 80054868 0000902D */ daddu $s2, $zero, $zero .L8005486C: /* 2FC6C 8005486C 96230000 */ lhu $v1, 0x0($s1) /* 2FC70 80054870 2402424B */ addiu $v0, $zero, 0x424B /* 2FC74 80054874 54620050 */ bnel $v1, $v0, .L800549B8 /* 2FC78 80054878 0000902D */ daddu $s2, $zero, $zero /* 2FC7C 8005487C 8E220004 */ lw $v0, 0x4($s1) /* 2FC80 80054880 5040004D */ beql $v0, $zero, .L800549B8 /* 2FC84 80054884 0000902D */ daddu $s2, $zero, $zero /* 2FC88 80054888 0801526E */ j .L800549B8 /* 2FC8C 8005488C 24130015 */ addiu $s3, $zero, 0x15 .L80054890: /* 2FC90 80054890 9623000C */ lhu $v1, 0xC($s1) /* 2FC94 80054894 24024352 */ addiu $v0, $zero, 0x4352 /* 2FC98 80054898 14620003 */ bne $v1, $v0, .L800548A8 /* 2FC9C 8005489C 24024452 */ addiu $v0, $zero, 0x4452 /* 2FCA0 800548A0 0801526E */ j .L800549B8 /* 2FCA4 800548A4 24130065 */ addiu $s3, $zero, 0x65 .L800548A8: /* 2FCA8 800548A8 14620003 */ bne $v1, $v0, .L800548B8 /* 2FCAC 800548AC 24025352 */ addiu $v0, $zero, 0x5352 /* 2FCB0 800548B0 0801526E */ j .L800549B8 /* 2FCB4 800548B4 241300C9 */ addiu $s3, $zero, 0xC9 .L800548B8: /* 2FCB8 800548B8 5462003F */ bnel $v1, $v0, .L800549B8 /* 2FCBC 800548BC 0000902D */ daddu $s2, $zero, $zero /* 2FCC0 800548C0 0801526E */ j .L800549B8 /* 2FCC4 800548C4 2413012D */ addiu $s3, $zero, 0x12D .L800548C8: /* 2FCC8 800548C8 96240032 */ lhu $a0, 0x32($s1) /* 2FCCC 800548CC 96220036 */ lhu $v0, 0x36($s1) /* 2FCD0 800548D0 9623003A */ lhu $v1, 0x3A($s1) /* 2FCD4 800548D4 2484000F */ addiu $a0, $a0, 0xF /* 2FCD8 800548D8 3084FFF0 */ andi $a0, $a0, 0xFFF0 /* 2FCDC 800548DC 2442000F */ addiu $v0, $v0, 0xF /* 2FCE0 800548E0 3042FFF0 */ andi $v0, $v0, 0xFFF0 /* 2FCE4 800548E4 00822021 */ addu $a0, $a0, $v0 /* 2FCE8 800548E8 2463000F */ addiu $v1, $v1, 0xF /* 2FCEC 800548EC 3063FFF0 */ andi $v1, $v1, 0xFFF0 /* 2FCF0 800548F0 9622003E */ lhu $v0, 0x3E($s1) /* 2FCF4 800548F4 00832021 */ addu $a0, $a0, $v1 /* 2FCF8 800548F8 2442000F */ addiu $v0, $v0, 0xF /* 2FCFC 800548FC 3042FFF0 */ andi $v0, $v0, 0xFFF0 /* 2FD00 80054900 00822021 */ addu $a0, $a0, $v0 /* 2FD04 80054904 16800006 */ bnez $s4, .L80054920 /* 2FD08 80054908 24900040 */ addiu $s0, $a0, 0x40 /* 2FD0C 8005490C 02C0202D */ daddu $a0, $s6, $zero /* 2FD10 80054910 24050001 */ addiu $a1, $zero, 0x1 /* 2FD14 80054914 0C015FE4 */ jal alHeapAlloc /* 2FD18 80054918 0200302D */ daddu $a2, $s0, $zero /* 2FD1C 8005491C 0040A02D */ daddu $s4, $v0, $zero .L80054920: /* 2FD20 80054920 02A0202D */ daddu $a0, $s5, $zero /* 2FD24 80054924 0280282D */ daddu $a1, $s4, $zero /* 2FD28 80054928 0C015380 */ jal au_read_rom /* 2FD2C 8005492C 0200302D */ daddu $a2, $s0, $zero /* 2FD30 80054930 03C0202D */ daddu $a0, $fp, $zero /* 2FD34 80054934 0C0151D1 */ jal au_get_BK_instruments /* 2FD38 80054938 02E0282D */ daddu $a1, $s7, $zero /* 2FD3C 8005493C 0040802D */ daddu $s0, $v0, $zero /* 2FD40 80054940 0200182D */ daddu $v1, $s0, $zero /* 2FD44 80054944 0000302D */ daddu $a2, $zero, $zero /* 2FD48 80054948 00C0282D */ daddu $a1, $a2, $zero /* 2FD4C 8005494C 0220202D */ daddu $a0, $s1, $zero .L80054950: /* 2FD50 80054950 94820012 */ lhu $v0, 0x12($a0) /* 2FD54 80054954 10400004 */ beqz $v0, .L80054968 /* 2FD58 80054958 00541021 */ addu $v0, $v0, $s4 /* 2FD5C 8005495C 24C60001 */ addiu $a2, $a2, 0x1 /* 2FD60 80054960 0801525B */ j .L8005496C /* 2FD64 80054964 AC620000 */ sw $v0, 0x0($v1) .L80054968: /* 2FD68 80054968 AC600000 */ sw $zero, 0x0($v1) .L8005496C: /* 2FD6C 8005496C 24630004 */ addiu $v1, $v1, 0x4 /* 2FD70 80054970 24A50001 */ addiu $a1, $a1, 0x1 /* 2FD74 80054974 2CA20010 */ sltiu $v0, $a1, 0x10 /* 2FD78 80054978 1440FFF5 */ bnez $v0, .L80054950 /* 2FD7C 8005497C 24840002 */ addiu $a0, $a0, 0x2 /* 2FD80 80054980 50C0000D */ beql $a2, $zero, .L800549B8 /* 2FD84 80054984 0000902D */ daddu $s2, $zero, $zero /* 2FD88 80054988 0801526E */ j .L800549B8 /* 2FD8C 8005498C 2413006F */ addiu $s3, $zero, 0x6F .L80054990: /* 2FD90 80054990 24020001 */ addiu $v0, $zero, 0x1 /* 2FD94 80054994 AFA20010 */ sw $v0, 0x10($sp) /* 2FD98 80054998 02A0202D */ daddu $a0, $s5, $zero /* 2FD9C 8005499C 0280282D */ daddu $a1, $s4, $zero /* 2FDA0 800549A0 0200302D */ daddu $a2, $s0, $zero /* 2FDA4 800549A4 0C01527E */ jal au_swizzle_BK_instruments /* 2FDA8 800549A8 24070010 */ addiu $a3, $zero, 0x10 /* 2FDAC 800549AC 0801526E */ j .L800549B8 /* 2FDB0 800549B0 0000982D */ daddu $s3, $zero, $zero .L800549B4: /* 2FDB4 800549B4 0000902D */ daddu $s2, $zero, $zero .L800549B8: /* 2FDB8 800549B8 3242FFFF */ andi $v0, $s2, 0xFFFF /* 2FDBC 800549BC 1440FF9B */ bnez $v0, .L8005482C /* 2FDC0 800549C0 3263FFFF */ andi $v1, $s3, 0xFFFF /* 2FDC4 800549C4 0280102D */ daddu $v0, $s4, $zero /* 2FDC8 800549C8 8FBF007C */ lw $ra, 0x7C($sp) /* 2FDCC 800549CC 8FBE0078 */ lw $fp, 0x78($sp) /* 2FDD0 800549D0 8FB70074 */ lw $s7, 0x74($sp) /* 2FDD4 800549D4 8FB60070 */ lw $s6, 0x70($sp) /* 2FDD8 800549D8 8FB5006C */ lw $s5, 0x6C($sp) /* 2FDDC 800549DC 8FB40068 */ lw $s4, 0x68($sp) /* 2FDE0 800549E0 8FB30064 */ lw $s3, 0x64($sp) /* 2FDE4 800549E4 8FB20060 */ lw $s2, 0x60($sp) /* 2FDE8 800549E8 8FB1005C */ lw $s1, 0x5C($sp) /* 2FDEC 800549EC 8FB00058 */ lw $s0, 0x58($sp) /* 2FDF0 800549F0 03E00008 */ jr $ra /* 2FDF4 800549F4 27BD0080 */ addiu $sp, $sp, 0x80 ### DECOMPILED C INSTRUCTIONS: SoundBank* au_load_BK_to_bank(s32 bkFileOffset, SoundBank* bank, s32 bankIndex, s32 bankGroup) { ALHeap* heap = gSynDriverPtr->heap; BKHeader bkHeader; BKHeader* header = &bkHeader; u16 keepReading; u16 readState; InstrumentGroup* group; Instrument** inst; s32 instrumentCount; s32 size; u32 i; au_read_rom(bkFileOffset, header, sizeof(*header)); readState = BK_READ_FETCH_HEADER; keepReading = TRUE; while (keepReading) { switch (readState) { case BK_READ_DONE: keepReading = FALSE; break; case BK_READ_FETCH_HEADER: if (header->signature != AL_HEADER_SIG_BK) { keepReading = FALSE; } else if (header->size == 0) { keepReading = FALSE; } else { readState = BK_READ_FETCH_DATA; } break; case BK_READ_FETCH_DATA: if (header->format == AL_HEADER_SIG_CR) { readState = BK_READ_PROCESS_CR; } else if (header->format == AL_HEADER_SIG_DR) { readState = BK_READ_PROCESS_DR; } else if (header->format == AL_HEADER_SIG_SR) { readState = BK_READ_PROCESS_SR; } else { keepReading = FALSE; } break; case BK_READ_PROCESS_CR: size = ALIGN16_(header->instrumetsSize) + ALIGN16_(header->unkSizeA) + ALIGN16_(header->predictorsSize) + ALIGN16_(header->unkSizeB) + sizeof(*header); if (bank == NULL) { bank = alHeapAlloc(heap, 1, size); } au_read_rom(bkFileOffset, bank, size); group = au_get_BK_instruments(bankGroup, bankIndex); inst = (*group); instrumentCount = 0; for (i = 0; i < ARRAY_COUNT(header->instruments); inst++, i++) { u16 instOffset = header->instruments[i]; if (instOffset != 0) { instrumentCount++; *inst = AU_FILE_RELATIVE(bank, instOffset); } else { *inst = NULL; } } if (instrumentCount != 0) { readState = BK_READ_SWIZZLE_CR; } else { keepReading = FALSE; } break; case BK_READ_SWIZZLE_CR: au_swizzle_BK_instruments(bkFileOffset, bank, *group, 16, 1); readState = BK_READ_DONE; break; // inferred states case BK_READ_PROCESS_DR: case BK_READ_UNK_DR: case BK_READ_PROCESS_SR: case BK_READ_UNK_SR: default: keepReading = FALSE; break; } } return bank; }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_step_battle /* ECE4 800338E4 27BDFFE8 */ addiu $sp, $sp, -0x18 /* ECE8 800338E8 AFB00010 */ sw $s0, 0x10($sp) /* ECEC 800338EC 3C10800A */ lui $s0, %hi(D_800A0900) /* ECF0 800338F0 26100900 */ addiu $s0, $s0, %lo(D_800A0900) /* ECF4 800338F4 24030005 */ addiu $v1, $zero, 0x5 /* ECF8 800338F8 AFBF0014 */ sw $ra, 0x14($sp) /* ECFC 800338FC 82020000 */ lb $v0, 0x0($s0) /* ED00 80033900 1443000F */ bne $v0, $v1, .L80033940 /* ED04 80033904 92040000 */ lbu $a0, 0x0($s0) /* ED08 80033908 3C02800A */ lui $v0, %hi(nuGfxCfb) /* ED0C 8003390C 8C42A658 */ lw $v0, %lo(nuGfxCfb)($v0) /* ED10 80033910 8C430004 */ lw $v1, 0x4($v0) /* ED14 80033914 3C02800A */ lui $v0, %hi(nuGfxCfb_ptr) /* ED18 80033918 8C42A64C */ lw $v0, %lo(nuGfxCfb_ptr)($v0) /* ED1C 8003391C 14620089 */ bne $v1, $v0, .L80033B44 /* ED20 80033920 2484FFFF */ addiu $a0, $a0, -0x1 /* ED24 80033924 3C02800A */ lui $v0, %hi(gOverrideFlags) /* ED28 80033928 2442A650 */ addiu $v0, $v0, %lo(gOverrideFlags) /* ED2C 8003392C 8C430000 */ lw $v1, 0x0($v0) /* ED30 80033930 A2040000 */ sb $a0, 0x0($s0) /* ED34 80033934 34630008 */ ori $v1, $v1, 0x8 /* ED38 80033938 0C018028 */ jal nuContRmbForceStop /* ED3C 8003393C AC430000 */ sw $v1, 0x0($v0) .L80033940: /* ED40 80033940 82030000 */ lb $v1, 0x0($s0) /* ED44 80033944 04600071 */ bltz $v1, .L80033B0C /* ED48 80033948 92020000 */ lbu $v0, 0x0($s0) /* ED4C 8003394C 18600003 */ blez $v1, .L8003395C /* ED50 80033950 2442FFFF */ addiu $v0, $v0, -0x1 /* ED54 80033954 0800CED1 */ j .L80033B44 /* ED58 80033958 A2020000 */ sb $v0, 0x0($s0) .L8003395C: /* ED5C 8003395C 3C048007 */ lui $a0, %hi(bFrameBuffers) /* ED60 80033960 248478A0 */ addiu $a0, $a0, %lo(bFrameBuffers) /* ED64 80033964 24050002 */ addiu $a1, $zero, 0x2 /* ED68 80033968 2402FFFF */ addiu $v0, $zero, -0x1 /* ED6C 8003396C 0C017CBC */ jal nuGfxSetCfb /* ED70 80033970 A2020000 */ sb $v0, 0x0($s0) /* ED74 80033974 0C018030 */ jal nuContRmbForceStopEnd /* ED78 80033978 00000000 */ nop /* ED7C 8003397C 0C05260E */ jal sfx_stop_env_sounds /* ED80 80033980 00000000 */ nop /* ED84 80033984 0C00EC6A */ jal func_8003B1A8 /* ED88 80033988 00000000 */ nop /* ED8C 8003398C 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* ED90 80033990 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* ED94 80033994 8E030000 */ lw $v1, 0x0($s0) /* ED98 80033998 24020001 */ addiu $v0, $zero, 0x1 /* ED9C 8003399C 0C016BA8 */ jal backup_map_collision_data /* EDA0 800339A0 A0620070 */ sb $v0, 0x70($v1) /* EDA4 800339A4 0C00B458 */ jal load_obfuscation_shims /* EDA8 800339A8 00000000 */ nop /* EDAC 800339AC 0C0AC82D */ jal shim_battle_heap_create_obfuscated /* EDB0 800339B0 00000000 */ nop /* EDB4 800339B4 0C05259C */ jal sfx_clear_env_sounds /* EDB8 800339B8 0000202D */ daddu $a0, $zero, $zero /* EDBC 800339BC 8E100000 */ lw $s0, 0x0($s0) /* EDC0 800339C0 3C03800E */ lui $v1, %hi(D_800DC4EA) /* EDC4 800339C4 9063C4EA */ lbu $v1, %lo(D_800DC4EA)($v1) /* EDC8 800339C8 9205007E */ lbu $a1, 0x7E($s0) /* EDCC 800339CC 3C04800E */ lui $a0, %hi(D_800DC4EB) /* EDD0 800339D0 9084C4EB */ lbu $a0, %lo(D_800DC4EB)($a0) /* EDD4 800339D4 30A20001 */ andi $v0, $a1, 0x1 /* EDD8 800339D8 14400007 */ bnez $v0, .L800339F8 /* EDDC 800339DC 34A20001 */ ori $v0, $a1, 0x1 /* EDE0 800339E0 24020026 */ addiu $v0, $zero, 0x26 /* EDE4 800339E4 54620006 */ bnel $v1, $v0, .L80033A00 /* EDE8 800339E8 24040005 */ addiu $a0, $zero, 0x5 /* EDEC 800339EC 54800004 */ bnel $a0, $zero, .L80033A00 /* EDF0 800339F0 24040005 */ addiu $a0, $zero, 0x5 /* EDF4 800339F4 34A20001 */ ori $v0, $a1, 0x1 .L800339F8: /* EDF8 800339F8 A202007E */ sb $v0, 0x7E($s0) /* EDFC 800339FC 24040006 */ addiu $a0, $zero, 0x6 .L80033A00: /* EE00 80033A00 0C0B763E */ jal spr_init_sprites /* EE04 80033A04 00000000 */ nop /* EE08 80033A08 0C045751 */ jal clear_model_data /* EE0C 80033A0C 00000000 */ nop /* EE10 80033A10 0C052010 */ jal clear_sprite_shading_data /* EE14 80033A14 00000000 */ nop /* EE18 80033A18 0C05177E */ jal reset_background_settings /* EE1C 80033A1C 00000000 */ nop /* EE20 80033A20 0C0482EC */ jal clear_entity_models /* EE24 80033A24 00000000 */ nop /* EE28 80033A28 0C047889 */ jal clear_animator_list /* EE2C 80033A2C 00000000 */ nop /* EE30 80033A30 0C048C2E */ jal clear_worker_list /* EE34 80033A34 00000000 */ nop /* EE38 80033A38 0000202D */ daddu $a0, $zero, $zero /* EE3C 80033A3C 0C0514BA */ jal hud_element_set_aux_cache /* EE40 80033A40 0080282D */ daddu $a1, $a0, $zero /* EE44 80033A44 0C050440 */ jal hud_element_clear_cache /* EE48 80033A48 00000000 */ nop /* EE4C 80033A4C 0C03A6EC */ jal reset_status_bar /* EE50 80033A50 00000000 */ nop /* EE54 80033A54 0C04C3FC */ jal clear_item_entity_data /* EE58 80033A58 00000000 */ nop /* EE5C 80033A5C 0C0B0C77 */ jal clear_script_list /* EE60 80033A60 00000000 */ nop /* EE64 80033A64 0C00E12F */ jal clear_npcs /* EE68 80033A68 00000000 */ nop /* EE6C 80033A6C 0C04432E */ jal clear_entity_data /* EE70 80033A70 24040001 */ addiu $a0, $zero, 0x1 /* EE74 80033A74 0C0515A0 */ jal clear_trigger_data /* EE78 80033A78 00000000 */ nop /* EE7C 80033A7C 3C040017 */ lui $a0, %hi(D_16C8E0) /* EE80 80033A80 2484C8E0 */ addiu $a0, $a0, %lo(D_16C8E0) /* EE84 80033A84 3C05001D */ lui $a1, %hi(D_1CC310) /* EE88 80033A88 24A5C310 */ addiu $a1, $a1, %lo(D_1CC310) /* EE8C 80033A8C 3C068024 */ lui $a2, %hi(get_dpad_input_radial) /* EE90 80033A90 24C6E000 */ addiu $a2, $a2, %lo(get_dpad_input_radial) /* EE94 80033A94 0C00A5CF */ jal dma_copy /* EE98 80033A98 00000000 */ nop /* EE9C 80033A9C 0C08F84C */ jal initialize_battle /* EEA0 80033AA0 00000000 */ nop /* EEA4 80033AA4 0C09027D */ jal D_802409F4 /* EEA8 80033AA8 00000000 */ nop /* EEAC 80033AAC 0C01CAF7 */ jal load_battle_section /* EEB0 80033AB0 00000000 */ nop /* EEB4 80033AB4 3C04800F */ lui $a0, %hi(gPlayerStatusPtr) /* EEB8 80033AB8 8C847B30 */ lw $a0, %lo(gPlayerStatusPtr)($a0) /* EEBC 80033ABC 8C820004 */ lw $v0, 0x4($a0) /* EEC0 80033AC0 2403FFBF */ addiu $v1, $zero, -0x41 /* EEC4 80033AC4 3C01800A */ lui $at, %hi(D_800A0904) /* EEC8 80033AC8 AC220904 */ sw $v0, %lo(D_800A0904)($at) /* EECC 80033ACC 00431024 */ and $v0, $v0, $v1 /* EED0 80033AD0 0C009C64 */ jal get_time_freeze_mode /* EED4 80033AD4 AC820004 */ sw $v0, 0x4($a0) /* EED8 80033AD8 3C01800A */ lui $at, %hi(D_800A0908) /* EEDC 80033ADC AC220908 */ sw $v0, %lo(D_800A0908)($at) /* EEE0 80033AE0 0C009C22 */ jal set_time_freeze_mode /* EEE4 80033AE4 0000202D */ daddu $a0, $zero, $zero /* EEE8 80033AE8 3C05800A */ lui $a1, %hi(gOverrideFlags) /* EEEC 80033AEC 24A5A650 */ addiu $a1, $a1, %lo(gOverrideFlags) /* EEF0 80033AF0 2403FFF7 */ addiu $v1, $zero, -0x9 /* EEF4 80033AF4 8CA20000 */ lw $v0, 0x0($a1) /* EEF8 80033AF8 3C04800A */ lui $a0, %hi(D_800A0900) /* EEFC 80033AFC 80840900 */ lb $a0, %lo(D_800A0900)($a0) /* EF00 80033B00 00431024 */ and $v0, $v0, $v1 /* EF04 80033B04 0481000F */ bgez $a0, .L80033B44 /* EF08 80033B08 ACA20000 */ sw $v0, 0x0($a1) .L80033B0C: /* EF0C 80033B0C 0C00F949 */ jal update_encounters /* EF10 80033B10 00000000 */ nop /* EF14 80033B14 0C08F90E */ jal btl_update /* EF18 80033B18 00000000 */ nop /* EF1C 80033B1C 0C00E64C */ jal update_npcs /* EF20 80033B20 00000000 */ nop /* EF24 80033B24 0C04C7BB */ jal update_item_entities /* EF28 80033B28 00000000 */ nop /* EF2C 80033B2C 0C016754 */ jal update_effects /* EF30 80033B30 00000000 */ nop /* EF34 80033B34 0C04599D */ jal iterate_models /* EF38 80033B38 00000000 */ nop /* EF3C 80033B3C 0C00B500 */ jal update_cameras /* EF40 80033B40 00000000 */ nop .L80033B44: /* EF44 80033B44 8FBF0014 */ lw $ra, 0x14($sp) /* EF48 80033B48 8FB00010 */ lw $s0, 0x10($sp) /* EF4C 80033B4C 03E00008 */ jr $ra /* EF50 80033B50 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void state_step_battle(void) { u32 currentBattleSelection; u32 currentBattleIndex; if (D_800A0900 == 5) { if (nuGfxCfb[1] != nuGfxCfb_ptr) { return; } D_800A0900--; gOverrideFlags |= GLOBAL_OVERRIDES_8; nuContRmbForceStop(); } if (D_800A0900 >= 0) { if (D_800A0900 > 0) { D_800A0900--; return; } else { D_800A0900 = -1; nuGfxSetCfb(bFrameBuffers, 2); nuContRmbForceStopEnd(); sfx_stop_env_sounds(); func_8003B1A8(); gGameStatusPtr->isBattle = TRUE; backup_map_collision_data(); #if VERSION_IQUE battle_heap_create(); #else load_obfuscation_shims(); shim_battle_heap_create_obfuscated(); #endif sfx_clear_env_sounds(0); currentBattleSelection = UNPACK_BTL_AREA(gCurrentBattleID); currentBattleIndex = UNPACK_BTL_INDEX(gCurrentBattleID); if (gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH || (currentBattleSelection == BTL_AREA_KKJ && currentBattleIndex == 0)) { gGameStatusPtr->peachFlags |= PEACH_STATUS_FLAG_IS_PEACH; spr_init_sprites(PLAYER_SPRITES_PEACH_BATTLE); } else { spr_init_sprites(PLAYER_SPRITES_MARIO_BATTLE); } clear_model_data(); clear_sprite_shading_data(); reset_background_settings(); clear_entity_models(); clear_animator_list(); clear_worker_list(); hud_element_set_aux_cache(NULL, 0); hud_element_clear_cache(); reset_status_bar(); clear_item_entity_data(); clear_script_list(); clear_npcs(); clear_entity_data(1); clear_trigger_data(); dma_copy(battle_code_ROM_START, battle_code_ROM_END, battle_code_VRAM); initialize_battle(); btl_save_world_cameras(); load_battle_section(); D_800A0904 = gPlayerStatusPtr->animFlags; gPlayerStatusPtr->animFlags &= ~PA_FLAG_PULSE_STONE_VISIBLE; D_800A0908 = get_time_freeze_mode(); set_time_freeze_mode(TIME_FREEZE_NORMAL); gOverrideFlags &= ~GLOBAL_OVERRIDES_8; if (D_800A0900 >= 0) { return; } } } update_encounters(); btl_update(); update_npcs(); update_item_entities(); update_effects(); iterate_models(); update_cameras(); }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80050970 /* 2BD70 80050970 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 2BD74 80050974 AFBF003C */ sw $ra, 0x3C($sp) /* 2BD78 80050978 AFBE0038 */ sw $fp, 0x38($sp) /* 2BD7C 8005097C AFB70034 */ sw $s7, 0x34($sp) /* 2BD80 80050980 AFB60030 */ sw $s6, 0x30($sp) /* 2BD84 80050984 AFB5002C */ sw $s5, 0x2C($sp) /* 2BD88 80050988 AFB40028 */ sw $s4, 0x28($sp) /* 2BD8C 8005098C AFB30024 */ sw $s3, 0x24($sp) /* 2BD90 80050990 AFB20020 */ sw $s2, 0x20($sp) /* 2BD94 80050994 AFB1001C */ sw $s1, 0x1C($sp) /* 2BD98 80050998 AFB00018 */ sw $s0, 0x18($sp) /* 2BD9C 8005099C 8C820000 */ lw $v0, 0x0($a0) /* 2BDA0 800509A0 8C840010 */ lw $a0, 0x10($a0) /* 2BDA4 800509A4 0000B82D */ daddu $s7, $zero, $zero /* 2BDA8 800509A8 1040006A */ beqz $v0, .L80050B54 /* 2BDAC 800509AC AFA40010 */ sw $a0, 0x10($sp) /* 2BDB0 800509B0 0C0135E5 */ jal au_bgm_get_player_with_song_name /* 2BDB4 800509B4 0040202D */ daddu $a0, $v0, $zero /* 2BDB8 800509B8 0040882D */ daddu $s1, $v0, $zero /* 2BDBC 800509BC 12200063 */ beqz $s1, .L80050B4C /* 2BDC0 800509C0 02E0A82D */ daddu $s5, $s7, $zero /* 2BDC4 800509C4 241E0001 */ addiu $fp, $zero, 0x1 /* 2BDC8 800509C8 3C168008 */ lui $s6, %hi(D_80078554) /* 2BDCC 800509CC 26D68554 */ addiu $s6, $s6, %lo(D_80078554) /* 2BDD0 800509D0 2414025C */ addiu $s4, $zero, 0x25C .L800509D4: /* 2BDD4 800509D4 02349021 */ addu $s2, $s1, $s4 /* 2BDD8 800509D8 8E420000 */ lw $v0, 0x0($s2) /* 2BDDC 800509DC 50400056 */ beql $v0, $zero, .L80050B38 /* 2BDE0 800509E0 26B50001 */ addiu $s5, $s5, 0x1 /* 2BDE4 800509E4 92420059 */ lbu $v0, 0x59($s2) /* 2BDE8 800509E8 10400052 */ beqz $v0, .L80050B34 /* 2BDEC 800509EC 0040182D */ daddu $v1, $v0, $zero /* 2BDF0 800509F0 00031040 */ sll $v0, $v1, 1 /* 2BDF4 800509F4 00431021 */ addu $v0, $v0, $v1 /* 2BDF8 800509F8 00021140 */ sll $v0, $v0, 5 /* 2BDFC 800509FC 244201FC */ addiu $v0, $v0, 0x1FC /* 2BE00 80050A00 8FA70010 */ lw $a3, 0x10($sp) /* 2BE04 80050A04 10E00024 */ beqz $a3, .L80050A98 /* 2BE08 80050A08 02229821 */ addu $s3, $s1, $v0 /* 2BE0C 80050A0C 9242005A */ lbu $v0, 0x5A($s2) /* 2BE10 80050A10 50400049 */ beql $v0, $zero, .L80050B38 /* 2BE14 80050A14 26B50001 */ addiu $s5, $s5, 0x1 /* 2BE18 80050A18 A240005A */ sb $zero, 0x5A($s2) /* 2BE1C 80050A1C 92650052 */ lbu $a1, 0x52($s3) /* 2BE20 80050A20 92620053 */ lbu $v0, 0x53($s3) /* 2BE24 80050A24 00A2102A */ slt $v0, $a1, $v0 /* 2BE28 80050A28 10400014 */ beqz $v0, .L80050A7C /* 2BE2C 80050A2C A27E005A */ sb $fp, 0x5A($s3) /* 2BE30 80050A30 000510C0 */ sll $v0, $a1, 3 /* 2BE34 80050A34 00451021 */ addu $v0, $v0, $a1 /* 2BE38 80050A38 000210C0 */ sll $v0, $v0, 3 /* 2BE3C 80050A3C 24461320 */ addiu $a2, $v0, 0x1320 .L80050A40: /* 2BE40 80050A40 8E220000 */ lw $v0, 0x0($s1) /* 2BE44 80050A44 00462021 */ addu $a0, $v0, $a2 /* 2BE48 80050A48 90830045 */ lbu $v1, 0x45($a0) /* 2BE4C 80050A4C 92220234 */ lbu $v0, 0x234($s1) /* 2BE50 80050A50 14620005 */ bne $v1, $v0, .L80050A68 /* 2BE54 80050A54 00000000 */ nop /* 2BE58 80050A58 9082003D */ lbu $v0, 0x3D($a0) /* 2BE5C 80050A5C AC960018 */ sw $s6, 0x18($a0) /* 2BE60 80050A60 34420010 */ ori $v0, $v0, 0x10 /* 2BE64 80050A64 A082003D */ sb $v0, 0x3D($a0) .L80050A68: /* 2BE68 80050A68 92620053 */ lbu $v0, 0x53($s3) /* 2BE6C 80050A6C 24A50001 */ addiu $a1, $a1, 0x1 /* 2BE70 80050A70 00A2102A */ slt $v0, $a1, $v0 /* 2BE74 80050A74 1440FFF2 */ bnez $v0, .L80050A40 /* 2BE78 80050A78 24C60048 */ addiu $a2, $a2, 0x48 .L80050A7C: /* 2BE7C 80050A7C 0220202D */ daddu $a0, $s1, $zero /* 2BE80 80050A80 82500018 */ lb $s0, 0x18($s2) /* 2BE84 80050A84 0C013FAC */ jal au_BGMCmd_E9_SubTrackVolume /* 2BE88 80050A88 0240282D */ daddu $a1, $s2, $zero /* 2BE8C 80050A8C 0220202D */ daddu $a0, $s1, $zero /* 2BE90 80050A90 080142C8 */ j .L80050B20 /* 2BE94 80050A94 0240282D */ daddu $a1, $s2, $zero .L80050A98: /* 2BE98 80050A98 9242005A */ lbu $v0, 0x5A($s2) /* 2BE9C 80050A9C 54400026 */ bnel $v0, $zero, .L80050B38 /* 2BEA0 80050AA0 26B50001 */ addiu $s5, $s5, 0x1 /* 2BEA4 80050AA4 A25E005A */ sb $fp, 0x5A($s2) /* 2BEA8 80050AA8 A260005A */ sb $zero, 0x5A($s3) /* 2BEAC 80050AAC 92450052 */ lbu $a1, 0x52($s2) /* 2BEB0 80050AB0 92420053 */ lbu $v0, 0x53($s2) /* 2BEB4 80050AB4 00A2102A */ slt $v0, $a1, $v0 /* 2BEB8 80050AB8 10400013 */ beqz $v0, .L80050B08 /* 2BEBC 80050ABC 000510C0 */ sll $v0, $a1, 3 /* 2BEC0 80050AC0 00451021 */ addu $v0, $v0, $a1 /* 2BEC4 80050AC4 000210C0 */ sll $v0, $v0, 3 /* 2BEC8 80050AC8 24461320 */ addiu $a2, $v0, 0x1320 .L80050ACC: /* 2BECC 80050ACC 8E220000 */ lw $v0, 0x0($s1) /* 2BED0 80050AD0 00462021 */ addu $a0, $v0, $a2 /* 2BED4 80050AD4 90830045 */ lbu $v1, 0x45($a0) /* 2BED8 80050AD8 92220234 */ lbu $v0, 0x234($s1) /* 2BEDC 80050ADC 14620005 */ bne $v1, $v0, .L80050AF4 /* 2BEE0 80050AE0 00000000 */ nop /* 2BEE4 80050AE4 9082003D */ lbu $v0, 0x3D($a0) /* 2BEE8 80050AE8 AC960018 */ sw $s6, 0x18($a0) /* 2BEEC 80050AEC 34420010 */ ori $v0, $v0, 0x10 /* 2BEF0 80050AF0 A082003D */ sb $v0, 0x3D($a0) .L80050AF4: /* 2BEF4 80050AF4 92420053 */ lbu $v0, 0x53($s2) /* 2BEF8 80050AF8 24A50001 */ addiu $a1, $a1, 0x1 /* 2BEFC 80050AFC 00A2102A */ slt $v0, $a1, $v0 /* 2BF00 80050B00 1440FFF2 */ bnez $v0, .L80050ACC /* 2BF04 80050B04 24C60048 */ addiu $a2, $a2, 0x48 .L80050B08: /* 2BF08 80050B08 0220202D */ daddu $a0, $s1, $zero /* 2BF0C 80050B0C 82700018 */ lb $s0, 0x18($s3) /* 2BF10 80050B10 0C013FAC */ jal au_BGMCmd_E9_SubTrackVolume /* 2BF14 80050B14 0260282D */ daddu $a1, $s3, $zero /* 2BF18 80050B18 0220202D */ daddu $a0, $s1, $zero /* 2BF1C 80050B1C 0260282D */ daddu $a1, $s3, $zero .L80050B20: /* 2BF20 80050B20 24020060 */ addiu $v0, $zero, 0x60 /* 2BF24 80050B24 A22000D4 */ sb $zero, 0xD4($s1) /* 2BF28 80050B28 A62200D4 */ sh $v0, 0xD4($s1) /* 2BF2C 80050B2C 0C013FB4 */ jal au_BGMCmd_F6_TrackVolumeFade /* 2BF30 80050B30 A23000D6 */ sb $s0, 0xD6($s1) .L80050B34: /* 2BF34 80050B34 26B50001 */ addiu $s5, $s5, 0x1 .L80050B38: /* 2BF38 80050B38 2AA20010 */ slti $v0, $s5, 0x10 /* 2BF3C 80050B3C 1440FFA5 */ bnez $v0, .L800509D4 /* 2BF40 80050B40 26940060 */ addiu $s4, $s4, 0x60 /* 2BF44 80050B44 080142D7 */ j .L80050B5C /* 2BF48 80050B48 02E0102D */ daddu $v0, $s7, $zero .L80050B4C: /* 2BF4C 80050B4C 080142D6 */ j .L80050B58 /* 2BF50 80050B50 24170002 */ addiu $s7, $zero, 0x2 .L80050B54: /* 2BF54 80050B54 24170003 */ addiu $s7, $zero, 0x3 .L80050B58: /* 2BF58 80050B58 02E0102D */ daddu $v0, $s7, $zero .L80050B5C: /* 2BF5C 80050B5C 8FBF003C */ lw $ra, 0x3C($sp) /* 2BF60 80050B60 8FBE0038 */ lw $fp, 0x38($sp) /* 2BF64 80050B64 8FB70034 */ lw $s7, 0x34($sp) /* 2BF68 80050B68 8FB60030 */ lw $s6, 0x30($sp) /* 2BF6C 80050B6C 8FB5002C */ lw $s5, 0x2C($sp) /* 2BF70 80050B70 8FB40028 */ lw $s4, 0x28($sp) /* 2BF74 80050B74 8FB30024 */ lw $s3, 0x24($sp) /* 2BF78 80050B78 8FB20020 */ lw $s2, 0x20($sp) /* 2BF7C 80050B7C 8FB1001C */ lw $s1, 0x1C($sp) /* 2BF80 80050B80 8FB00018 */ lw $s0, 0x18($sp) /* 2BF84 80050B84 03E00008 */ jr $ra /* 2BF88 80050B88 27BD0040 */ addiu $sp, $sp, 0x40 /* 2BF8C 80050B8C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: AuResult func_80050970(SongUpdateEvent* update) { BGMPlayer* player; BGMPlayerTrack* track; BGMPlayerTrack* parentTrack; AuVoice* voice; s32 i; s32 j; s8 oldVolume; s32 songName = update->songName; s32 variation = update->variation; AuResult status = AU_RESULT_OK; if (songName != 0) { player = au_bgm_get_player_with_song_name(songName); if (player != NULL) { for (i = 0; i < ARRAY_COUNT(player->tracks); i++) { track = &player->tracks[i]; if (track->bgmReadPos != NULL) { if (track->parentTrackIdx != 0) { parentTrack = &player->tracks[track->parentTrackIdx - 1]; if (variation != 0) { if (track->unk_5A != 0) { track->unk_5A = 0; parentTrack->unk_5A = 1; for (j = parentTrack->unk_52; j < parentTrack->unk_53; j++) { voice = &player->globals->voices[j]; if (voice->priority == player->priority) { voice->envelope.cmdListRelease = EnvelopeReleaseDefaultFast; voice->envelopeFlags |= AU_VOICE_ENV_FLAG_KEY_RELEASED; } } oldVolume = track->subTrackVolume >> 24; au_BGMCmd_E9_SubTrackVolume(player, track); player->seqCmdArgs.raw[0] = 0; player->seqCmdArgs.TrackVolumeFade.time = 96; player->seqCmdArgs.TrackVolumeFade.value = oldVolume; au_BGMCmd_F6_TrackVolumeFade(player, track); } } else { if (track->unk_5A == 0) { track->unk_5A = 1; parentTrack->unk_5A = 0; for (j = track->unk_52; j < track->unk_53; j++) { voice = &player->globals->voices[j]; if (voice->priority == player->priority) { voice->envelope.cmdListRelease = EnvelopeReleaseDefaultFast; voice->envelopeFlags |= AU_VOICE_ENV_FLAG_KEY_RELEASED; } } oldVolume = parentTrack->subTrackVolume >> 24; au_BGMCmd_E9_SubTrackVolume(player, parentTrack); player->seqCmdArgs.raw[0] = 0; player->seqCmdArgs.TrackVolumeFade.time = 96; player->seqCmdArgs.TrackVolumeFade.value = oldVolume; au_BGMCmd_F6_TrackVolumeFade(player, parentTrack); } } } } } } else { status = AU_ERROR_SONG_NOT_PLAYING; } } else { status = AU_ERROR_NULL_SONG_NAME; } return status; }
### RAW ASSEMBLY INSTRUCTIONS: glabel PartnerTestEnemy /* 1AEDB0 802804D0 27BDFFD8 */ addiu $sp, $sp, -0x28 .L802804D4: /* 1AEDB4 802804D4 AFB20018 */ sw $s2, 0x18($sp) /* 1AEDB8 802804D8 0080902D */ daddu $s2, $a0, $zero /* 1AEDBC 802804DC AFBF0024 */ sw $ra, 0x24($sp) /* 1AEDC0 802804E0 AFB40020 */ sw $s4, 0x20($sp) /* 1AEDC4 802804E4 AFB3001C */ sw $s3, 0x1C($sp) /* 1AEDC8 802804E8 AFB10014 */ sw $s1, 0x14($sp) /* 1AEDCC 802804EC AFB00010 */ sw $s0, 0x10($sp) /* 1AEDD0 802804F0 8E440148 */ lw $a0, 0x148($s2) /* 1AEDD4 802804F4 0C09A75B */ jal get_actor /* 1AEDD8 802804F8 8E50000C */ lw $s0, 0xC($s2) /* 1AEDDC 802804FC 8E140000 */ lw $s4, 0x0($s0) /* 1AEDE0 80280500 26100004 */ addiu $s0, $s0, 0x4 .L80280504: /* 1AEDE4 80280504 8E030000 */ lw $v1, 0x0($s0) /* 1AEDE8 80280508 26100004 */ addiu $s0, $s0, 0x4 /* 1AEDEC 8028050C 0240202D */ daddu $a0, $s2, $zero /* 1AEDF0 80280510 3C11800E */ lui $s1, %hi(gBattleStatus) /* 1AEDF4 80280514 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) /* 1AEDF8 80280518 0040982D */ daddu $s3, $v0, $zero glabel ShowShopPurchaseDialog /* 1AEDFC 8028051C AE230188 */ sw $v1, 0x188($s1) /* 1AEE00 80280520 8E030000 */ lw $v1, 0x0($s0) /* 1AEE04 80280524 26100004 */ addiu $s0, $s0, 0x4 /* 1AEE08 80280528 AE23018C */ sw $v1, 0x18C($s1) /* 1AEE0C 8028052C 8E030000 */ lw $v1, 0x0($s0) /* 1AEE10 80280530 26100004 */ addiu $s0, $s0, 0x4 /* 1AEE14 80280534 AE230190 */ sw $v1, 0x190($s1) /* 1AEE18 80280538 8E050000 */ lw $a1, 0x0($s0) /* 1AEE1C 8028053C 0C0B1EAF */ jal evt_get_variable /* 1AEE20 80280540 26100004 */ addiu $s0, $s0, 0x4 /* 1AEE24 80280544 A622017E */ sh $v0, 0x17E($s1) /* 1AEE28 80280548 A2200198 */ sb $zero, 0x198($s1) /* 1AEE2C 8028054C 8E100000 */ lw $s0, 0x0($s0) /* 1AEE30 80280550 24020030 */ addiu $v0, $zero, 0x30 /* 1AEE34 80280554 32030030 */ andi $v1, $s0, 0x30 /* 1AEE38 80280558 54620004 */ bnel $v1, $v0, .L8028056C /* 1AEE3C 8028055C 32020010 */ andi $v0, $s0, 0x10 /* 1AEE40 80280560 8E220000 */ lw $v0, 0x0($s1) /* 1AEE44 80280564 080A016B */ j .L802805AC /* 1AEE48 80280568 34420030 */ ori $v0, $v0, 0x30 .L8028056C: /* 1AEE4C 8028056C 10400004 */ beqz $v0, .L80280580 /* 1AEE50 80280570 2403FFDF */ addiu $v1, $zero, -0x21 /* 1AEE54 80280574 8E220000 */ lw $v0, 0x0($s1) /* 1AEE58 80280578 080A016A */ j .L802805A8 /* 1AEE5C 8028057C 34420010 */ ori $v0, $v0, 0x10 .L80280580: /* 1AEE60 80280580 32020020 */ andi $v0, $s0, 0x20 /* 1AEE64 80280584 10400005 */ beqz $v0, .L8028059C /* 1AEE68 80280588 2403FFEF */ addiu $v1, $zero, -0x11 /* 1AEE6C 8028058C 8E220000 */ lw $v0, 0x0($s1) /* 1AEE70 80280590 00431024 */ and $v0, $v0, $v1 /* 1AEE74 80280594 080A016B */ j .L802805AC /* 1AEE78 80280598 34420020 */ ori $v0, $v0, 0x20 .L8028059C: /* 1AEE7C 8028059C 8E220000 */ lw $v0, 0x0($s1) /* 1AEE80 802805A0 00431024 */ and $v0, $v0, $v1 /* 1AEE84 802805A4 2403FFDF */ addiu $v1, $zero, -0x21 .L802805A8: /* 1AEE88 802805A8 00431024 */ and $v0, $v0, $v1 .L802805AC: /* 1AEE8C 802805AC AE220000 */ sw $v0, 0x0($s1) /* 1AEE90 802805B0 32020040 */ andi $v0, $s0, 0x40 /* 1AEE94 802805B4 10400007 */ beqz $v0, .L802805D4 /* 1AEE98 802805B8 2404FFBF */ addiu $a0, $zero, -0x41 /* 1AEE9C 802805BC 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AEEA0 802805C0 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AEEA4 802805C4 8C620000 */ lw $v0, 0x0($v1) /* 1AEEA8 802805C8 34420040 */ ori $v0, $v0, 0x40 /* 1AEEAC 802805CC 080A017A */ j .L802805E8 /* 1AEEB0 802805D0 AC620000 */ sw $v0, 0x0($v1) .L802805D4: /* 1AEEB4 802805D4 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AEEB8 802805D8 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) .L802805DC: /* 1AEEBC 802805DC 8C430000 */ lw $v1, 0x0($v0) /* 1AEEC0 802805E0 00641824 */ and $v1, $v1, $a0 /* 1AEEC4 802805E4 AC430000 */ sw $v1, 0x0($v0) .L802805E8: /* 1AEEC8 802805E8 32020200 */ andi $v0, $s0, 0x200 /* 1AEECC 802805EC 10400007 */ beqz $v0, .L8028060C /* 1AEED0 802805F0 2404FDFF */ addiu $a0, $zero, -0x201 /* 1AEED4 802805F4 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AEED8 802805F8 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AEEDC 802805FC 8C620000 */ lw $v0, 0x0($v1) /* 1AEEE0 80280600 34420200 */ ori $v0, $v0, 0x200 /* 1AEEE4 80280604 080A0188 */ j .L80280620 .L80280608: /* 1AEEE8 80280608 AC620000 */ sw $v0, 0x0($v1) .L8028060C: /* 1AEEEC 8028060C 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AEEF0 80280610 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AEEF4 80280614 8C430000 */ lw $v1, 0x0($v0) /* 1AEEF8 80280618 00641824 */ and $v1, $v1, $a0 /* 1AEEFC 8028061C AC430000 */ sw $v1, 0x0($v0) .L80280620: /* 1AEF00 80280620 32020080 */ andi $v0, $s0, 0x80 /* 1AEF04 80280624 10400007 */ beqz $v0, .L80280644 /* 1AEF08 80280628 2404FF7F */ addiu $a0, $zero, -0x81 /* 1AEF0C 8028062C 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AEF10 80280630 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AEF14 80280634 8C620000 */ lw $v0, 0x0($v1) /* 1AEF18 80280638 34420080 */ ori $v0, $v0, 0x80 /* 1AEF1C 8028063C 080A0196 */ j .L80280658 .L80280640: /* 1AEF20 80280640 AC620000 */ sw $v0, 0x0($v1) .L80280644: /* 1AEF24 80280644 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AEF28 80280648 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AEF2C 8028064C 8C430000 */ lw $v1, 0x0($v0) .L80280650: /* 1AEF30 80280650 00641824 */ and $v1, $v1, $a0 /* 1AEF34 80280654 AC430000 */ sw $v1, 0x0($v0) .L80280658: /* 1AEF38 80280658 32020800 */ andi $v0, $s0, 0x800 /* 1AEF3C 8028065C 10400007 */ beqz $v0, .L8028067C /* 1AEF40 80280660 2404F7FF */ addiu $a0, $zero, -0x801 /* 1AEF44 80280664 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AEF48 80280668 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AEF4C 8028066C 8C620000 */ lw $v0, 0x0($v1) /* 1AEF50 80280670 34420800 */ ori $v0, $v0, 0x800 .L80280674: /* 1AEF54 80280674 080A01A4 */ j .L80280690 /* 1AEF58 80280678 AC620000 */ sw $v0, 0x0($v1) .L8028067C: /* 1AEF5C 8028067C 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1AEF60 80280680 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1AEF64 80280684 8C430000 */ lw $v1, 0x0($v0) /* 1AEF68 80280688 00641824 */ and $v1, $v1, $a0 /* 1AEF6C 8028068C AC430000 */ sw $v1, 0x0($v0) .L80280690: /* 1AEF70 80280690 96620428 */ lhu $v0, 0x428($s3) /* 1AEF74 80280694 92230193 */ lbu $v1, 0x193($s1) /* 1AEF78 80280698 A62201A0 */ sh $v0, 0x1A0($s1) /* 1AEF7C 8028069C 92620426 */ lbu $v0, 0x426($s3) /* 1AEF80 802806A0 A2230194 */ sb $v1, 0x194($s1) /* 1AEF84 802806A4 306300FF */ andi $v1, $v1, 0xFF /* 1AEF88 802806A8 A22201A2 */ sb $v0, 0x1A2($s1) /* 1AEF8C 802806AC 240200FF */ addiu $v0, $zero, 0xFF /* 1AEF90 802806B0 50620001 */ beql $v1, $v0, .L802806B8 /* 1AEF94 802806B4 A2200194 */ sb $zero, 0x194($s1) .L802806B8: /* 1AEF98 802806B8 8E220190 */ lw $v0, 0x190($s1) /* 1AEF9C 802806BC 30420F00 */ andi $v0, $v0, 0xF00 /* 1AEFA0 802806C0 00021203 */ sra $v0, $v0, 8 /* 1AEFA4 802806C4 0C09F7DF */ jal calc_partner_test_enemy /* 1AEFA8 802806C8 A2220195 */ sb $v0, 0x195($s1) .L802806CC: /* 1AEFAC 802806CC 04400006 */ bltz $v0, .L802806E8 /* 1AEFB0 802806D0 0240202D */ daddu $a0, $s2, $zero /* 1AEFB4 802806D4 0280282D */ daddu $a1, $s4, $zero /* 1AEFB8 802806D8 0C0B2026 */ jal evt_set_variable /* 1AEFBC 802806DC 0040302D */ daddu $a2, $v0, $zero /* 1AEFC0 802806E0 080A01BB */ j .L802806EC /* 1AEFC4 802806E4 24020002 */ addiu $v0, $zero, 0x2 .L802806E8: /* 1AEFC8 802806E8 240200FF */ addiu $v0, $zero, 0xFF .L802806EC: /* 1AEFCC 802806EC 8FBF0024 */ lw $ra, 0x24($sp) /* 1AEFD0 802806F0 8FB40020 */ lw $s4, 0x20($sp) /* 1AEFD4 802806F4 8FB3001C */ lw $s3, 0x1C($sp) /* 1AEFD8 802806F8 8FB20018 */ lw $s2, 0x18($sp) /* 1AEFDC 802806FC 8FB10014 */ lw $s1, 0x14($sp) /* 1AEFE0 80280700 8FB00010 */ lw $s0, 0x10($sp) /* 1AEFE4 80280704 03E00008 */ jr $ra /* 1AEFE8 80280708 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus PartnerTestEnemy(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; Actor* enemy = get_actor(script->owner1.enemyID); s32 temp_s4; s32 flags; s32 damageResult; u8 statusChance; temp_s4 = *args++; gBattleStatus.currentAttackElement = *args++; gBattleStatus.currentAttackEventSuppression = *args++; gBattleStatus.currentAttackStatus = *args++; gBattleStatus.currentAttackDamage = evt_get_variable(script, *args++); gBattleStatus.powerBounceCounter = 0; flags = *args++; if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) { battleStatus->flags1 |= BS_FLAGS1_10; battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_10) { battleStatus->flags1 |= BS_FLAGS1_10; battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) { battleStatus->flags1 &= ~BS_FLAGS1_10; battleStatus->flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; } else { battleStatus->flags1 &= ~BS_FLAGS1_10; battleStatus->flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } if (flags & BS_FLAGS1_40) { gBattleStatus.flags1 |= BS_FLAGS1_40; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_40; } if (flags & BS_FLAGS1_200) { gBattleStatus.flags1 |= BS_FLAGS1_200; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_200; } if (flags & BS_FLAGS1_80) { gBattleStatus.flags1 |= BS_FLAGS1_80; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_80; } if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) { gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE; } statusChance = battleStatus->currentAttackStatus; battleStatus->currentTargetID = enemy->targetActorID; battleStatus->currentTargetPart = enemy->targetPartIndex; battleStatus->statusChance = statusChance; if (statusChance == STATUS_KEY_NEVER) { battleStatus->statusChance = 0; } battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8; damageResult = calc_partner_test_enemy(); if (damageResult < 0) { return ApiStatus_FINISH; } evt_set_variable(script, temp_s4, damageResult); return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E0020000 /* 333EC0 E0020000 27BDFF78 */ addiu $sp, $sp, -0x88 /* 333EC4 E0020004 AFB1005C */ sw $s1, 0x5C($sp) /* 333EC8 E0020008 0080882D */ daddu $s1, $a0, $zero /* 333ECC E002000C AFB30064 */ sw $s3, 0x64($sp) /* 333ED0 E0020010 AFB00058 */ sw $s0, 0x58($sp) /* 333ED4 E0020014 3C108007 */ lui $s0, %hi(gCurrentCameraID) /* 333ED8 E0020018 26107410 */ addiu $s0, $s0, %lo(gCurrentCameraID) /* 333EDC E002001C AFBF0068 */ sw $ra, 0x68($sp) /* 333EE0 E0020020 AFB20060 */ sw $s2, 0x60($sp) /* 333EE4 E0020024 F7B80080 */ sdc1 $f24, 0x80($sp) /* 333EE8 E0020028 F7B60078 */ sdc1 $f22, 0x78($sp) /* 333EEC E002002C F7B40070 */ sdc1 $f20, 0x70($sp) /* 333EF0 E0020030 8E030000 */ lw $v1, 0x0($s0) /* 333EF4 E0020034 C638001C */ lwc1 $f24, 0x1C($s1) /* 333EF8 E0020038 C6360020 */ lwc1 $f22, 0x20($s1) /* 333EFC E002003C 00031080 */ sll $v0, $v1, 2 /* 333F00 E0020040 00431021 */ addu $v0, $v0, $v1 /* 333F04 E0020044 00021080 */ sll $v0, $v0, 2 /* 333F08 E0020048 00431023 */ subu $v0, $v0, $v1 /* 333F0C E002004C 000218C0 */ sll $v1, $v0, 3 /* 333F10 E0020050 00431021 */ addu $v0, $v0, $v1 /* 333F14 E0020054 000210C0 */ sll $v0, $v0, 3 /* 333F18 E0020058 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 333F1C E002005C 00220821 */ addu $at, $at, $v0 /* 333F20 E0020060 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at) /* 333F24 E0020064 8E32003C */ lw $s2, 0x3C($s1) /* 333F28 E0020068 0C080140 */ jal shim_sin_deg /* 333F2C E002006C 00A0982D */ daddu $s3, $a1, $zero /* 333F30 E0020070 8E030000 */ lw $v1, 0x0($s0) /* 333F34 E0020074 00031080 */ sll $v0, $v1, 2 /* 333F38 E0020078 00431021 */ addu $v0, $v0, $v1 /* 333F3C E002007C 00021080 */ sll $v0, $v0, 2 /* 333F40 E0020080 00431023 */ subu $v0, $v0, $v1 /* 333F44 E0020084 000218C0 */ sll $v1, $v0, 3 /* 333F48 E0020088 00431021 */ addu $v0, $v0, $v1 /* 333F4C E002008C 000210C0 */ sll $v0, $v0, 3 /* 333F50 E0020090 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 333F54 E0020094 00220821 */ addu $at, $at, $v0 /* 333F58 E0020098 C42C1DEC */ lwc1 $f12, %lo(gCameras + 0x6C)($at) /* 333F5C E002009C 0C080144 */ jal shim_cos_deg /* 333F60 E00200A0 46000506 */ mov.s $f20, $f0 /* 333F64 E00200A4 00131080 */ sll $v0, $s3, 2 /* 333F68 E00200A8 46000007 */ neg.s $f0, $f0 /* 333F6C E00200AC E7A00010 */ swc1 $f0, 0x10($sp) /* 333F70 E00200B0 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 333F74 E00200B4 44810000 */ mtc1 $at, $f0 /* 333F78 E00200B8 00531021 */ addu $v0, $v0, $s3 /* 333F7C E00200BC 4600C001 */ sub.s $f0, $f24, $f0 /* 333F80 E00200C0 00021080 */ sll $v0, $v0, 2 /* 333F84 E00200C4 44821000 */ mtc1 $v0, $f2 /* 333F88 E00200C8 00000000 */ nop /* 333F8C E00200CC 468010A0 */ cvt.s.w $f2, $f2 /* 333F90 E00200D0 46020000 */ add.s $f0, $f0, $f2 /* 333F94 E00200D4 27A40018 */ addiu $a0, $sp, 0x18 /* 333F98 E00200D8 4406A000 */ mfc1 $a2, $f20 /* 333F9C E00200DC 46000007 */ neg.s $f0, $f0 /* 333FA0 E00200E0 44050000 */ mfc1 $a1, $f0 /* 333FA4 E00200E4 0C080104 */ jal shim_guRotateF /* 333FA8 E00200E8 0000382D */ daddu $a3, $zero, $zero /* 333FAC E00200EC 2402FFFF */ addiu $v0, $zero, -0x1 /* 333FB0 E00200F0 1642001F */ bne $s2, $v0, .LE0020170 /* 333FB4 E00200F4 00000000 */ nop /* 333FB8 E00200F8 3C014180 */ lui $at, (0x41800000 >> 16) /* 333FBC E00200FC 44813000 */ mtc1 $at, $f6 /* 333FC0 E0020100 00000000 */ nop /* 333FC4 E0020104 4606B180 */ add.s $f6, $f22, $f6 /* 333FC8 E0020108 C7A40028 */ lwc1 $f4, 0x28($sp) /* 333FCC E002010C 46062102 */ mul.s $f4, $f4, $f6 /* 333FD0 E0020110 00000000 */ nop /* 333FD4 E0020114 3C028011 */ lui $v0, %hi(gPlayerStatus) /* 333FD8 E0020118 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) /* 333FDC E002011C C4400028 */ lwc1 $f0, 0x28($v0) /* 333FE0 E0020120 C6220010 */ lwc1 $f2, 0x10($s1) /* 333FE4 E0020124 46020000 */ add.s $f0, $f0, $f2 /* 333FE8 E0020128 46040000 */ add.s $f0, $f0, $f4 /* 333FEC E002012C E6200004 */ swc1 $f0, 0x4($s1) /* 333FF0 E0020130 C7A4002C */ lwc1 $f4, 0x2C($sp) /* 333FF4 E0020134 46062102 */ mul.s $f4, $f4, $f6 /* 333FF8 E0020138 00000000 */ nop /* 333FFC E002013C C6220014 */ lwc1 $f2, 0x14($s1) /* 334000 E0020140 C440002C */ lwc1 $f0, 0x2C($v0) /* 334004 E0020144 46020000 */ add.s $f0, $f0, $f2 /* 334008 E0020148 46040000 */ add.s $f0, $f0, $f4 /* 33400C E002014C E6200008 */ swc1 $f0, 0x8($s1) /* 334010 E0020150 C7A40030 */ lwc1 $f4, 0x30($sp) /* 334014 E0020154 46062102 */ mul.s $f4, $f4, $f6 /* 334018 E0020158 00000000 */ nop /* 33401C E002015C C6220018 */ lwc1 $f2, 0x18($s1) /* 334020 E0020160 C4400030 */ lwc1 $f0, 0x30($v0) /* 334024 E0020164 46020000 */ add.s $f0, $f0, $f2 /* 334028 E0020168 0800808F */ j .LE002023C /* 33402C E002016C 46040000 */ add.s $f0, $f0, $f4 .LE0020170: /* 334030 E0020170 1240001D */ beqz $s2, .LE00201E8 /* 334034 E0020174 00000000 */ nop /* 334038 E0020178 3C014180 */ lui $at, (0x41800000 >> 16) /* 33403C E002017C 44813000 */ mtc1 $at, $f6 /* 334040 E0020180 00000000 */ nop /* 334044 E0020184 4606B180 */ add.s $f6, $f22, $f6 /* 334048 E0020188 C7A40028 */ lwc1 $f4, 0x28($sp) /* 33404C E002018C 46062102 */ mul.s $f4, $f4, $f6 /* 334050 E0020190 00000000 */ nop /* 334054 E0020194 C6400038 */ lwc1 $f0, 0x38($s2) /* 334058 E0020198 C6220010 */ lwc1 $f2, 0x10($s1) /* 33405C E002019C 46020000 */ add.s $f0, $f0, $f2 /* 334060 E00201A0 46040000 */ add.s $f0, $f0, $f4 /* 334064 E00201A4 E6200004 */ swc1 $f0, 0x4($s1) /* 334068 E00201A8 C7A4002C */ lwc1 $f4, 0x2C($sp) /* 33406C E00201AC 46062102 */ mul.s $f4, $f4, $f6 /* 334070 E00201B0 00000000 */ nop /* 334074 E00201B4 C6220014 */ lwc1 $f2, 0x14($s1) /* 334078 E00201B8 C640003C */ lwc1 $f0, 0x3C($s2) /* 33407C E00201BC 46020000 */ add.s $f0, $f0, $f2 /* 334080 E00201C0 46040000 */ add.s $f0, $f0, $f4 /* 334084 E00201C4 E6200008 */ swc1 $f0, 0x8($s1) /* 334088 E00201C8 C7A40030 */ lwc1 $f4, 0x30($sp) /* 33408C E00201CC 46062102 */ mul.s $f4, $f4, $f6 /* 334090 E00201D0 00000000 */ nop /* 334094 E00201D4 C6220018 */ lwc1 $f2, 0x18($s1) /* 334098 E00201D8 C6400040 */ lwc1 $f0, 0x40($s2) /* 33409C E00201DC 46020000 */ add.s $f0, $f0, $f2 /* 3340A0 E00201E0 0800808F */ j .LE002023C /* 3340A4 E00201E4 46040000 */ add.s $f0, $f0, $f4 .LE00201E8: /* 3340A8 E00201E8 3C014180 */ lui $at, (0x41800000 >> 16) /* 3340AC E00201EC 44812000 */ mtc1 $at, $f4 /* 3340B0 E00201F0 00000000 */ nop /* 3340B4 E00201F4 4604B100 */ add.s $f4, $f22, $f4 /* 3340B8 E00201F8 C7A20028 */ lwc1 $f2, 0x28($sp) /* 3340BC E00201FC 46041082 */ mul.s $f2, $f2, $f4 /* 3340C0 E0020200 00000000 */ nop /* 3340C4 E0020204 C6200010 */ lwc1 $f0, 0x10($s1) /* 3340C8 E0020208 46020000 */ add.s $f0, $f0, $f2 /* 3340CC E002020C E6200004 */ swc1 $f0, 0x4($s1) /* 3340D0 E0020210 C7A2002C */ lwc1 $f2, 0x2C($sp) /* 3340D4 E0020214 46041082 */ mul.s $f2, $f2, $f4 /* 3340D8 E0020218 00000000 */ nop /* 3340DC E002021C C6200014 */ lwc1 $f0, 0x14($s1) /* 3340E0 E0020220 46020000 */ add.s $f0, $f0, $f2 /* 3340E4 E0020224 E6200008 */ swc1 $f0, 0x8($s1) /* 3340E8 E0020228 C7A20030 */ lwc1 $f2, 0x30($sp) /* 3340EC E002022C 46041082 */ mul.s $f2, $f2, $f4 /* 3340F0 E0020230 00000000 */ nop /* 3340F4 E0020234 C6200018 */ lwc1 $f0, 0x18($s1) /* 3340F8 E0020238 46020000 */ add.s $f0, $f0, $f2 .LE002023C: /* 3340FC E002023C E620000C */ swc1 $f0, 0xC($s1) /* 334100 E0020240 3C014140 */ lui $at, (0x41400000 >> 16) /* 334104 E0020244 44810000 */ mtc1 $at, $f0 /* 334108 E0020248 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 33410C E002024C 44811000 */ mtc1 $at, $f2 /* 334110 E0020250 4600B003 */ div.s $f0, $f22, $f0 /* 334114 E0020254 46020002 */ mul.s $f0, $f0, $f2 /* 334118 E0020258 00000000 */ nop /* 33411C E002025C 00131080 */ sll $v0, $s3, 2 /* 334120 E0020260 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 334124 E0020264 44812000 */ mtc1 $at, $f4 /* 334128 E0020268 00531021 */ addu $v0, $v0, $s3 /* 33412C E002026C 4604C101 */ sub.s $f4, $f24, $f4 /* 334130 E0020270 00021080 */ sll $v0, $v0, 2 /* 334134 E0020274 44821000 */ mtc1 $v0, $f2 /* 334138 E0020278 00000000 */ nop /* 33413C E002027C 468010A0 */ cvt.s.w $f2, $f2 /* 334140 E0020280 46022100 */ add.s $f4, $f4, $f2 /* 334144 E0020284 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 334148 E0020288 44811800 */ mtc1 $at, $f3 /* 33414C E002028C 44801000 */ mtc1 $zero, $f2 /* 334150 E0020290 46000021 */ cvt.d.s $f0, $f0 /* 334154 E0020294 46220000 */ add.d $f0, $f0, $f2 /* 334158 E0020298 E6240024 */ swc1 $f4, 0x24($s1) /* 33415C E002029C 46200020 */ cvt.s.d $f0, $f0 /* 334160 E00202A0 E6200028 */ swc1 $f0, 0x28($s1) /* 334164 E00202A4 8FBF0068 */ lw $ra, 0x68($sp) /* 334168 E00202A8 8FB30064 */ lw $s3, 0x64($sp) /* 33416C E00202AC 8FB20060 */ lw $s2, 0x60($sp) /* 334170 E00202B0 8FB1005C */ lw $s1, 0x5C($sp) /* 334174 E00202B4 8FB00058 */ lw $s0, 0x58($sp) /* 334178 E00202B8 D7B80080 */ ldc1 $f24, 0x80($sp) /* 33417C E00202BC D7B60078 */ ldc1 $f22, 0x78($sp) /* 334180 E00202C0 D7B40070 */ ldc1 $f20, 0x70($sp) /* 334184 E00202C4 03E00008 */ jr $ra /* 334188 E00202C8 27BD0088 */ addiu $sp, $sp, 0x88 ### DECOMPILED C INSTRUCTIONS: void func_E0020000(EmoteFXData* part, s32 arg1) { f32 unk_1C = part->unk_1C; f32 unk_20 = part->unk_20; Npc* npc = part->unk_3C; Matrix4f sp18; f32 sin; f32 cos; sin = shim_sin_deg(gCameras[gCurrentCameraID].currentYaw); cos = shim_cos_deg(gCameras[gCurrentCameraID].currentYaw); shim_guRotateF(sp18, -(unk_1C - 20.0f + arg1 * 20), sin, 0.0f, -cos); if (npc == PTR_LIST_END) { part->unk_04 = gPlayerStatus.position.x + part->unk_10 + sp18[1][0] * (unk_20 + 16.0f); part->unk_08 = gPlayerStatus.position.y + part->unk_14 + sp18[1][1] * (unk_20 + 16.0f); part->unk_0C = gPlayerStatus.position.z + part->unk_18 + sp18[1][2] * (unk_20 + 16.0f); } else if (npc != NULL) { part->unk_04 = npc->pos.x + part->unk_10 + sp18[1][0] * (unk_20 + 16.0f); part->unk_08 = npc->pos.y + part->unk_14 + sp18[1][1] * (unk_20 + 16.0f); part->unk_0C = npc->pos.z + part->unk_18 + sp18[1][2] * (unk_20 + 16.0f); } else { part->unk_04 = part->unk_10 + sp18[1][0] * (unk_20 + 16.0f); part->unk_08 = part->unk_14 + sp18[1][1] * (unk_20 + 16.0f); part->unk_0C = part->unk_18 + sp18[1][2] * (unk_20 + 16.0f); } part->unk_24 = unk_1C - 20.0f + arg1 * 20; part->unk_28 = (unk_20 / 12.0f) * 0.5f + 0.5; }
### RAW ASSEMBLY INSTRUCTIONS: glabel red_impact_update /* 3D3FB4 E00D0194 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 3D3FB8 E00D0198 AFB3001C */ sw $s3, 0x1C($sp) /* 3D3FBC E00D019C 0080982D */ daddu $s3, $a0, $zero /* 3D3FC0 E00D01A0 AFBF0024 */ sw $ra, 0x24($sp) /* 3D3FC4 E00D01A4 AFB40020 */ sw $s4, 0x20($sp) /* 3D3FC8 E00D01A8 AFB20018 */ sw $s2, 0x18($sp) /* 3D3FCC E00D01AC AFB10014 */ sw $s1, 0x14($sp) /* 3D3FD0 E00D01B0 AFB00010 */ sw $s0, 0x10($sp) /* 3D3FD4 E00D01B4 F7BA0040 */ sdc1 $f26, 0x40($sp) /* 3D3FD8 E00D01B8 F7B80038 */ sdc1 $f24, 0x38($sp) /* 3D3FDC E00D01BC F7B60030 */ sdc1 $f22, 0x30($sp) /* 3D3FE0 E00D01C0 F7B40028 */ sdc1 $f20, 0x28($sp) /* 3D3FE4 E00D01C4 8E64000C */ lw $a0, 0xC($s3) /* 3D3FE8 E00D01C8 8C82002C */ lw $v0, 0x2C($a0) /* 3D3FEC E00D01CC 8C830028 */ lw $v1, 0x28($a0) /* 3D3FF0 E00D01D0 24420001 */ addiu $v0, $v0, 0x1 /* 3D3FF4 E00D01D4 2463FFFF */ addiu $v1, $v1, -0x1 /* 3D3FF8 E00D01D8 AC82002C */ sw $v0, 0x2C($a0) /* 3D3FFC E00D01DC 04610005 */ bgez $v1, .LE00D01F4 /* 3D4000 E00D01E0 AC830028 */ sw $v1, 0x28($a0) /* 3D4004 E00D01E4 0C080128 */ jal shim_remove_effect /* 3D4008 E00D01E8 0260202D */ daddu $a0, $s3, $zero /* 3D400C E00D01EC 08034106 */ j .LE00D0418 /* 3D4010 E00D01F0 00000000 */ nop .LE00D01F4: /* 3D4014 E00D01F4 8C82002C */ lw $v0, 0x2C($a0) /* 3D4018 E00D01F8 94940000 */ lhu $s4, 0x0($a0) /* 3D401C E00D01FC 28420008 */ slti $v0, $v0, 0x8 /* 3D4020 E00D0200 14400009 */ bnez $v0, .LE00D0228 /* 3D4024 E00D0204 00000000 */ nop /* 3D4028 E00D0208 3C01E00D */ lui $at, (0xE00D0B20 >> 16) /* 3D402C E00D020C D4220B20 */ ldc1 $f2, (0xE00D0B20 & 0xFFFF)($at) /* 3D4030 E00D0210 C4800038 */ lwc1 $f0, 0x38($a0) /* 3D4034 E00D0214 46800021 */ cvt.d.w $f0, $f0 /* 3D4038 E00D0218 46220002 */ mul.d $f0, $f0, $f2 /* 3D403C E00D021C 00000000 */ nop /* 3D4040 E00D0220 4620028D */ trunc.w.d $f10, $f0 /* 3D4044 E00D0224 E48A0038 */ swc1 $f10, 0x38($a0) .LE00D0228: /* 3D4048 E00D0228 8E620008 */ lw $v0, 0x8($s3) /* 3D404C E00D022C 24110001 */ addiu $s1, $zero, 0x1 /* 3D4050 E00D0230 0222102A */ slt $v0, $s1, $v0 /* 3D4054 E00D0234 10400078 */ beqz $v0, .LE00D0418 /* 3D4058 E00D0238 24840058 */ addiu $a0, $a0, 0x58 /* 3D405C E00D023C 2490003C */ addiu $s0, $a0, 0x3C /* 3D4060 E00D0240 24120004 */ addiu $s2, $zero, 0x4 /* 3D4064 E00D0244 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 3D4068 E00D0248 4481A800 */ mtc1 $at, $f21 /* 3D406C E00D024C 4480A000 */ mtc1 $zero, $f20 /* 3D4070 E00D0250 3C014200 */ lui $at, (0x42000000 >> 16) /* 3D4074 E00D0254 4481B000 */ mtc1 $at, $f22 /* 3D4078 E00D0258 3C01E00D */ lui $at, (0xE00D0B28 >> 16) /* 3D407C E00D025C D4380B28 */ ldc1 $f24, (0xE00D0B28 & 0xFFFF)($at) /* 3D4080 E00D0260 3C014300 */ lui $at, (0x43000000 >> 16) /* 3D4084 E00D0264 4481D000 */ mtc1 $at, $f26 .LE00D0268: /* 3D4088 E00D0268 8E020010 */ lw $v0, 0x10($s0) /* 3D408C E00D026C 24420001 */ addiu $v0, $v0, 0x1 /* 3D4090 E00D0270 04400063 */ bltz $v0, .LE00D0400 /* 3D4094 E00D0274 AE020010 */ sw $v0, 0x10($s0) /* 3D4098 E00D0278 14400041 */ bnez $v0, .LE00D0380 /* 3D409C E00D027C 00000000 */ nop /* 3D40A0 E00D0280 C60CFFF8 */ lwc1 $f12, -0x8($s0) /* 3D40A4 E00D0284 AE00FFC8 */ sw $zero, -0x38($s0) /* 3D40A8 E00D0288 AE00FFCC */ sw $zero, -0x34($s0) /* 3D40AC E00D028C 0C080140 */ jal shim_sin_deg /* 3D40B0 E00D0290 AE00FFD0 */ sw $zero, -0x30($s0) /* 3D40B4 E00D0294 46000007 */ neg.s $f0, $f0 /* 3D40B8 E00D0298 46000021 */ cvt.d.s $f0, $f0 /* 3D40BC E00D029C 46340002 */ mul.d $f0, $f0, $f20 /* 3D40C0 E00D02A0 00000000 */ nop /* 3D40C4 E00D02A4 C60CFFF8 */ lwc1 $f12, -0x8($s0) /* 3D40C8 E00D02A8 46200020 */ cvt.s.d $f0, $f0 /* 3D40CC E00D02AC 0C080144 */ jal shim_cos_deg /* 3D40D0 E00D02B0 E600FFD4 */ swc1 $f0, -0x2C($s0) /* 3D40D4 E00D02B4 46000021 */ cvt.d.s $f0, $f0 /* 3D40D8 E00D02B8 46340002 */ mul.d $f0, $f0, $f20 /* 3D40DC E00D02BC 00000000 */ nop /* 3D40E0 E00D02C0 44911000 */ mtc1 $s1, $f2 /* 3D40E4 E00D02C4 00000000 */ nop /* 3D40E8 E00D02C8 468010A0 */ cvt.s.w $f2, $f2 /* 3D40EC E00D02CC 3C014020 */ lui $at, (0x40200000 >> 16) /* 3D40F0 E00D02D0 44812800 */ mtc1 $at, $f5 /* 3D40F4 E00D02D4 44802000 */ mtc1 $zero, $f4 /* 3D40F8 E00D02D8 460010A1 */ cvt.d.s $f2, $f2 /* 3D40FC E00D02DC AE00FFDC */ sw $zero, -0x24($s0) /* 3D4100 E00D02E0 E6160000 */ swc1 $f22, 0x0($s0) /* 3D4104 E00D02E4 46222101 */ sub.d $f4, $f4, $f2 /* 3D4108 E00D02E8 E6160004 */ swc1 $f22, 0x4($s0) /* 3D410C E00D02EC E616000C */ swc1 $f22, 0xC($s0) /* 3D4110 E00D02F0 46202120 */ cvt.s.d $f4, $f4 /* 3D4114 E00D02F4 E604FFE4 */ swc1 $f4, -0x1C($s0) /* 3D4118 E00D02F8 46200020 */ cvt.s.d $f0, $f0 /* 3D411C E00D02FC 1680000D */ bnez $s4, .LE00D0334 /* 3D4120 E00D0300 E600FFD8 */ swc1 $f0, -0x28($s0) /* 3D4124 E00D0304 44920000 */ mtc1 $s2, $f0 /* 3D4128 E00D0308 00000000 */ nop /* 3D412C E00D030C 46800021 */ cvt.d.w $f0, $f0 /* 3D4130 E00D0310 46340002 */ mul.d $f0, $f0, $f20 /* 3D4134 E00D0314 00000000 */ nop /* 3D4138 E00D0318 44921000 */ mtc1 $s2, $f2 /* 3D413C E00D031C 00000000 */ nop /* 3D4140 E00D0320 468010A0 */ cvt.s.w $f2, $f2 /* 3D4144 E00D0324 E602FFE0 */ swc1 $f2, -0x20($s0) /* 3D4148 E00D0328 46200020 */ cvt.s.d $f0, $f0 /* 3D414C E00D032C 080340DF */ j .LE00D037C /* 3D4150 E00D0330 E600FFE8 */ swc1 $f0, -0x18($s0) .LE00D0334: /* 3D4154 E00D0334 C602FFE4 */ lwc1 $f2, -0x1C($s0) /* 3D4158 E00D0338 3C01E00D */ lui $at, (0xE00D0B30 >> 16) /* 3D415C E00D033C D4200B30 */ ldc1 $f0, (0xE00D0B30 & 0xFFFF)($at) /* 3D4160 E00D0340 460010A1 */ cvt.d.s $f2, $f2 /* 3D4164 E00D0344 46201082 */ mul.d $f2, $f2, $f0 /* 3D4168 E00D0348 00000000 */ nop /* 3D416C E00D034C 44910000 */ mtc1 $s1, $f0 /* 3D4170 E00D0350 00000000 */ nop /* 3D4174 E00D0354 46800021 */ cvt.d.w $f0, $f0 /* 3D4178 E00D0358 46340000 */ add.d $f0, $f0, $f20 /* 3D417C E00D035C 46340102 */ mul.d $f4, $f0, $f20 /* 3D4180 E00D0360 00000000 */ nop /* 3D4184 E00D0364 46200020 */ cvt.s.d $f0, $f0 /* 3D4188 E00D0368 E600FFE0 */ swc1 $f0, -0x20($s0) /* 3D418C E00D036C 462010A0 */ cvt.s.d $f2, $f2 /* 3D4190 E00D0370 E602FFE4 */ swc1 $f2, -0x1C($s0) /* 3D4194 E00D0374 46202120 */ cvt.s.d $f4, $f4 /* 3D4198 E00D0378 E604FFE8 */ swc1 $f4, -0x18($s0) .LE00D037C: /* 3D419C E00D037C E6160008 */ swc1 $f22, 0x8($s0) .LE00D0380: /* 3D41A0 E00D0380 C6040004 */ lwc1 $f4, 0x4($s0) /* 3D41A4 E00D0384 3C01E00D */ lui $at, (0xE00D0B38 >> 16) /* 3D41A8 E00D0388 D4200B38 */ ldc1 $f0, (0xE00D0B38 & 0xFFFF)($at) /* 3D41AC E00D038C 46002121 */ cvt.d.s $f4, $f4 /* 3D41B0 E00D0390 46202102 */ mul.d $f4, $f4, $f0 /* 3D41B4 E00D0394 00000000 */ nop /* 3D41B8 E00D0398 C602FFE0 */ lwc1 $f2, -0x20($s0) /* 3D41BC E00D039C 460010A1 */ cvt.d.s $f2, $f2 /* 3D41C0 E00D03A0 46381082 */ mul.d $f2, $f2, $f24 /* 3D41C4 E00D03A4 00000000 */ nop /* 3D41C8 E00D03A8 C6080000 */ lwc1 $f8, 0x0($s0) /* 3D41CC E00D03AC C6000004 */ lwc1 $f0, 0x4($s0) /* 3D41D0 E00D03B0 C6060008 */ lwc1 $f6, 0x8($s0) /* 3D41D4 E00D03B4 46004200 */ add.s $f8, $f8, $f0 /* 3D41D8 E00D03B8 C600000C */ lwc1 $f0, 0xC($s0) /* 3D41DC E00D03BC 46003180 */ add.s $f6, $f6, $f0 /* 3D41E0 E00D03C0 C600FFE8 */ lwc1 $f0, -0x18($s0) /* 3D41E4 E00D03C4 46000021 */ cvt.d.s $f0, $f0 /* 3D41E8 E00D03C8 46380002 */ mul.d $f0, $f0, $f24 /* 3D41EC E00D03CC 00000000 */ nop /* 3D41F0 E00D03D0 E6080000 */ swc1 $f8, 0x0($s0) /* 3D41F4 E00D03D4 E6060008 */ swc1 $f6, 0x8($s0) /* 3D41F8 E00D03D8 46202120 */ cvt.s.d $f4, $f4 /* 3D41FC E00D03DC 462010A0 */ cvt.s.d $f2, $f2 /* 3D4200 E00D03E0 E602FFE0 */ swc1 $f2, -0x20($s0) /* 3D4204 E00D03E4 46004086 */ mov.s $f2, $f8 /* 3D4208 E00D03E8 4602D03C */ c.lt.s $f26, $f2 /* 3D420C E00D03EC E6040004 */ swc1 $f4, 0x4($s0) /* 3D4210 E00D03F0 46200020 */ cvt.s.d $f0, $f0 /* 3D4214 E00D03F4 45000002 */ bc1f .LE00D0400 /* 3D4218 E00D03F8 E600FFE8 */ swc1 $f0, -0x18($s0) /* 3D421C E00D03FC E61A0000 */ swc1 $f26, 0x0($s0) .LE00D0400: /* 3D4220 E00D0400 26520002 */ addiu $s2, $s2, 0x2 /* 3D4224 E00D0404 26310001 */ addiu $s1, $s1, 0x1 /* 3D4228 E00D0408 8E620008 */ lw $v0, 0x8($s3) /* 3D422C E00D040C 0222102A */ slt $v0, $s1, $v0 /* 3D4230 E00D0410 1440FF95 */ bnez $v0, .LE00D0268 /* 3D4234 E00D0414 26100058 */ addiu $s0, $s0, 0x58 .LE00D0418: /* 3D4238 E00D0418 8FBF0024 */ lw $ra, 0x24($sp) /* 3D423C E00D041C 8FB40020 */ lw $s4, 0x20($sp) /* 3D4240 E00D0420 8FB3001C */ lw $s3, 0x1C($sp) /* 3D4244 E00D0424 8FB20018 */ lw $s2, 0x18($sp) /* 3D4248 E00D0428 8FB10014 */ lw $s1, 0x14($sp) /* 3D424C E00D042C 8FB00010 */ lw $s0, 0x10($sp) /* 3D4250 E00D0430 D7BA0040 */ ldc1 $f26, 0x40($sp) /* 3D4254 E00D0434 D7B80038 */ ldc1 $f24, 0x38($sp) /* 3D4258 E00D0438 D7B60030 */ ldc1 $f22, 0x30($sp) /* 3D425C E00D043C D7B40028 */ ldc1 $f20, 0x28($sp) /* 3D4260 E00D0440 03E00008 */ jr $ra /* 3D4264 E00D0444 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void red_impact_update(EffectInstance* effect) { RedImpactFXData* part = effect->data.redImpact; s32 unk_00; s32 i; part->unk_2C++; part->unk_28--; if (part->unk_28 < 0) { shim_remove_effect(effect); return; } unk_00 = part->unk_00; if (part->unk_2C >= 8) { part->unk_38 *= 0.8; } part++; for (i = 1; i < effect->numParts; i++, part++) { part->unk_4C++; if (part->unk_4C >= 0) { if (part->unk_4C == 0) { part->unk_04 = 0; part->unk_08 = 0; part->unk_0C = 0; part->unk_10 = -shim_sin_deg(part->unk_34) * 0.5; part->unk_14 = shim_cos_deg(part->unk_34) * 0.5; part->unk_18 = 0; part->unk_3C = 32.0f; part->unk_40 = 32.0f; part->unk_48 = 32.0f; part->unk_20 = 8.0 - (f32) i; if (unk_00 == 0) { part->unk_1C = 2 + i * 2; part->unk_24 = (2 + i * 2) * 0.5; } else { part->unk_1C = i + 0.5; part->unk_20 *= 0.6; part->unk_24 = (i + 0.5) * 0.5; } part->unk_44 = 32.0f; } part->unk_3C += part->unk_40; part->unk_44 += part->unk_48; part->unk_40 *= 0.9; part->unk_1C *= 1.002; part->unk_24 *= 1.002; if (part->unk_3C > 128.0f) { part->unk_3C = 128.0f; } } } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8024A4DC /* 13D81C 8024A4DC 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 13D820 8024A4E0 AFB00010 */ sw $s0, 0x10($sp) /* 13D824 8024A4E4 3C038011 */ lui $v1, %hi(gPlayerData) /* 13D828 8024A4E8 2463F290 */ addiu $v1, $v1, %lo(gPlayerData) /* 13D82C 8024A4EC 24020001 */ addiu $v0, $zero, 0x1 /* 13D830 8024A4F0 AFBF0014 */ sw $ra, 0x14($sp) /* 13D834 8024A4F4 3C018027 */ lui $at, %hi(D_802705D0) /* 13D838 8024A4F8 AC2005D0 */ sw $zero, %lo(D_802705D0)($at) /* 13D83C 8024A4FC 14820011 */ bne $a0, $v0, .L8024A544 /* 13D840 8024A500 0000802D */ daddu $s0, $zero, $zero /* 13D844 8024A504 0200202D */ daddu $a0, $s0, $zero /* 13D848 8024A508 0060302D */ daddu $a2, $v1, $zero /* 13D84C 8024A50C 3C058027 */ lui $a1, %hi(gPauseItemsItemIDs) /* 13D850 8024A510 24A50400 */ addiu $a1, $a1, %lo(gPauseItemsItemIDs) .L8024A514: /* 13D854 8024A514 84C201B4 */ lh $v0, 0x1B4($a2) /* 13D858 8024A518 94C301B4 */ lhu $v1, 0x1B4($a2) /* 13D85C 8024A51C 10400004 */ beqz $v0, .L8024A530 D_8024A520: /* 13D860 8024A520 24840001 */ addiu $a0, $a0, 0x1 /* 13D864 8024A524 A4A30000 */ sh $v1, 0x0($a1) /* 13D868 8024A528 24A50002 */ addiu $a1, $a1, 0x2 /* 13D86C 8024A52C 26100001 */ addiu $s0, $s0, 0x1 .L8024A530: /* 13D870 8024A530 2882000A */ slti $v0, $a0, 0xA /* 13D874 8024A534 1440FFF7 */ bnez $v0, .L8024A514 /* 13D878 8024A538 24C60002 */ addiu $a2, $a2, 0x2 /* 13D87C 8024A53C 0809295F */ j .L8024A57C /* 13D880 8024A540 00000000 */ nop .L8024A544: /* 13D884 8024A544 0000202D */ daddu $a0, $zero, $zero .L8024A548: /* 13D888 8024A548 0060302D */ daddu $a2, $v1, $zero /* 13D88C 8024A54C 3C058027 */ lui $a1, %hi(gPauseItemsItemIDs) /* 13D890 8024A550 24A50400 */ addiu $a1, $a1, %lo(gPauseItemsItemIDs) .L8024A554: /* 13D894 8024A554 84C20074 */ lh $v0, 0x74($a2) /* 13D898 8024A558 94C30074 */ lhu $v1, 0x74($a2) /* 13D89C 8024A55C 10400004 */ beqz $v0, .L8024A570 /* 13D8A0 8024A560 24840001 */ addiu $a0, $a0, 0x1 /* 13D8A4 8024A564 A4A30000 */ sh $v1, 0x0($a1) /* 13D8A8 8024A568 24A50002 */ addiu $a1, $a1, 0x2 /* 13D8AC 8024A56C 26100001 */ addiu $s0, $s0, 0x1 .L8024A570: /* 13D8B0 8024A570 28820020 */ slti $v0, $a0, 0x20 .L8024A574: /* 13D8B4 8024A574 1440FFF7 */ bnez $v0, .L8024A554 /* 13D8B8 8024A578 24C60002 */ addiu $a2, $a2, 0x2 .L8024A57C: /* 13D8BC 8024A57C 16000005 */ bnez $s0, .L8024A594 /* 13D8C0 8024A580 24027FFE */ addiu $v0, $zero, 0x7FFE /* 13D8C4 8024A584 3C018027 */ lui $at, %hi(gPauseItemsItemIDs) /* 13D8C8 8024A588 A4220400 */ sh $v0, %lo(gPauseItemsItemIDs)($at) /* 13D8CC 8024A58C 0809296B */ j D_8024A5AC /* 13D8D0 8024A590 24100001 */ addiu $s0, $zero, 0x1 .L8024A594: /* 13D8D4 8024A594 3C048027 */ lui $a0, %hi(gPauseItemsItemIDs) /* 13D8D8 8024A598 24840400 */ addiu $a0, $a0, %lo(gPauseItemsItemIDs) /* 13D8DC 8024A59C 3C068025 */ lui $a2, %hi(func_802497B0) /* 13D8E0 8024A5A0 24C697B0 */ addiu $a2, $a2, %lo(func_802497B0) /* 13D8E4 8024A5A4 0C091293 */ jal func_80244A4C .L8024A5A8: /* 13D8E8 8024A5A8 0200282D */ daddu $a1, $s0, $zero D_8024A5AC: /* 13D8EC 8024A5AC 3C018027 */ lui $at, %hi(gPauseItemsNumItems) /* 13D8F0 8024A5B0 A43005CC */ sh $s0, %lo(gPauseItemsNumItems)($at) /* 13D8F4 8024A5B4 0200202D */ daddu $a0, $s0, $zero .L8024A5B8: /* 13D8F8 8024A5B8 28820064 */ slti $v0, $a0, 0x64 /* 13D8FC 8024A5BC 1040000A */ beqz $v0, .L8024A5E8 /* 13D900 8024A5C0 24057FFF */ addiu $a1, $zero, 0x7FFF /* 13D904 8024A5C4 3C038027 */ lui $v1, %hi(gPauseItemsItemIDs) /* 13D908 8024A5C8 24630400 */ addiu $v1, $v1, %lo(gPauseItemsItemIDs) /* 13D90C 8024A5CC 00041040 */ sll $v0, $a0, 1 /* 13D910 8024A5D0 00431821 */ addu $v1, $v0, $v1 .L8024A5D4: /* 13D914 8024A5D4 A4650000 */ sh $a1, 0x0($v1) /* 13D918 8024A5D8 24840001 */ addiu $a0, $a0, 0x1 /* 13D91C 8024A5DC 28820064 */ slti $v0, $a0, 0x64 /* 13D920 8024A5E0 1440FFFC */ bnez $v0, .L8024A5D4 /* 13D924 8024A5E4 24630002 */ addiu $v1, $v1, 0x2 .L8024A5E8: /* 13D928 8024A5E8 3C058027 */ lui $a1, %hi(gPauseItemsPages) /* 13D92C 8024A5EC 24A504D0 */ addiu $a1, $a1, %lo(gPauseItemsPages) dgb_01_img5_gfx: /* 13D930 8024A5F0 0000202D */ daddu $a0, $zero, $zero /* 13D934 8024A5F4 3C078027 */ lui $a3, %hi(gPauseItemsNumItems) /* 13D938 8024A5F8 24E705CC */ addiu $a3, $a3, %lo(gPauseItemsNumItems) /* 13D93C 8024A5FC 24060001 */ addiu $a2, $zero, 0x1 /* 13D940 8024A600 24090008 */ addiu $t1, $zero, 0x8 /* 13D944 8024A604 24080008 */ addiu $t0, $zero, 0x8 /* 13D948 8024A608 00A81821 */ addu $v1, $a1, $t0 /* 13D94C 8024A60C 3C018027 */ lui $at, %hi(gPauseItemsSelectedIndex) /* 13D950 8024A610 AC2005C0 */ sw $zero, %lo(gPauseItemsSelectedIndex)($at) /* 13D954 8024A614 3C018027 */ lui $at, %hi(gPauseItemsSelectedItem) /* 13D958 8024A618 AC2005C8 */ sw $zero, %lo(gPauseItemsSelectedItem)($at) /* 13D95C 8024A61C 3C018027 */ lui $at, %hi(D_802705C4) /* 13D960 8024A620 AC2005C4 */ sw $zero, %lo(D_802705C4)($at) /* 13D964 8024A624 3C018027 */ lui $at, %hi(gPauseItemsTargetScrollIndex) /* 13D968 8024A628 AC2005DC */ sw $zero, %lo(gPauseItemsTargetScrollIndex)($at) .L8024A62C: /* 13D96C 8024A62C 3C018027 */ lui $at, %hi(gPauseItemsCurrentPage) D_8024A630_DD7300: /* 13D970 8024A630 AC2004C8 */ sw $zero, %lo(gPauseItemsCurrentPage)($at) .L8024A634: /* 13D974 8024A634 84E20000 */ lh $v0, 0x0($a3) D_8024A638_DD7308: /* 13D978 8024A638 04420001 */ bltzl $v0, jtbl_8024A640 /* 13D97C 8024A63C 24420007 */ addiu $v0, $v0, 0x7 jtbl_8024A640: /* 13D980 8024A640 000210C3 */ sra $v0, $v0, 3 /* 13D984 8024A644 0082102A */ slt $v0, $a0, $v0 /* 13D988 8024A648 1040000B */ beqz $v0, .L8024A678 /* 13D98C 8024A64C 000410C0 */ sll $v0, $a0, 3 /* 13D990 8024A650 24840001 */ addiu $a0, $a0, 0x1 /* 13D994 8024A654 A062FFF9 */ sb $v0, -0x7($v1) /* 13D998 8024A658 A066FFFA */ sb $a2, -0x6($v1) /* 13D99C 8024A65C A069FFFB */ sb $t1, -0x5($v1) /* 13D9A0 8024A660 A0A60000 */ sb $a2, 0x0($a1) /* 13D9A4 8024A664 AC62FFFC */ sw $v0, -0x4($v1) /* 13D9A8 8024A668 AC680000 */ sw $t0, 0x0($v1) /* 13D9AC 8024A66C 2463000C */ addiu $v1, $v1, 0xC dgb_01_img6_png: /* 13D9B0 8024A670 0809298D */ j .L8024A634 /* 13D9B4 8024A674 24A5000C */ addiu $a1, $a1, 0xC .L8024A678: /* 13D9B8 8024A678 94E20000 */ lhu $v0, 0x0($a3) /* 13D9BC 8024A67C 30420007 */ andi $v0, $v0, 0x7 .L8024A680: /* 13D9C0 8024A680 10400016 */ beqz $v0, .L8024A6DC /* 13D9C4 8024A684 000418C0 */ sll $v1, $a0, 3 /* 13D9C8 8024A688 24020001 */ addiu $v0, $zero, 0x1 /* 13D9CC 8024A68C A0A30001 */ sb $v1, 0x1($a1) /* 13D9D0 8024A690 A0A20002 */ sb $v0, 0x2($a1) /* 13D9D4 8024A694 A0A20000 */ sb $v0, 0x0($a1) /* 13D9D8 8024A698 84E60000 */ lh $a2, 0x0($a3) /* 13D9DC 8024A69C ACA30004 */ sw $v1, 0x4($a1) /* 13D9E0 8024A6A0 04C10002 */ bgez $a2, .L8024A6AC /* 13D9E4 8024A6A4 00C0102D */ daddu $v0, $a2, $zero /* 13D9E8 8024A6A8 24C20007 */ addiu $v0, $a2, 0x7 .L8024A6AC: /* 13D9EC 8024A6AC 000210C3 */ sra $v0, $v0, 3 D_8024A6B0: /* 13D9F0 8024A6B0 000210C0 */ sll $v0, $v0, 3 /* 13D9F4 8024A6B4 00C21023 */ subu $v0, $a2, $v0 /* 13D9F8 8024A6B8 00021400 */ sll $v0, $v0, 16 /* 13D9FC 8024A6BC 00021403 */ sra $v0, $v0, 16 /* 13DA00 8024A6C0 ACA20008 */ sw $v0, 0x8($a1) /* 13DA04 8024A6C4 90A2000B */ lbu $v0, 0xB($a1) /* 13DA08 8024A6C8 24840001 */ addiu $a0, $a0, 0x1 .L8024A6CC: /* 13DA0C 8024A6CC 080929B6 */ j .L8024A6D8 /* 13DA10 8024A6D0 A0A20003 */ sb $v0, 0x3($a1) .L8024A6D4: /* 13DA14 8024A6D4 24840001 */ addiu $a0, $a0, 0x1 .L8024A6D8: /* 13DA18 8024A6D8 24A5000C */ addiu $a1, $a1, 0xC .L8024A6DC: /* 13DA1C 8024A6DC 28820014 */ slti $v0, $a0, 0x14 /* 13DA20 8024A6E0 5440FFFC */ bnel $v0, $zero, .L8024A6D4 /* 13DA24 8024A6E4 A0A00000 */ sb $zero, 0x0($a1) /* 13DA28 8024A6E8 0000202D */ daddu $a0, $zero, $zero /* 13DA2C 8024A6EC 0C09260A */ jal func_80249828 /* 13DA30 8024A6F0 0080282D */ daddu $a1, $a0, $zero /* 13DA34 8024A6F4 8FBF0014 */ lw $ra, 0x14($sp) /* 13DA38 8024A6F8 8FB00010 */ lw $s0, 0x10($sp) /* 13DA3C 8024A6FC 3C018027 */ lui $at, %hi(gPauseItemsCurrentScrollPos) /* 13DA40 8024A700 AC2205D4 */ sw $v0, %lo(gPauseItemsCurrentScrollPos)($at) /* 13DA44 8024A704 3C018027 */ lui $at, %hi(gPauseItemsTargetScrollPos) /* 13DA48 8024A708 AC2205D8 */ sw $v0, %lo(gPauseItemsTargetScrollPos)($at) /* 13DA4C 8024A70C 03E00008 */ jr $ra /* 13DA50 8024A710 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void pause_items_load_items(s32 invItems) { PlayerData* playerData = &gPlayerData; s32 i; s16* itemIDs; s32 pageNum; s16* itemMenuNumItems; s32 totalItems = 0; PauseItemPage* page; s32 items; s16* itemMenuItemIDs; D_802705D0 = 0; if (invItems == TRUE) { for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) { if (playerData->invItems[i] != 0) { gPauseItemsItemIDs[totalItems] = playerData->invItems[i]; totalItems++; } } } else { for (i = 0; i < ARRAY_COUNT(playerData->keyItems); i++) { if (playerData->keyItems[i] != 0) { gPauseItemsItemIDs[totalItems] = playerData->keyItems[i]; totalItems++; } } } if (totalItems == 0) { gPauseItemsItemIDs[0] = ITEM_NONE_STANDIN; totalItems = 1; } else { pause_sort_item_list(gPauseItemsItemIDs, totalItems, pause_items_comparator); } gPauseItemsNumItems = totalItems; for (i = totalItems; i < ARRAY_COUNT(gPauseItemsItemIDs); i++) { gPauseItemsItemIDs[i] = ITEM_INVALID; } page = gPauseItemsPages; gPauseItemsSelectedIndex = 0; gPauseItemsSelectedItem = 0; D_802705C4 = 0; gPauseItemsTargetScrollIndex = 0; gPauseItemsCurrentPage = 0; for (i = 0; i < gPauseItemsNumItems / 8; i++, page++) { page->listStart = i * 8; page->numCols = 1; page->numRows = 8; page->enabled = TRUE; page->startIndex = i * 8; page->count = 8; } if ((gPauseItemsNumItems % 8) != 0) { page->listStart = i * 8; page->numCols = 1; page->enabled = TRUE; page->startIndex = i * 8; page->count = gPauseItemsNumItems % 8; page->numRows = page->count; i++; page++; } for (; i < ARRAY_COUNT(gPauseItemsPages); i++, page++) { page->enabled = FALSE; } gPauseItemsTargetScrollPos = gPauseItemsCurrentScrollPos = pause_items_get_pos_y(0, 0); }
### RAW ASSEMBLY INSTRUCTIONS: glabel spiky_white_aura_appendGfx /* 34E468 E0038748 27BDFF30 */ addiu $sp, $sp, -0xD0 /* 34E46C E003874C AFB700B4 */ sw $s7, 0xB4($sp) /* 34E470 E0038750 0080B82D */ daddu $s7, $a0, $zero /* 34E474 E0038754 3C02DB06 */ lui $v0, (0xDB060024 >> 16) /* 34E478 E0038758 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 34E47C E003875C 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 34E480 E0038760 34420024 */ ori $v0, $v0, (0xDB060024 & 0xFFFF) /* 34E484 E0038764 AFBF00BC */ sw $ra, 0xBC($sp) /* 34E488 E0038768 AFBE00B8 */ sw $fp, 0xB8($sp) /* 34E48C E003876C AFB600B0 */ sw $s6, 0xB0($sp) /* 34E490 E0038770 AFB500AC */ sw $s5, 0xAC($sp) /* 34E494 E0038774 AFB400A8 */ sw $s4, 0xA8($sp) /* 34E498 E0038778 AFB300A4 */ sw $s3, 0xA4($sp) /* 34E49C E003877C AFB200A0 */ sw $s2, 0xA0($sp) /* 34E4A0 E0038780 AFB1009C */ sw $s1, 0x9C($sp) /* 34E4A4 E0038784 AFB00098 */ sw $s0, 0x98($sp) /* 34E4A8 E0038788 F7B600C8 */ sdc1 $f22, 0xC8($sp) /* 34E4AC E003878C F7B400C0 */ sdc1 $f20, 0xC0($sp) /* 34E4B0 E0038790 8CC40000 */ lw $a0, 0x0($a2) /* 34E4B4 E0038794 8EE7000C */ lw $a3, 0xC($s7) /* 34E4B8 E0038798 0080282D */ daddu $a1, $a0, $zero /* 34E4BC E003879C 24840008 */ addiu $a0, $a0, 0x8 /* 34E4C0 E00387A0 ACC40000 */ sw $a0, 0x0($a2) /* 34E4C4 E00387A4 ACA20000 */ sw $v0, 0x0($a1) /* 34E4C8 E00387A8 24820008 */ addiu $v0, $a0, 0x8 /* 34E4CC E00387AC ACC20000 */ sw $v0, 0x0($a2) /* 34E4D0 E00387B0 8EE30010 */ lw $v1, 0x10($s7) /* 34E4D4 E00387B4 24820010 */ addiu $v0, $a0, 0x10 /* 34E4D8 E00387B8 ACC20000 */ sw $v0, 0x0($a2) /* 34E4DC E00387BC 8C62001C */ lw $v0, 0x1C($v1) /* 34E4E0 E00387C0 3C038000 */ lui $v1, (0x80000000 >> 16) /* 34E4E4 E00387C4 00431021 */ addu $v0, $v0, $v1 /* 34E4E8 E00387C8 ACA20004 */ sw $v0, 0x4($a1) /* 34E4EC E00387CC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 34E4F0 E00387D0 AC820000 */ sw $v0, 0x0($a0) /* 34E4F4 E00387D4 3C020900 */ lui $v0, %hi(D_09000440_4154A0) /* 34E4F8 E00387D8 24420440 */ addiu $v0, $v0, %lo(D_09000440_4154A0) /* 34E4FC E00387DC AC820004 */ sw $v0, 0x4($a0) /* 34E500 E00387E0 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 34E504 E00387E4 AC820008 */ sw $v0, 0x8($a0) /* 34E508 E00387E8 90E20027 */ lbu $v0, 0x27($a3) /* 34E50C E00387EC 2403FF00 */ addiu $v1, $zero, -0x100 /* 34E510 E00387F0 00431025 */ or $v0, $v0, $v1 /* 34E514 E00387F4 AC82000C */ sw $v0, 0xC($a0) /* 34E518 E00387F8 8EE20008 */ lw $v0, 0x8($s7) /* 34E51C E00387FC 1840006B */ blez $v0, .LE00389AC /* 34E520 E0038800 0000902D */ daddu $s2, $zero, $zero /* 34E524 E0038804 27B10058 */ addiu $s1, $sp, 0x58 /* 34E528 E0038808 3C1E800B */ lui $fp, %hi(gCameras) /* 34E52C E003880C 27DE1D80 */ addiu $fp, $fp, %lo(gCameras) /* 34E530 E0038810 3C16800A */ lui $s6, %hi(gDisplayContext) /* 34E534 E0038814 26D6A674 */ addiu $s6, $s6, %lo(gDisplayContext) /* 34E538 E0038818 3C158007 */ lui $s5, %hi(gMatrixListPos) /* 34E53C E003881C 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos) /* 34E540 E0038820 3C140001 */ lui $s4, (0x11630 >> 16) /* 34E544 E0038824 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 34E548 E0038828 00C0982D */ daddu $s3, $a2, $zero /* 34E54C E003882C 24F00020 */ addiu $s0, $a3, 0x20 /* 34E550 E0038830 4480A000 */ mtc1 $zero, $f20 /* 34E554 E0038834 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 34E558 E0038838 4481B000 */ mtc1 $at, $f22 .LE003883C: /* 34E55C E003883C 27A40018 */ addiu $a0, $sp, 0x18 /* 34E560 E0038840 8E05FFE4 */ lw $a1, -0x1C($s0) /* 34E564 E0038844 8E06FFE8 */ lw $a2, -0x18($s0) /* 34E568 E0038848 8E07FFEC */ lw $a3, -0x14($s0) /* 34E56C E003884C 0C080108 */ jal shim_guTranslateF /* 34E570 E0038850 26520001 */ addiu $s2, $s2, 0x1 /* 34E574 E0038854 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 34E578 E0038858 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 34E57C E003885C 4406A000 */ mfc1 $a2, $f20 /* 34E580 E0038860 00031080 */ sll $v0, $v1, 2 /* 34E584 E0038864 00431021 */ addu $v0, $v0, $v1 /* 34E588 E0038868 00021080 */ sll $v0, $v0, 2 /* 34E58C E003886C 00431023 */ subu $v0, $v0, $v1 /* 34E590 E0038870 000218C0 */ sll $v1, $v0, 3 /* 34E594 E0038874 00431021 */ addu $v0, $v0, $v1 /* 34E598 E0038878 000210C0 */ sll $v0, $v0, 3 /* 34E59C E003887C 005E1021 */ addu $v0, $v0, $fp /* 34E5A0 E0038880 C440006C */ lwc1 $f0, 0x6C($v0) /* 34E5A4 E0038884 4407B000 */ mfc1 $a3, $f22 /* 34E5A8 E0038888 46000007 */ neg.s $f0, $f0 /* 34E5AC E003888C 44050000 */ mfc1 $a1, $f0 /* 34E5B0 E0038890 0220202D */ daddu $a0, $s1, $zero /* 34E5B4 E0038894 0C080104 */ jal shim_guRotateF /* 34E5B8 E0038898 E7B40010 */ swc1 $f20, 0x10($sp) /* 34E5BC E003889C 0220202D */ daddu $a0, $s1, $zero /* 34E5C0 E00388A0 27A50018 */ addiu $a1, $sp, 0x18 /* 34E5C4 E00388A4 0C080114 */ jal shim_guMtxCatF /* 34E5C8 E00388A8 00A0302D */ daddu $a2, $a1, $zero /* 34E5CC E00388AC E7B60010 */ swc1 $f22, 0x10($sp) /* 34E5D0 E00388B0 8E05FFFC */ lw $a1, -0x4($s0) /* 34E5D4 E00388B4 4406A000 */ mfc1 $a2, $f20 /* 34E5D8 E00388B8 4407A000 */ mfc1 $a3, $f20 /* 34E5DC E00388BC 0C080104 */ jal shim_guRotateF /* 34E5E0 E00388C0 0220202D */ daddu $a0, $s1, $zero /* 34E5E4 E00388C4 0220202D */ daddu $a0, $s1, $zero /* 34E5E8 E00388C8 27A50018 */ addiu $a1, $sp, 0x18 /* 34E5EC E00388CC 0C080114 */ jal shim_guMtxCatF /* 34E5F0 E00388D0 00A0302D */ daddu $a2, $a1, $zero /* 34E5F4 E00388D4 0220202D */ daddu $a0, $s1, $zero /* 34E5F8 E00388D8 8E050000 */ lw $a1, 0x0($s0) /* 34E5FC E00388DC 26100030 */ addiu $s0, $s0, 0x30 /* 34E600 E00388E0 4407B000 */ mfc1 $a3, $f22 /* 34E604 E00388E4 0C080110 */ jal shim_guScaleF /* 34E608 E00388E8 00A0302D */ daddu $a2, $a1, $zero /* 34E60C E00388EC 0220202D */ daddu $a0, $s1, $zero /* 34E610 E00388F0 27A50018 */ addiu $a1, $sp, 0x18 /* 34E614 E00388F4 0C080114 */ jal shim_guMtxCatF /* 34E618 E00388F8 00A0302D */ daddu $a2, $a1, $zero /* 34E61C E00388FC 27A40018 */ addiu $a0, $sp, 0x18 /* 34E620 E0038900 96A50000 */ lhu $a1, 0x0($s5) /* 34E624 E0038904 8EC20000 */ lw $v0, 0x0($s6) /* 34E628 E0038908 00052980 */ sll $a1, $a1, 6 /* 34E62C E003890C 00B42821 */ addu $a1, $a1, $s4 /* 34E630 E0038910 0C080118 */ jal shim_guMtxF2L /* 34E634 E0038914 00452821 */ addu $a1, $v0, $a1 /* 34E638 E0038918 3C05D838 */ lui $a1, (0xD8380002 >> 16) /* 34E63C E003891C 34A50002 */ ori $a1, $a1, (0xD8380002 & 0xFFFF) /* 34E640 E0038920 8E640000 */ lw $a0, 0x0($s3) /* 34E644 E0038924 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 34E648 E0038928 0080182D */ daddu $v1, $a0, $zero /* 34E64C E003892C 24840008 */ addiu $a0, $a0, 0x8 /* 34E650 E0038930 AE640000 */ sw $a0, 0x0($s3) /* 34E654 E0038934 AC620000 */ sw $v0, 0x0($v1) /* 34E658 E0038938 24820008 */ addiu $v0, $a0, 0x8 /* 34E65C E003893C AC600004 */ sw $zero, 0x4($v1) /* 34E660 E0038940 AE620000 */ sw $v0, 0x0($s3) /* 34E664 E0038944 96A20000 */ lhu $v0, 0x0($s5) /* 34E668 E0038948 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 34E66C E003894C AC830000 */ sw $v1, 0x0($a0) /* 34E670 E0038950 24430001 */ addiu $v1, $v0, 0x1 /* 34E674 E0038954 3042FFFF */ andi $v0, $v0, 0xFFFF /* 34E678 E0038958 00021180 */ sll $v0, $v0, 6 /* 34E67C E003895C A6A30000 */ sh $v1, 0x0($s5) /* 34E680 E0038960 8EC30000 */ lw $v1, 0x0($s6) /* 34E684 E0038964 00541021 */ addu $v0, $v0, $s4 /* 34E688 E0038968 00621821 */ addu $v1, $v1, $v0 /* 34E68C E003896C 24820010 */ addiu $v0, $a0, 0x10 /* 34E690 E0038970 AC830004 */ sw $v1, 0x4($a0) /* 34E694 E0038974 AE620000 */ sw $v0, 0x0($s3) /* 34E698 E0038978 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 34E69C E003897C AC820008 */ sw $v0, 0x8($a0) /* 34E6A0 E0038980 3C020900 */ lui $v0, %hi(D_090004E8_415548) /* 34E6A4 E0038984 244204E8 */ addiu $v0, $v0, %lo(D_090004E8_415548) /* 34E6A8 E0038988 AC82000C */ sw $v0, 0xC($a0) /* 34E6AC E003898C 24020040 */ addiu $v0, $zero, 0x40 /* 34E6B0 E0038990 AC850010 */ sw $a1, 0x10($a0) /* 34E6B4 E0038994 AC820014 */ sw $v0, 0x14($a0) /* 34E6B8 E0038998 8EE20008 */ lw $v0, 0x8($s7) /* 34E6BC E003899C 24840018 */ addiu $a0, $a0, 0x18 /* 34E6C0 E00389A0 0242102A */ slt $v0, $s2, $v0 /* 34E6C4 E00389A4 1440FFA5 */ bnez $v0, .LE003883C /* 34E6C8 E00389A8 AE640000 */ sw $a0, 0x0($s3) .LE00389AC: /* 34E6CC E00389AC 8FBF00BC */ lw $ra, 0xBC($sp) /* 34E6D0 E00389B0 8FBE00B8 */ lw $fp, 0xB8($sp) /* 34E6D4 E00389B4 8FB700B4 */ lw $s7, 0xB4($sp) /* 34E6D8 E00389B8 8FB600B0 */ lw $s6, 0xB0($sp) /* 34E6DC E00389BC 8FB500AC */ lw $s5, 0xAC($sp) /* 34E6E0 E00389C0 8FB400A8 */ lw $s4, 0xA8($sp) /* 34E6E4 E00389C4 8FB300A4 */ lw $s3, 0xA4($sp) /* 34E6E8 E00389C8 8FB200A0 */ lw $s2, 0xA0($sp) /* 34E6EC E00389CC 8FB1009C */ lw $s1, 0x9C($sp) /* 34E6F0 E00389D0 8FB00098 */ lw $s0, 0x98($sp) /* 34E6F4 E00389D4 D7B600C8 */ ldc1 $f22, 0xC8($sp) /* 34E6F8 E00389D8 D7B400C0 */ ldc1 $f20, 0xC0($sp) /* 34E6FC E00389DC 03E00008 */ jr $ra /* 34E700 E00389E0 27BD00D0 */ addiu $sp, $sp, 0xD0 /* 34E704 E00389E4 00000000 */ nop /* 34E708 E00389E8 00000000 */ nop /* 34E70C E00389EC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void spiky_white_aura_appendGfx(void* effect) { SpikyWhiteAuraFXData* part = ((EffectInstance*)effect)->data.spikyWhiteAura; Matrix4f sp18; Matrix4f sp58; s32 i; gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPDisplayList(gMainGfxPos++, D_09000440_34EBB0); gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, part->unk_24); for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, part++) { shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, part->unk_1C, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guScaleF(sp58, part->unk_20, part->unk_20, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gDPPipeSync(gMainGfxPos++); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090004E8_34EC58); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel PlayerDamageEnemy /* 1A2B40 80274260 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 1A2B44 80274264 AFB20018 */ sw $s2, 0x18($sp) /* 1A2B48 80274268 0080902D */ daddu $s2, $a0, $zero /* 1A2B4C 8027426C AFBF0020 */ sw $ra, 0x20($sp) /* 1A2B50 80274270 AFB3001C */ sw $s3, 0x1C($sp) /* 1A2B54 80274274 AFB10014 */ sw $s1, 0x14($sp) /* 1A2B58 80274278 AFB00010 */ sw $s0, 0x10($sp) /* 1A2B5C 8027427C 8E50000C */ lw $s0, 0xC($s2) /* 1A2B60 80274280 3C11800E */ lui $s1, %hi(gBattleStatus) /* 1A2B64 80274284 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) /* 1A2B68 80274288 8E130000 */ lw $s3, 0x0($s0) /* 1A2B6C 8027428C 26100004 */ addiu $s0, $s0, 0x4 /* 1A2B70 80274290 8E020000 */ lw $v0, 0x0($s0) /* 1A2B74 80274294 26100004 */ addiu $s0, $s0, 0x4 /* 1A2B78 80274298 AE220188 */ sw $v0, 0x188($s1) /* 1A2B7C 8027429C 8E020000 */ lw $v0, 0x0($s0) /* 1A2B80 802742A0 26100004 */ addiu $s0, $s0, 0x4 /* 1A2B84 802742A4 AE22018C */ sw $v0, 0x18C($s1) /* 1A2B88 802742A8 8E020000 */ lw $v0, 0x0($s0) /* 1A2B8C 802742AC 26100004 */ addiu $s0, $s0, 0x4 /* 1A2B90 802742B0 AE220190 */ sw $v0, 0x190($s1) /* 1A2B94 802742B4 8E050000 */ lw $a1, 0x0($s0) /* 1A2B98 802742B8 0C0B1EAF */ jal evt_get_variable /* 1A2B9C 802742BC 26100004 */ addiu $s0, $s0, 0x4 /* 1A2BA0 802742C0 A622017E */ sh $v0, 0x17E($s1) /* 1A2BA4 802742C4 A2200198 */ sb $zero, 0x198($s1) /* 1A2BA8 802742C8 8E100000 */ lw $s0, 0x0($s0) /* 1A2BAC 802742CC 24020030 */ addiu $v0, $zero, 0x30 /* 1A2BB0 802742D0 32030030 */ andi $v1, $s0, 0x30 /* 1A2BB4 802742D4 54620004 */ bnel $v1, $v0, .L802742E8 /* 1A2BB8 802742D8 32020010 */ andi $v0, $s0, 0x10 /* 1A2BBC 802742DC 8E220000 */ lw $v0, 0x0($s1) /* 1A2BC0 802742E0 0809D0CA */ j .L80274328 /* 1A2BC4 802742E4 34420030 */ ori $v0, $v0, 0x30 .L802742E8: /* 1A2BC8 802742E8 10400004 */ beqz $v0, .L802742FC /* 1A2BCC 802742EC 2403FFDF */ addiu $v1, $zero, -0x21 /* 1A2BD0 802742F0 8E220000 */ lw $v0, 0x0($s1) /* 1A2BD4 802742F4 0809D0C9 */ j .L80274324 /* 1A2BD8 802742F8 34420010 */ ori $v0, $v0, 0x10 .L802742FC: /* 1A2BDC 802742FC 32020020 */ andi $v0, $s0, 0x20 /* 1A2BE0 80274300 10400005 */ beqz $v0, .L80274318 /* 1A2BE4 80274304 2403FFEF */ addiu $v1, $zero, -0x11 /* 1A2BE8 80274308 8E220000 */ lw $v0, 0x0($s1) /* 1A2BEC 8027430C 00431024 */ and $v0, $v0, $v1 /* 1A2BF0 80274310 0809D0CA */ j .L80274328 /* 1A2BF4 80274314 34420020 */ ori $v0, $v0, 0x20 .L80274318: /* 1A2BF8 80274318 8E220000 */ lw $v0, 0x0($s1) /* 1A2BFC 8027431C 00431024 */ and $v0, $v0, $v1 /* 1A2C00 80274320 2403FFDF */ addiu $v1, $zero, -0x21 .L80274324: /* 1A2C04 80274324 00431024 */ and $v0, $v0, $v1 .L80274328: /* 1A2C08 80274328 AE220000 */ sw $v0, 0x0($s1) /* 1A2C0C 8027432C 32020040 */ andi $v0, $s0, 0x40 /* 1A2C10 80274330 10400007 */ beqz $v0, .L80274350 /* 1A2C14 80274334 2404FFBF */ addiu $a0, $zero, -0x41 /* 1A2C18 80274338 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1A2C1C 8027433C 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1A2C20 80274340 8C620000 */ lw $v0, 0x0($v1) /* 1A2C24 80274344 34420040 */ ori $v0, $v0, 0x40 /* 1A2C28 80274348 0809D0D9 */ j .L80274364 /* 1A2C2C 8027434C AC620000 */ sw $v0, 0x0($v1) .L80274350: /* 1A2C30 80274350 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1A2C34 80274354 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1A2C38 80274358 8C430000 */ lw $v1, 0x0($v0) /* 1A2C3C 8027435C 00641824 */ and $v1, $v1, $a0 /* 1A2C40 80274360 AC430000 */ sw $v1, 0x0($v0) .L80274364: /* 1A2C44 80274364 32020200 */ andi $v0, $s0, 0x200 /* 1A2C48 80274368 10400007 */ beqz $v0, .L80274388 /* 1A2C4C 8027436C 2404FDFF */ addiu $a0, $zero, -0x201 /* 1A2C50 80274370 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1A2C54 80274374 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1A2C58 80274378 8C620000 */ lw $v0, 0x0($v1) /* 1A2C5C 8027437C 34420200 */ ori $v0, $v0, 0x200 /* 1A2C60 80274380 0809D0E7 */ j .L8027439C /* 1A2C64 80274384 AC620000 */ sw $v0, 0x0($v1) .L80274388: /* 1A2C68 80274388 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1A2C6C 8027438C 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1A2C70 80274390 8C430000 */ lw $v1, 0x0($v0) /* 1A2C74 80274394 00641824 */ and $v1, $v1, $a0 /* 1A2C78 80274398 AC430000 */ sw $v1, 0x0($v0) .L8027439C: /* 1A2C7C 8027439C 32020080 */ andi $v0, $s0, 0x80 /* 1A2C80 802743A0 10400007 */ beqz $v0, .L802743C0 /* 1A2C84 802743A4 2404FF7F */ addiu $a0, $zero, -0x81 /* 1A2C88 802743A8 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1A2C8C 802743AC 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1A2C90 802743B0 8C620000 */ lw $v0, 0x0($v1) /* 1A2C94 802743B4 34420080 */ ori $v0, $v0, 0x80 /* 1A2C98 802743B8 0809D0F5 */ j .L802743D4 /* 1A2C9C 802743BC AC620000 */ sw $v0, 0x0($v1) .L802743C0: /* 1A2CA0 802743C0 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1A2CA4 802743C4 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1A2CA8 802743C8 8C430000 */ lw $v1, 0x0($v0) /* 1A2CAC 802743CC 00641824 */ and $v1, $v1, $a0 /* 1A2CB0 802743D0 AC430000 */ sw $v1, 0x0($v0) .L802743D4: /* 1A2CB4 802743D4 32020800 */ andi $v0, $s0, 0x800 /* 1A2CB8 802743D8 10400007 */ beqz $v0, .L802743F8 /* 1A2CBC 802743DC 2404F7FF */ addiu $a0, $zero, -0x801 /* 1A2CC0 802743E0 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1A2CC4 802743E4 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1A2CC8 802743E8 8C620000 */ lw $v0, 0x0($v1) /* 1A2CCC 802743EC 34420800 */ ori $v0, $v0, 0x800 /* 1A2CD0 802743F0 0809D103 */ j .L8027440C /* 1A2CD4 802743F4 AC620000 */ sw $v0, 0x0($v1) .L802743F8: /* 1A2CD8 802743F8 3C02800E */ lui $v0, %hi(gBattleStatus) /* 1A2CDC 802743FC 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 1A2CE0 80274400 8C430000 */ lw $v1, 0x0($v0) /* 1A2CE4 80274404 00641824 */ and $v1, $v1, $a0 /* 1A2CE8 80274408 AC430000 */ sw $v1, 0x0($v0) .L8027440C: /* 1A2CEC 8027440C 0C09A75B */ jal get_actor /* 1A2CF0 80274410 8E440148 */ lw $a0, 0x148($s2) /* 1A2CF4 80274414 94430428 */ lhu $v1, 0x428($v0) /* 1A2CF8 80274418 A62301A0 */ sh $v1, 0x1A0($s1) /* 1A2CFC 8027441C 92230193 */ lbu $v1, 0x193($s1) /* 1A2D00 80274420 90420426 */ lbu $v0, 0x426($v0) /* 1A2D04 80274424 A2230194 */ sb $v1, 0x194($s1) /* 1A2D08 80274428 306300FF */ andi $v1, $v1, 0xFF /* 1A2D0C 8027442C A22201A2 */ sb $v0, 0x1A2($s1) /* 1A2D10 80274430 240200FF */ addiu $v0, $zero, 0xFF /* 1A2D14 80274434 50620001 */ beql $v1, $v0, .L8027443C /* 1A2D18 80274438 A2200194 */ sb $zero, 0x194($s1) .L8027443C: /* 1A2D1C 8027443C 8E220190 */ lw $v0, 0x190($s1) /* 1A2D20 80274440 30420F00 */ andi $v0, $v0, 0xF00 /* 1A2D24 80274444 00021203 */ sra $v0, $v0, 8 /* 1A2D28 80274448 0C09C651 */ jal calc_player_damage_enemy /* 1A2D2C 8027444C A2220195 */ sb $v0, 0x195($s1) /* 1A2D30 80274450 0440000B */ bltz $v0, .L80274480 /* 1A2D34 80274454 0240202D */ daddu $a0, $s2, $zero /* 1A2D38 80274458 0260282D */ daddu $a1, $s3, $zero /* 1A2D3C 8027445C 0C0B2026 */ jal evt_set_variable /* 1A2D40 80274460 0040302D */ daddu $a2, $v0, $zero /* 1A2D44 80274464 0C0B1069 */ jal does_script_exist_by_ref /* 1A2D48 80274468 0240202D */ daddu $a0, $s2, $zero /* 1A2D4C 8027446C 0040182D */ daddu $v1, $v0, $zero /* 1A2D50 80274470 10600004 */ beqz $v1, .L80274484 /* 1A2D54 80274474 240200FF */ addiu $v0, $zero, 0xFF /* 1A2D58 80274478 0809D121 */ j .L80274484 /* 1A2D5C 8027447C 24020002 */ addiu $v0, $zero, 0x2 .L80274480: /* 1A2D60 80274480 240200FF */ addiu $v0, $zero, 0xFF .L80274484: /* 1A2D64 80274484 8FBF0020 */ lw $ra, 0x20($sp) /* 1A2D68 80274488 8FB3001C */ lw $s3, 0x1C($sp) /* 1A2D6C 8027448C 8FB20018 */ lw $s2, 0x18($sp) /* 1A2D70 80274490 8FB10014 */ lw $s1, 0x14($sp) /* 1A2D74 80274494 8FB00010 */ lw $s0, 0x10($sp) /* 1A2D78 80274498 03E00008 */ jr $ra /* 1A2D7C 8027449C 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; s32 hitResultOutVar = *args++; s32 flags; Actor* target; HitResult hitResult; battleStatus->currentAttackElement = *args++; battleStatus->currentAttackEventSuppression = *args++; battleStatus->currentAttackStatus = *args++; battleStatus->currentAttackDamage = evt_get_variable(script, *args++); battleStatus->powerBounceCounter = 0; flags = *args++; if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) { gBattleStatus.flags1 |= BS_FLAGS1_10; gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_10) { gBattleStatus.flags1 |= BS_FLAGS1_10; gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) { gBattleStatus.flags1 &= ~BS_FLAGS1_10; gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_10; gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } if (flags & BS_FLAGS1_40) { gBattleStatus.flags1 |= BS_FLAGS1_40; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_40; } if (flags & BS_FLAGS1_200) { gBattleStatus.flags1 |= BS_FLAGS1_200; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_200; } if (flags & BS_FLAGS1_80) { gBattleStatus.flags1 |= BS_FLAGS1_80; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_80; } if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) { gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE; } target = get_actor(script->owner1.actorID); battleStatus->currentTargetID = target->targetActorID; battleStatus->currentTargetPart = target->targetPartIndex; battleStatus->statusChance = battleStatus->currentAttackStatus; if (battleStatus->statusChance == STATUS_KEY_NEVER) { battleStatus->statusChance = 0; } battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8; hitResult = calc_player_damage_enemy(); if (hitResult < 0) { return ApiStatus_FINISH; } evt_set_variable(script, hitResultOutVar, hitResult); if (!does_script_exist_by_ref(script)) { return ApiStatus_FINISH; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel PlayerFallToGoal /* 1A2174 80273894 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 1A2178 80273898 AFB00018 */ sw $s0, 0x18($sp) /* 1A217C 8027389C 3C10800E */ lui $s0, %hi(gBattleStatus + 0xD8) /* 1A2180 802738A0 8E10C148 */ lw $s0, %lo(gBattleStatus + 0xD8)($s0) /* 1A2184 802738A4 AFB20020 */ sw $s2, 0x20($sp) /* 1A2188 802738A8 0080902D */ daddu $s2, $a0, $zero /* 1A218C 802738AC AFBF0024 */ sw $ra, 0x24($sp) /* 1A2190 802738B0 AFB1001C */ sw $s1, 0x1C($sp) /* 1A2194 802738B4 F7BE0050 */ sdc1 $f30, 0x50($sp) /* 1A2198 802738B8 F7BC0048 */ sdc1 $f28, 0x48($sp) /* 1A219C 802738BC F7BA0040 */ sdc1 $f26, 0x40($sp) /* 1A21A0 802738C0 F7B80038 */ sdc1 $f24, 0x38($sp) /* 1A21A4 802738C4 F7B60030 */ sdc1 $f22, 0x30($sp) /* 1A21A8 802738C8 F7B40028 */ sdc1 $f20, 0x28($sp) /* 1A21AC 802738CC 8E43000C */ lw $v1, 0xC($s2) /* 1A21B0 802738D0 10A00002 */ beqz $a1, .L802738DC /* 1A21B4 802738D4 2611000C */ addiu $s1, $s0, 0xC /* 1A21B8 802738D8 AE400070 */ sw $zero, 0x70($s2) .L802738DC: /* 1A21BC 802738DC 8E420070 */ lw $v0, 0x70($s2) /* 1A21C0 802738E0 14400046 */ bnez $v0, .L802739FC /* 1A21C4 802738E4 00000000 */ nop /* 1A21C8 802738E8 8C650000 */ lw $a1, 0x0($v1) /* 1A21CC 802738EC 0C0B1EAF */ jal evt_get_variable /* 1A21D0 802738F0 0240202D */ daddu $a0, $s2, $zero /* 1A21D4 802738F4 C6000148 */ lwc1 $f0, 0x148($s0) /* 1A21D8 802738F8 C61A0018 */ lwc1 $f26, 0x18($s0) /* 1A21DC 802738FC C61C0020 */ lwc1 $f28, 0x20($s0) /* 1A21E0 80273900 C614014C */ lwc1 $f20, 0x14C($s0) /* 1A21E4 80273904 C618001C */ lwc1 $f24, 0x1C($s0) /* 1A21E8 80273908 A6020070 */ sh $v0, 0x70($s0) /* 1A21EC 8027390C E6000010 */ swc1 $f0, 0x10($s0) /* 1A21F0 80273910 46000786 */ mov.s $f30, $f0 /* 1A21F4 80273914 4406D000 */ mfc1 $a2, $f26 /* 1A21F8 80273918 4407E000 */ mfc1 $a3, $f28 /* 1A21FC 8027391C C6000144 */ lwc1 $f0, 0x144($s0) /* 1A2200 80273920 4600A386 */ mov.s $f14, $f20 /* 1A2204 80273924 E6140014 */ swc1 $f20, 0x14($s0) /* 1A2208 80273928 E600000C */ swc1 $f0, 0xC($s0) /* 1A220C 8027392C 46000586 */ mov.s $f22, $f0 /* 1A2210 80273930 0C00A720 */ jal atan2 /* 1A2214 80273934 4600B306 */ mov.s $f12, $f22 /* 1A2218 80273938 4600B306 */ mov.s $f12, $f22 /* 1A221C 8027393C 4600A386 */ mov.s $f14, $f20 /* 1A2220 80273940 4406D000 */ mfc1 $a2, $f26 /* 1A2224 80273944 4407E000 */ mfc1 $a3, $f28 /* 1A2228 80273948 461EC781 */ sub.s $f30, $f24, $f30 /* 1A222C 8027394C 0C00A7B5 */ jal dist2D /* 1A2230 80273950 E6000054 */ swc1 $f0, 0x54($s0) /* 1A2234 80273954 86020070 */ lh $v0, 0x70($s0) /* 1A2238 80273958 46000086 */ mov.s $f2, $f0 /* 1A223C 8027395C 14400007 */ bnez $v0, .L8027397C /* 1A2240 80273960 E6020058 */ swc1 $f2, 0x58($s0) /* 1A2244 80273964 C600004C */ lwc1 $f0, 0x4C($s0) /* 1A2248 80273968 46001003 */ div.s $f0, $f2, $f0 /* 1A224C 8027396C 4600018D */ trunc.w.s $f6, $f0 /* 1A2250 80273970 44023000 */ mfc1 $v0, $f6 /* 1A2254 80273974 0809CE64 */ j .L80273990 /* 1A2258 80273978 A6020070 */ sh $v0, 0x70($s0) .L8027397C: /* 1A225C 8027397C 44820000 */ mtc1 $v0, $f0 /* 1A2260 80273980 00000000 */ nop /* 1A2264 80273984 46800020 */ cvt.s.w $f0, $f0 /* 1A2268 80273988 46001003 */ div.s $f0, $f2, $f0 /* 1A226C 8027398C E600004C */ swc1 $f0, 0x4C($s0) .L80273990: /* 1A2270 80273990 86230064 */ lh $v1, 0x64($s1) /* 1A2274 80273994 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 1A2278 80273998 44810800 */ mtc1 $at, $f1 /* 1A227C 8027399C 44800000 */ mtc1 $zero, $f0 /* 1A2280 802739A0 00031023 */ negu $v0, $v1 /* 1A2284 802739A4 44821000 */ mtc1 $v0, $f2 /* 1A2288 802739A8 00000000 */ nop /* 1A228C 802739AC 468010A1 */ cvt.d.w $f2, $f2 /* 1A2290 802739B0 46201082 */ mul.d $f2, $f2, $f0 /* 1A2294 802739B4 00000000 */ nop /* 1A2298 802739B8 0000202D */ daddu $a0, $zero, $zero /* 1A229C 802739BC AE200044 */ sw $zero, 0x44($s1) /* 1A22A0 802739C0 C6240044 */ lwc1 $f4, 0x44($s1) /* 1A22A4 802739C4 44830000 */ mtc1 $v1, $f0 /* 1A22A8 802739C8 00000000 */ nop /* 1A22AC 802739CC 46800020 */ cvt.s.w $f0, $f0 /* 1A22B0 802739D0 4600F003 */ div.s $f0, $f30, $f0 /* 1A22B4 802739D4 46040001 */ sub.s $f0, $f0, $f4 /* 1A22B8 802739D8 0080282D */ daddu $a1, $a0, $zero /* 1A22BC 802739DC 8E260058 */ lw $a2, 0x58($s1) /* 1A22C0 802739E0 46000021 */ cvt.d.s $f0, $f0 /* 1A22C4 802739E4 46220003 */ div.d $f0, $f0, $f2 /* 1A22C8 802739E8 46200020 */ cvt.s.d $f0, $f0 /* 1A22CC 802739EC 0C098F3F */ jal set_animation /* 1A22D0 802739F0 E620003C */ swc1 $f0, 0x3C($s1) /* 1A22D4 802739F4 24020001 */ addiu $v0, $zero, 0x1 /* 1A22D8 802739F8 AE420070 */ sw $v0, 0x70($s2) .L802739FC: /* 1A22DC 802739FC C6220044 */ lwc1 $f2, 0x44($s1) /* 1A22E0 80273A00 44800000 */ mtc1 $zero, $f0 /* 1A22E4 80273A04 00000000 */ nop /* 1A22E8 80273A08 4600103C */ c.lt.s $f2, $f0 /* 1A22EC 80273A0C 00000000 */ nop /* 1A22F0 80273A10 45000004 */ bc1f .L80273A24 /* 1A22F4 80273A14 0000202D */ daddu $a0, $zero, $zero /* 1A22F8 80273A18 8E26005C */ lw $a2, 0x5C($s1) /* 1A22FC 80273A1C 0C098F3F */ jal set_animation /* 1A2300 80273A20 0080282D */ daddu $a1, $a0, $zero .L80273A24: /* 1A2304 80273A24 C6240004 */ lwc1 $f4, 0x4($s1) /* 1A2308 80273A28 C6200044 */ lwc1 $f0, 0x44($s1) /* 1A230C 80273A2C 8E250040 */ lw $a1, 0x40($s1) /* 1A2310 80273A30 46002100 */ add.s $f4, $f4, $f0 /* 1A2314 80273A34 C622003C */ lwc1 $f2, 0x3C($s1) /* 1A2318 80273A38 8E260048 */ lw $a2, 0x48($s1) /* 1A231C 80273A3C 46020001 */ sub.s $f0, $f0, $f2 /* 1A2320 80273A40 0220202D */ daddu $a0, $s1, $zero /* 1A2324 80273A44 E6240004 */ swc1 $f4, 0x4($s1) /* 1A2328 80273A48 0C09904A */ jal add_xz_vec3f /* 1A232C 80273A4C E6200044 */ swc1 $f0, 0x44($s1) /* 1A2330 80273A50 C6200000 */ lwc1 $f0, 0x0($s1) /* 1A2334 80273A54 E6000144 */ swc1 $f0, 0x144($s0) /* 1A2338 80273A58 C6200004 */ lwc1 $f0, 0x4($s1) /* 1A233C 80273A5C E6000148 */ swc1 $f0, 0x148($s0) /* 1A2340 80273A60 C6200008 */ lwc1 $f0, 0x8($s1) /* 1A2344 80273A64 E600014C */ swc1 $f0, 0x14C($s0) /* 1A2348 80273A68 96220064 */ lhu $v0, 0x64($s1) /* 1A234C 80273A6C 2442FFFF */ addiu $v0, $v0, -0x1 /* 1A2350 80273A70 A6220064 */ sh $v0, 0x64($s1) /* 1A2354 80273A74 00021400 */ sll $v0, $v0, 16 /* 1A2358 80273A78 04410016 */ bgez $v0, .L80273AD4 /* 1A235C 80273A7C 0000102D */ daddu $v0, $zero, $zero /* 1A2360 80273A80 C620000C */ lwc1 $f0, 0xC($s1) /* 1A2364 80273A84 C602018C */ lwc1 $f2, 0x18C($s0) /* 1A2368 80273A88 E6000144 */ swc1 $f0, 0x144($s0) /* 1A236C 80273A8C C6200010 */ lwc1 $f0, 0x10($s1) /* 1A2370 80273A90 E6000148 */ swc1 $f0, 0x148($s0) /* 1A2374 80273A94 C6200014 */ lwc1 $f0, 0x14($s1) /* 1A2378 80273A98 E600014C */ swc1 $f0, 0x14C($s0) /* 1A237C 80273A9C E7A20010 */ swc1 $f2, 0x10($sp) /* 1A2380 80273AA0 8E050144 */ lw $a1, 0x144($s0) /* 1A2384 80273AA4 8E060148 */ lw $a2, 0x148($s0) /* 1A2388 80273AA8 8E07014C */ lw $a3, 0x14C($s0) /* 1A238C 80273AAC 0C0990BC */ jal play_movement_dust_effects /* 1A2390 80273AB0 24040002 */ addiu $a0, $zero, 0x2 /* 1A2394 80273AB4 C600014C */ lwc1 $f0, 0x14C($s0) /* 1A2398 80273AB8 24040148 */ addiu $a0, $zero, 0x148 /* 1A239C 80273ABC E7A00010 */ swc1 $f0, 0x10($sp) /* 1A23A0 80273AC0 8E060144 */ lw $a2, 0x144($s0) /* 1A23A4 80273AC4 8E070148 */ lw $a3, 0x148($s0) /* 1A23A8 80273AC8 0C052757 */ jal sfx_play_sound_at_position /* 1A23AC 80273ACC 0000282D */ daddu $a1, $zero, $zero /* 1A23B0 80273AD0 24020001 */ addiu $v0, $zero, 0x1 .L80273AD4: /* 1A23B4 80273AD4 8FBF0024 */ lw $ra, 0x24($sp) /* 1A23B8 80273AD8 8FB20020 */ lw $s2, 0x20($sp) /* 1A23BC 80273ADC 8FB1001C */ lw $s1, 0x1C($sp) /* 1A23C0 80273AE0 8FB00018 */ lw $s0, 0x18($sp) /* 1A23C4 80273AE4 D7BE0050 */ ldc1 $f30, 0x50($sp) /* 1A23C8 80273AE8 D7BC0048 */ ldc1 $f28, 0x48($sp) /* 1A23CC 80273AEC D7BA0040 */ ldc1 $f26, 0x40($sp) /* 1A23D0 80273AF0 D7B80038 */ ldc1 $f24, 0x38($sp) /* 1A23D4 80273AF4 D7B60030 */ ldc1 $f22, 0x30($sp) /* 1A23D8 80273AF8 D7B40028 */ ldc1 $f20, 0x28($sp) /* 1A23DC 80273AFC 03E00008 */ jr $ra /* 1A23E0 80273B00 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: ApiStatus PlayerFallToGoal(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* player = gBattleStatus.playerActor; ActorState* state = &player->state; f32 x, y, z; f32 goalX, goalY, goalZ; if (isInitialCall) { script->functionTemp[0] = FALSE; } if (!script->functionTemp[0]) { s32 moveTime = evt_get_variable(script, *args++); player->state.currentPos.x = player->currentPos.x; player->state.currentPos.y = player->currentPos.y; player->state.currentPos.z = player->currentPos.z; x = player->state.currentPos.x; y = player->state.currentPos.y; z = player->state.currentPos.z; goalX = player->state.goalPos.x; goalY = player->state.goalPos.y; goalZ = player->state.goalPos.z; state->moveTime = moveTime; player->state.angle = atan2(x, z, goalX, goalZ); player->state.distance = dist2D(x, z, goalX, goalZ); y = goalY - y; if (state->moveTime == 0) { state->moveTime = state->distance / state->speed; } else { state->speed = state->distance / state->moveTime; } state->velocity = 0.0f; state->acceleration = ((y / state->moveTime) - state->velocity) / (-state->moveTime * 0.5); set_animation(ACTOR_PLAYER, 0, state->animJumpRise); script->functionTemp[0] = TRUE; } if (state->velocity < 0.0f) { set_animation(ACTOR_PLAYER, 0, state->animJumpFall); } state->currentPos.y += state->velocity; state->velocity -= state->acceleration; add_xz_vec3f(&state->currentPos, state->speed, state->angle); player->currentPos.x = state->currentPos.x; player->currentPos.y = state->currentPos.y; player->currentPos.z = state->currentPos.z; state->moveTime--; if (state->moveTime < 0) { player->currentPos.x = state->goalPos.x; player->currentPos.y = state->goalPos.y; player->currentPos.z = state->goalPos.z; play_movement_dust_effects(2, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw); sfx_play_sound_at_position(SOUND_SOFT_LAND, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z); return ApiStatus_DONE1; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel _npc_jump_to /* F2DE4 802CE434 27BDFFC0 */ addiu $sp, $sp, -0x40 /* F2DE8 802CE438 AFB20018 */ sw $s2, 0x18($sp) /* F2DEC 802CE43C 0080902D */ daddu $s2, $a0, $zero /* F2DF0 802CE440 AFB40020 */ sw $s4, 0x20($sp) /* F2DF4 802CE444 00C0A02D */ daddu $s4, $a2, $zero /* F2DF8 802CE448 AFB3001C */ sw $s3, 0x1C($sp) /* F2DFC 802CE44C AFBF0024 */ sw $ra, 0x24($sp) /* F2E00 802CE450 AFB10014 */ sw $s1, 0x14($sp) /* F2E04 802CE454 AFB00010 */ sw $s0, 0x10($sp) /* F2E08 802CE458 F7B80038 */ sdc1 $f24, 0x38($sp) /* F2E0C 802CE45C F7B60030 */ sdc1 $f22, 0x30($sp) /* F2E10 802CE460 F7B40028 */ sdc1 $f20, 0x28($sp) /* F2E14 802CE464 8E51000C */ lw $s1, 0xC($s2) /* F2E18 802CE468 10A00002 */ beqz $a1, .L802CE474 /* F2E1C 802CE46C 26530078 */ addiu $s3, $s2, 0x78 /* F2E20 802CE470 AE400070 */ sw $zero, 0x70($s2) .L802CE474: /* F2E24 802CE474 8E420070 */ lw $v0, 0x70($s2) /* F2E28 802CE478 14400065 */ bnez $v0, .L802CE610 /* F2E2C 802CE47C 00000000 */ nop /* F2E30 802CE480 8E250000 */ lw $a1, 0x0($s1) /* F2E34 802CE484 26310004 */ addiu $s1, $s1, 0x4 /* F2E38 802CE488 0C0B1EAF */ jal evt_get_variable /* F2E3C 802CE48C 0240202D */ daddu $a0, $s2, $zero /* F2E40 802CE490 8E250000 */ lw $a1, 0x0($s1) /* F2E44 802CE494 26310004 */ addiu $s1, $s1, 0x4 /* F2E48 802CE498 0240202D */ daddu $a0, $s2, $zero /* F2E4C 802CE49C 0C0B1EAF */ jal evt_get_variable /* F2E50 802CE4A0 0040802D */ daddu $s0, $v0, $zero /* F2E54 802CE4A4 8E250000 */ lw $a1, 0x0($s1) /* F2E58 802CE4A8 26310004 */ addiu $s1, $s1, 0x4 /* F2E5C 802CE4AC 4482C000 */ mtc1 $v0, $f24 /* F2E60 802CE4B0 00000000 */ nop /* F2E64 802CE4B4 4680C620 */ cvt.s.w $f24, $f24 /* F2E68 802CE4B8 0C0B1EAF */ jal evt_get_variable /* F2E6C 802CE4BC 0240202D */ daddu $a0, $s2, $zero /* F2E70 802CE4C0 4482B000 */ mtc1 $v0, $f22 /* F2E74 802CE4C4 00000000 */ nop /* F2E78 802CE4C8 4680B5A0 */ cvt.s.w $f22, $f22 /* F2E7C 802CE4CC 8E250000 */ lw $a1, 0x0($s1) /* F2E80 802CE4D0 26310004 */ addiu $s1, $s1, 0x4 /* F2E84 802CE4D4 0C0B1EAF */ jal evt_get_variable /* F2E88 802CE4D8 0240202D */ daddu $a0, $s2, $zero /* F2E8C 802CE4DC 8E250000 */ lw $a1, 0x0($s1) /* F2E90 802CE4E0 4482A000 */ mtc1 $v0, $f20 /* F2E94 802CE4E4 00000000 */ nop /* F2E98 802CE4E8 4680A520 */ cvt.s.w $f20, $f20 /* F2E9C 802CE4EC 0C0B1EAF */ jal evt_get_variable /* F2EA0 802CE4F0 0240202D */ daddu $a0, $s2, $zero /* F2EA4 802CE4F4 0240202D */ daddu $a0, $s2, $zero /* F2EA8 802CE4F8 0200282D */ daddu $a1, $s0, $zero /* F2EAC 802CE4FC 0C0B36B0 */ jal resolve_npc /* F2EB0 802CE500 0040882D */ daddu $s1, $v0, $zero /* F2EB4 802CE504 0040802D */ daddu $s0, $v0, $zero /* F2EB8 802CE508 56000003 */ bnel $s0, $zero, .L802CE518 /* F2EBC 802CE50C AE500074 */ sw $s0, 0x74($s2) /* F2EC0 802CE510 080B39A6 */ j .L802CE698 /* F2EC4 802CE514 24020002 */ addiu $v0, $zero, 0x2 .L802CE518: /* F2EC8 802CE518 C60C0038 */ lwc1 $f12, 0x38($s0) /* F2ECC 802CE51C C60E0040 */ lwc1 $f14, 0x40($s0) /* F2ED0 802CE520 E6180060 */ swc1 $f24, 0x60($s0) /* F2ED4 802CE524 4406C000 */ mfc1 $a2, $f24 /* F2ED8 802CE528 E6140068 */ swc1 $f20, 0x68($s0) /* F2EDC 802CE52C 4407A000 */ mfc1 $a3, $f20 /* F2EE0 802CE530 E6160064 */ swc1 $f22, 0x64($s0) /* F2EE4 802CE534 0C00A7B5 */ jal dist2D /* F2EE8 802CE538 A611008E */ sh $s1, 0x8E($s0) /* F2EEC 802CE53C 46000506 */ mov.s $f20, $f0 /* F2EF0 802CE540 3C014000 */ lui $at, (0x40000000 >> 16) /* F2EF4 802CE544 44811800 */ mtc1 $at, $f3 /* F2EF8 802CE548 44801000 */ mtc1 $zero, $f2 /* F2EFC 802CE54C 4600A021 */ cvt.d.s $f0, $f20 /* F2F00 802CE550 4620103C */ c.lt.d $f2, $f0 /* F2F04 802CE554 00000000 */ nop /* F2F08 802CE558 45000009 */ bc1f .L802CE580 /* F2F0C 802CE55C AE400078 */ sw $zero, 0x78($s2) /* F2F10 802CE560 C60C0038 */ lwc1 $f12, 0x38($s0) /* F2F14 802CE564 C60E0040 */ lwc1 $f14, 0x40($s0) /* F2F18 802CE568 8E060060 */ lw $a2, 0x60($s0) /* F2F1C 802CE56C 0C00A720 */ jal atan2 /* F2F20 802CE570 8E070068 */ lw $a3, 0x68($s0) /* F2F24 802CE574 16800002 */ bnez $s4, .L802CE580 /* F2F28 802CE578 E6400078 */ swc1 $f0, 0x78($s2) /* F2F2C 802CE57C E600000C */ swc1 $f0, 0xC($s0) .L802CE580: /* F2F30 802CE580 C6020064 */ lwc1 $f2, 0x64($s0) /* F2F34 802CE584 C600003C */ lwc1 $f0, 0x3C($s0) /* F2F38 802CE588 8602008E */ lh $v0, 0x8E($s0) /* F2F3C 802CE58C 14400007 */ bnez $v0, .L802CE5AC /* F2F40 802CE590 46001581 */ sub.s $f22, $f2, $f0 /* F2F44 802CE594 C6000018 */ lwc1 $f0, 0x18($s0) /* F2F48 802CE598 4600A003 */ div.s $f0, $f20, $f0 /* F2F4C 802CE59C 4600018D */ trunc.w.s $f6, $f0 /* F2F50 802CE5A0 44023000 */ mfc1 $v0, $f6 /* F2F54 802CE5A4 080B3970 */ j .L802CE5C0 /* F2F58 802CE5A8 A602008E */ sh $v0, 0x8E($s0) .L802CE5AC: /* F2F5C 802CE5AC 44820000 */ mtc1 $v0, $f0 /* F2F60 802CE5B0 00000000 */ nop /* F2F64 802CE5B4 46800020 */ cvt.s.w $f0, $f0 /* F2F68 802CE5B8 4600A003 */ div.s $f0, $f20, $f0 /* F2F6C 802CE5BC E6000018 */ swc1 $f0, 0x18($s0) .L802CE5C0: /* F2F70 802CE5C0 8602008E */ lh $v0, 0x8E($s0) /* F2F74 802CE5C4 C6000014 */ lwc1 $f0, 0x14($s0) /* F2F78 802CE5C8 44822000 */ mtc1 $v0, $f4 /* F2F7C 802CE5CC 00000000 */ nop /* F2F80 802CE5D0 46802120 */ cvt.s.w $f4, $f4 /* F2F84 802CE5D4 46040002 */ mul.s $f0, $f0, $f4 /* F2F88 802CE5D8 00000000 */ nop /* F2F8C 802CE5DC 3C013F00 */ lui $at, (0x3F000000 >> 16) /* F2F90 802CE5E0 44811000 */ mtc1 $at, $f2 /* F2F94 802CE5E4 00000000 */ nop /* F2F98 802CE5E8 46020002 */ mul.s $f0, $f0, $f2 /* F2F9C 802CE5EC 00000000 */ nop /* F2FA0 802CE5F0 8E020000 */ lw $v0, 0x0($s0) /* F2FA4 802CE5F4 4604B103 */ div.s $f4, $f22, $f4 /* F2FA8 802CE5F8 34420800 */ ori $v0, $v0, 0x800 /* F2FAC 802CE5FC 46040000 */ add.s $f0, $f0, $f4 /* F2FB0 802CE600 AE020000 */ sw $v0, 0x0($s0) /* F2FB4 802CE604 24020001 */ addiu $v0, $zero, 0x1 /* F2FB8 802CE608 E600001C */ swc1 $f0, 0x1C($s0) /* F2FBC 802CE60C AE420070 */ sw $v0, 0x70($s2) .L802CE610: /* F2FC0 802CE610 8E500074 */ lw $s0, 0x74($s2) /* F2FC4 802CE614 8E660000 */ lw $a2, 0x0($s3) /* F2FC8 802CE618 8E050018 */ lw $a1, 0x18($s0) /* F2FCC 802CE61C 0C00EA95 */ jal npc_move_heading /* F2FD0 802CE620 0200202D */ daddu $a0, $s0, $zero /* F2FD4 802CE624 C604003C */ lwc1 $f4, 0x3C($s0) /* F2FD8 802CE628 C600001C */ lwc1 $f0, 0x1C($s0) /* F2FDC 802CE62C 9602008E */ lhu $v0, 0x8E($s0) /* F2FE0 802CE630 46002100 */ add.s $f4, $f4, $f0 /* F2FE4 802CE634 C6020014 */ lwc1 $f2, 0x14($s0) /* F2FE8 802CE638 2442FFFF */ addiu $v0, $v0, -0x1 /* F2FEC 802CE63C 46020001 */ sub.s $f0, $f0, $f2 /* F2FF0 802CE640 A602008E */ sh $v0, 0x8E($s0) /* F2FF4 802CE644 00021400 */ sll $v0, $v0, 16 /* F2FF8 802CE648 E604003C */ swc1 $f4, 0x3C($s0) /* F2FFC 802CE64C 04400003 */ bltz $v0, .L802CE65C /* F3000 802CE650 E600001C */ swc1 $f0, 0x1C($s0) /* F3004 802CE654 080B39A6 */ j .L802CE698 /* F3008 802CE658 0000102D */ daddu $v0, $zero, $zero .L802CE65C: /* F300C 802CE65C 0200202D */ daddu $a0, $s0, $zero /* F3010 802CE660 24050002 */ addiu $a1, $zero, 0x2 /* F3014 802CE664 C4800060 */ lwc1 $f0, 0x60($a0) /* F3018 802CE668 C4820064 */ lwc1 $f2, 0x64($a0) /* F301C 802CE66C C4840068 */ lwc1 $f4, 0x68($a0) /* F3020 802CE670 8C820000 */ lw $v0, 0x0($a0) /* F3024 802CE674 2403F7FF */ addiu $v1, $zero, -0x801 /* F3028 802CE678 AC80001C */ sw $zero, 0x1C($a0) /* F302C 802CE67C 00431024 */ and $v0, $v0, $v1 /* F3030 802CE680 E4800038 */ swc1 $f0, 0x38($a0) /* F3034 802CE684 E482003C */ swc1 $f2, 0x3C($a0) /* F3038 802CE688 E4840040 */ swc1 $f4, 0x40($a0) /* F303C 802CE68C 0C00F598 */ jal spawn_surface_effects /* F3040 802CE690 AC820000 */ sw $v0, 0x0($a0) /* F3044 802CE694 24020001 */ addiu $v0, $zero, 0x1 .L802CE698: /* F3048 802CE698 8FBF0024 */ lw $ra, 0x24($sp) /* F304C 802CE69C 8FB40020 */ lw $s4, 0x20($sp) /* F3050 802CE6A0 8FB3001C */ lw $s3, 0x1C($sp) /* F3054 802CE6A4 8FB20018 */ lw $s2, 0x18($sp) /* F3058 802CE6A8 8FB10014 */ lw $s1, 0x14($sp) /* F305C 802CE6AC 8FB00010 */ lw $s0, 0x10($sp) /* F3060 802CE6B0 D7B80038 */ ldc1 $f24, 0x38($sp) /* F3064 802CE6B4 D7B60030 */ ldc1 $f22, 0x30($sp) /* F3068 802CE6B8 D7B40028 */ ldc1 $f20, 0x28($sp) /* F306C 802CE6BC 03E00008 */ jr $ra /* F3070 802CE6C0 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) { Bytecode* args = script->ptrReadPos; f32* yaw = &script->functionTempF[2]; Npc* npc; if (isInitialCall) { script->functionTemp[0] = 0; } if (script->functionTemp[0] == 0) { s32 npcID = evt_get_variable(script, *args++); f32 goalX = evt_get_variable(script, *args++); f32 goalY = evt_get_variable(script, *args++); f32 goalZ = evt_get_variable(script, *args++); s32 duration = evt_get_variable(script, *args++); f32 dist; npc = resolve_npc(script, npcID); if (npc == NULL) { return ApiStatus_DONE2; } script->functionTempPtr[1] = npc; npc->moveToPos.x = goalX; npc->moveToPos.y = goalY; npc->moveToPos.z = goalZ; npc->duration = duration; dist = dist2D(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); *yaw = 0.0f; if (dist > 2.0) { *yaw = atan2(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); if (snapYaw == 0) { npc->yaw = *yaw; } } goalY = npc->moveToPos.y - npc->pos.y; if (npc->duration == 0) { npc->duration = dist / npc->moveSpeed; } else { npc->moveSpeed = dist / npc->duration; } npc->flags |= NPC_FLAG_JUMPING; npc->jumpVelocity = (npc->jumpScale * npc->duration * 0.5f) + (goalY / npc->duration); script->functionTemp[0] =1; } npc = script->functionTempPtr[1]; npc_move_heading(npc, npc->moveSpeed, *yaw); npc->pos.y += npc->jumpVelocity; npc->jumpVelocity -= npc->jumpScale; npc->duration--; if (npc->duration < 0) { npc->jumpVelocity = 0.0f; npc->pos.x = npc->moveToPos.x; npc->pos.y = npc->moveToPos.y; npc->pos.z = npc->moveToPos.z; npc->flags &= ~NPC_FLAG_JUMPING; spawn_surface_effects(npc, SURFACE_INTERACT_LAND); return ApiStatus_DONE1; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel cloud_puff_appendGfx /* 32E970 E00144E0 27BDFF30 */ addiu $sp, $sp, -0xD0 /* 32E974 E00144E4 AFB600B8 */ sw $s6, 0xB8($sp) /* 32E978 E00144E8 0080B02D */ daddu $s6, $a0, $zero /* 32E97C E00144EC 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 32E980 E00144F0 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 32E984 E00144F4 AFB200A8 */ sw $s2, 0xA8($sp) /* 32E988 E00144F8 0000902D */ daddu $s2, $zero, $zero /* 32E98C E00144FC 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 32E990 E0014500 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 32E994 E0014504 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 32E998 E0014508 AFBF00C4 */ sw $ra, 0xC4($sp) /* 32E99C E001450C AFBE00C0 */ sw $fp, 0xC0($sp) /* 32E9A0 E0014510 AFB700BC */ sw $s7, 0xBC($sp) /* 32E9A4 E0014514 AFB500B4 */ sw $s5, 0xB4($sp) /* 32E9A8 E0014518 AFB400B0 */ sw $s4, 0xB0($sp) /* 32E9AC E001451C AFB300AC */ sw $s3, 0xAC($sp) /* 32E9B0 E0014520 AFB100A4 */ sw $s1, 0xA4($sp) /* 32E9B4 E0014524 AFB000A0 */ sw $s0, 0xA0($sp) /* 32E9B8 E0014528 F7B400C8 */ sdc1 $f20, 0xC8($sp) /* 32E9BC E001452C 8CC30000 */ lw $v1, 0x0($a2) /* 32E9C0 E0014530 8ED1000C */ lw $s1, 0xC($s6) /* 32E9C4 E0014534 0060202D */ daddu $a0, $v1, $zero /* 32E9C8 E0014538 24630008 */ addiu $v1, $v1, 0x8 /* 32E9CC E001453C ACC30000 */ sw $v1, 0x0($a2) /* 32E9D0 E0014540 AC820000 */ sw $v0, 0x0($a0) /* 32E9D4 E0014544 AC800004 */ sw $zero, 0x4($a0) /* 32E9D8 E0014548 AC650000 */ sw $a1, 0x0($v1) /* 32E9DC E001454C 8EC40010 */ lw $a0, 0x10($s6) /* 32E9E0 E0014550 24620008 */ addiu $v0, $v1, 0x8 /* 32E9E4 E0014554 ACC20000 */ sw $v0, 0x0($a2) /* 32E9E8 E0014558 8C84001C */ lw $a0, 0x1C($a0) /* 32E9EC E001455C 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 32E9F0 E0014560 AC620008 */ sw $v0, 0x8($v1) /* 32E9F4 E0014564 3C020900 */ lui $v0, %hi(D_090000E0_415140) /* 32E9F8 E0014568 244200E0 */ addiu $v0, $v0, %lo(D_090000E0_415140) /* 32E9FC E001456C AC62000C */ sw $v0, 0xC($v1) /* 32EA00 E0014570 3C028000 */ lui $v0, (0x80000000 >> 16) /* 32EA04 E0014574 00822021 */ addu $a0, $a0, $v0 /* 32EA08 E0014578 AC640004 */ sw $a0, 0x4($v1) /* 32EA0C E001457C 8EC20008 */ lw $v0, 0x8($s6) /* 32EA10 E0014580 24630010 */ addiu $v1, $v1, 0x10 /* 32EA14 E0014584 18400066 */ blez $v0, .LE0014720 /* 32EA18 E0014588 ACC30000 */ sw $v1, 0x0($a2) /* 32EA1C E001458C 4480A000 */ mtc1 $zero, $f20 /* 32EA20 E0014590 27B50060 */ addiu $s5, $sp, 0x60 /* 32EA24 E0014594 3C1E800A */ lui $fp, %hi(gDisplayContext) /* 32EA28 E0014598 27DEA674 */ addiu $fp, $fp, %lo(gDisplayContext) /* 32EA2C E001459C 3C178007 */ lui $s7, %hi(gMatrixListPos) /* 32EA30 E00145A0 26F741F0 */ addiu $s7, $s7, %lo(gMatrixListPos) /* 32EA34 E00145A4 3C140001 */ lui $s4, (0x11630 >> 16) /* 32EA38 E00145A8 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 32EA3C E00145AC 00C0982D */ daddu $s3, $a2, $zero /* 32EA40 E00145B0 26300008 */ addiu $s0, $s1, 0x8 .LE00145B4: /* 32EA44 E00145B4 8E220000 */ lw $v0, 0x0($s1) /* 32EA48 E00145B8 50400054 */ beql $v0, $zero, .LE001470C /* 32EA4C E00145BC 26520001 */ addiu $s2, $s2, 0x1 /* 32EA50 E00145C0 3C09800B */ lui $t1, %hi(gCameras) /* 32EA54 E00145C4 25291D80 */ addiu $t1, $t1, %lo(gCameras) /* 32EA58 E00145C8 4405A000 */ mfc1 $a1, $f20 /* 32EA5C E00145CC 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 32EA60 E00145D0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 32EA64 E00145D4 4407A000 */ mfc1 $a3, $f20 /* 32EA68 E00145D8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 32EA6C E00145DC 44810000 */ mtc1 $at, $f0 /* 32EA70 E00145E0 00031080 */ sll $v0, $v1, 2 /* 32EA74 E00145E4 00431021 */ addu $v0, $v0, $v1 /* 32EA78 E00145E8 00021080 */ sll $v0, $v0, 2 /* 32EA7C E00145EC 00431023 */ subu $v0, $v0, $v1 /* 32EA80 E00145F0 000218C0 */ sll $v1, $v0, 3 /* 32EA84 E00145F4 00431021 */ addu $v0, $v0, $v1 /* 32EA88 E00145F8 000210C0 */ sll $v0, $v0, 3 /* 32EA8C E00145FC 00491021 */ addu $v0, $v0, $t1 /* 32EA90 E0014600 C442006C */ lwc1 $f2, 0x6C($v0) /* 32EA94 E0014604 E7A00010 */ swc1 $f0, 0x10($sp) /* 32EA98 E0014608 C6000004 */ lwc1 $f0, 0x4($s0) /* 32EA9C E001460C 46001087 */ neg.s $f2, $f2 /* 32EAA0 E0014610 E7A00014 */ swc1 $f0, 0x14($sp) /* 32EAA4 E0014614 C6000008 */ lwc1 $f0, 0x8($s0) /* 32EAA8 E0014618 44061000 */ mfc1 $a2, $f2 /* 32EAAC E001461C E7A00018 */ swc1 $f0, 0x18($sp) /* 32EAB0 E0014620 C600000C */ lwc1 $f0, 0xC($s0) /* 32EAB4 E0014624 27A40020 */ addiu $a0, $sp, 0x20 /* 32EAB8 E0014628 0C080180 */ jal shim_guPositionF /* 32EABC E001462C E7A0001C */ swc1 $f0, 0x1C($sp) /* 32EAC0 E0014630 8E050010 */ lw $a1, 0x10($s0) /* 32EAC4 E0014634 8E060014 */ lw $a2, 0x14($s0) /* 32EAC8 E0014638 8E070018 */ lw $a3, 0x18($s0) /* 32EACC E001463C 0C080110 */ jal shim_guScaleF /* 32EAD0 E0014640 02A0202D */ daddu $a0, $s5, $zero /* 32EAD4 E0014644 02A0202D */ daddu $a0, $s5, $zero /* 32EAD8 E0014648 27A50020 */ addiu $a1, $sp, 0x20 /* 32EADC E001464C 0C080114 */ jal shim_guMtxCatF /* 32EAE0 E0014650 00A0302D */ daddu $a2, $a1, $zero /* 32EAE4 E0014654 27A40020 */ addiu $a0, $sp, 0x20 /* 32EAE8 E0014658 96E50000 */ lhu $a1, 0x0($s7) /* 32EAEC E001465C 8FC20000 */ lw $v0, 0x0($fp) /* 32EAF0 E0014660 00052980 */ sll $a1, $a1, 6 /* 32EAF4 E0014664 00B42821 */ addu $a1, $a1, $s4 /* 32EAF8 E0014668 0C080118 */ jal shim_guMtxF2L /* 32EAFC E001466C 00452821 */ addu $a1, $v0, $a1 /* 32EB00 E0014670 3C077060 */ lui $a3, (0x70601800 >> 16) /* 32EB04 E0014674 34E71800 */ ori $a3, $a3, (0x70601800 & 0xFFFF) /* 32EB08 E0014678 3C08D838 */ lui $t0, (0xD8380002 >> 16) /* 32EB0C E001467C 35080002 */ ori $t0, $t0, (0xD8380002 & 0xFFFF) /* 32EB10 E0014680 8E640000 */ lw $a0, 0x0($s3) /* 32EB14 E0014684 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 32EB18 E0014688 0080302D */ daddu $a2, $a0, $zero /* 32EB1C E001468C 24840008 */ addiu $a0, $a0, 0x8 /* 32EB20 E0014690 AE640000 */ sw $a0, 0x0($s3) /* 32EB24 E0014694 ACC20000 */ sw $v0, 0x0($a2) /* 32EB28 E0014698 92050000 */ lbu $a1, 0x0($s0) /* 32EB2C E001469C 96E30000 */ lhu $v1, 0x0($s7) /* 32EB30 E00146A0 24820008 */ addiu $v0, $a0, 0x8 /* 32EB34 E00146A4 AE620000 */ sw $v0, 0x0($s3) /* 32EB38 E00146A8 24620001 */ addiu $v0, $v1, 0x1 /* 32EB3C E00146AC A6E20000 */ sh $v0, 0x0($s7) /* 32EB40 E00146B0 24820010 */ addiu $v0, $a0, 0x10 /* 32EB44 E00146B4 AE620000 */ sw $v0, 0x0($s3) /* 32EB48 E00146B8 24820018 */ addiu $v0, $a0, 0x18 /* 32EB4C E00146BC 00A72825 */ or $a1, $a1, $a3 /* 32EB50 E00146C0 AE620000 */ sw $v0, 0x0($s3) /* 32EB54 E00146C4 3C02DA38 */ lui $v0, (0xDA380000 >> 16) /* 32EB58 E00146C8 3063FFFF */ andi $v1, $v1, 0xFFFF /* 32EB5C E00146CC 00031980 */ sll $v1, $v1, 6 /* 32EB60 E00146D0 ACC50004 */ sw $a1, 0x4($a2) /* 32EB64 E00146D4 AC820000 */ sw $v0, 0x0($a0) /* 32EB68 E00146D8 8FC20000 */ lw $v0, 0x0($fp) /* 32EB6C E00146DC 00741821 */ addu $v1, $v1, $s4 /* 32EB70 E00146E0 AC880010 */ sw $t0, 0x10($a0) /* 32EB74 E00146E4 00431021 */ addu $v0, $v0, $v1 /* 32EB78 E00146E8 AC820004 */ sw $v0, 0x4($a0) /* 32EB7C E00146EC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 32EB80 E00146F0 AC820008 */ sw $v0, 0x8($a0) /* 32EB84 E00146F4 3C020900 */ lui $v0, %hi(D_090001B8_415218) /* 32EB88 E00146F8 244201B8 */ addiu $v0, $v0, %lo(D_090001B8_415218) /* 32EB8C E00146FC AC82000C */ sw $v0, 0xC($a0) /* 32EB90 E0014700 24020040 */ addiu $v0, $zero, 0x40 /* 32EB94 E0014704 AC820014 */ sw $v0, 0x14($a0) /* 32EB98 E0014708 26520001 */ addiu $s2, $s2, 0x1 .LE001470C: /* 32EB9C E001470C 2610004C */ addiu $s0, $s0, 0x4C /* 32EBA0 E0014710 8EC20008 */ lw $v0, 0x8($s6) /* 32EBA4 E0014714 0242102A */ slt $v0, $s2, $v0 /* 32EBA8 E0014718 1440FFA6 */ bnez $v0, .LE00145B4 /* 32EBAC E001471C 2631004C */ addiu $s1, $s1, 0x4C .LE0014720: /* 32EBB0 E0014720 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 32EBB4 E0014724 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 32EBB8 E0014728 8C620000 */ lw $v0, 0x0($v1) /* 32EBBC E001472C 0040202D */ daddu $a0, $v0, $zero /* 32EBC0 E0014730 24420008 */ addiu $v0, $v0, 0x8 /* 32EBC4 E0014734 AC620000 */ sw $v0, 0x0($v1) /* 32EBC8 E0014738 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 32EBCC E001473C AC820000 */ sw $v0, 0x0($a0) /* 32EBD0 E0014740 AC800004 */ sw $zero, 0x4($a0) /* 32EBD4 E0014744 8FBF00C4 */ lw $ra, 0xC4($sp) /* 32EBD8 E0014748 8FBE00C0 */ lw $fp, 0xC0($sp) /* 32EBDC E001474C 8FB700BC */ lw $s7, 0xBC($sp) /* 32EBE0 E0014750 8FB600B8 */ lw $s6, 0xB8($sp) /* 32EBE4 E0014754 8FB500B4 */ lw $s5, 0xB4($sp) /* 32EBE8 E0014758 8FB400B0 */ lw $s4, 0xB0($sp) /* 32EBEC E001475C 8FB300AC */ lw $s3, 0xAC($sp) /* 32EBF0 E0014760 8FB200A8 */ lw $s2, 0xA8($sp) /* 32EBF4 E0014764 8FB100A4 */ lw $s1, 0xA4($sp) /* 32EBF8 E0014768 8FB000A0 */ lw $s0, 0xA0($sp) /* 32EBFC E001476C D7B400C8 */ ldc1 $f20, 0xC8($sp) /* 32EC00 E0014770 03E00008 */ jr $ra /* 32EC04 E0014774 27BD00D0 */ addiu $sp, $sp, 0xD0 /* 32EC08 E0014778 00000000 */ nop /* 32EC0C E001477C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void cloud_puff_appendGfx(void* effect) { EffectInstance* effectTemp = effect; CloudPuffFXData* part = effectTemp->data.cloudPuff; Matrix4f sp20; Matrix4f sp60; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data)); gSPDisplayList(gMainGfxPos++, D_090000E0_32ED30); for (i = 0; i < effectTemp->numParts; i++, part++) { if (part->alive) { shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, part->unk_0C, part->unk_10, part->unk_14); shim_guScaleF(sp60, part->unk_18, part->unk_1C, part->unk_20); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gDPSetPrimColor(gMainGfxPos++, 0, 0, 112, 96, 24, part->alpha); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_090001B8_32EE08); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel spiky_white_aura_update /* 34E144 E0038424 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 34E148 E0038428 AFB40020 */ sw $s4, 0x20($sp) /* 34E14C E003842C 0080A02D */ daddu $s4, $a0, $zero /* 34E150 E0038430 AFBF0028 */ sw $ra, 0x28($sp) /* 34E154 E0038434 AFB50024 */ sw $s5, 0x24($sp) /* 34E158 E0038438 AFB3001C */ sw $s3, 0x1C($sp) /* 34E15C E003843C AFB20018 */ sw $s2, 0x18($sp) /* 34E160 E0038440 AFB10014 */ sw $s1, 0x14($sp) /* 34E164 E0038444 AFB00010 */ sw $s0, 0x10($sp) /* 34E168 E0038448 F7BC0050 */ sdc1 $f28, 0x50($sp) /* 34E16C E003844C F7BA0048 */ sdc1 $f26, 0x48($sp) /* 34E170 E0038450 F7B80040 */ sdc1 $f24, 0x40($sp) /* 34E174 E0038454 F7B60038 */ sdc1 $f22, 0x38($sp) /* 34E178 E0038458 F7B40030 */ sdc1 $f20, 0x30($sp) /* 34E17C E003845C 8E83000C */ lw $v1, 0xC($s4) /* 34E180 E0038460 8C620028 */ lw $v0, 0x28($v1) /* 34E184 E0038464 2442FFFF */ addiu $v0, $v0, -0x1 /* 34E188 E0038468 AC620028 */ sw $v0, 0x28($v1) /* 34E18C E003846C 8C62002C */ lw $v0, 0x2C($v1) /* 34E190 E0038470 8C640028 */ lw $a0, 0x28($v1) /* 34E194 E0038474 24450001 */ addiu $a1, $v0, 0x1 /* 34E198 E0038478 04810005 */ bgez $a0, .LE0038490 /* 34E19C E003847C AC65002C */ sw $a1, 0x2C($v1) /* 34E1A0 E0038480 0C080128 */ jal shim_remove_effect /* 34E1A4 E0038484 0280202D */ daddu $a0, $s4, $zero /* 34E1A8 E0038488 0800E1B3 */ j .LE00386CC /* 34E1AC E003848C 00000000 */ nop .LE0038490: /* 34E1B0 E0038490 0000882D */ daddu $s1, $zero, $zero /* 34E1B4 E0038494 0080982D */ daddu $s3, $a0, $zero /* 34E1B8 E0038498 8E820008 */ lw $v0, 0x8($s4) /* 34E1BC E003849C 1840008B */ blez $v0, .LE00386CC /* 34E1C0 E00384A0 00A0902D */ daddu $s2, $a1, $zero /* 34E1C4 E00384A4 241500FF */ addiu $s5, $zero, 0xFF /* 34E1C8 E00384A8 2470000C */ addiu $s0, $v1, 0xC /* 34E1CC E00384AC 3C01E004 */ lui $at, (0xE0040000 >> 16) /* 34E1D0 E00384B0 D4388A28 */ ldc1 $f24, -0x75D8($at) /* 34E1D4 E00384B4 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 34E1D8 E00384B8 4481D000 */ mtc1 $at, $f26 /* 34E1DC E00384BC 3C014040 */ lui $at, (0x40400000 >> 16) /* 34E1E0 E00384C0 4481E000 */ mtc1 $at, $f28 /* 34E1E4 E00384C4 3C01E004 */ lui $at, (0xE0040000 >> 16) /* 34E1E8 E00384C8 D4368A30 */ ldc1 $f22, -0x75D0($at) .LE00384CC: /* 34E1EC E00384CC 2A620006 */ slti $v0, $s3, 0x6 /* 34E1F0 E00384D0 14400037 */ bnez $v0, .LE00385B0 /* 34E1F4 E00384D4 2A620005 */ slti $v0, $s3, 0x5 /* 34E1F8 E00384D8 C6020004 */ lwc1 $f2, 0x4($s0) /* 34E1FC E00384DC 460010A1 */ cvt.d.s $f2, $f2 /* 34E200 E00384E0 46381082 */ mul.d $f2, $f2, $f24 /* 34E204 E00384E4 00000000 */ nop /* 34E208 E00384E8 C6000008 */ lwc1 $f0, 0x8($s0) /* 34E20C E00384EC 46000021 */ cvt.d.s $f0, $f0 /* 34E210 E00384F0 46380002 */ mul.d $f0, $f0, $f24 /* 34E214 E00384F4 00000000 */ nop /* 34E218 E00384F8 C604000C */ lwc1 $f4, 0xC($s0) /* 34E21C E00384FC 46002121 */ cvt.d.s $f4, $f4 /* 34E220 E0038500 46382102 */ mul.d $f4, $f4, $f24 /* 34E224 E0038504 00000000 */ nop /* 34E228 E0038508 8E030018 */ lw $v1, 0x18($s0) /* 34E22C E003850C 3C01E004 */ lui $at, (0xE0040000 >> 16) /* 34E230 E0038510 D4268A38 */ ldc1 $f6, -0x75C8($at) /* 34E234 E0038514 02A31023 */ subu $v0, $s5, $v1 /* 34E238 E0038518 44824000 */ mtc1 $v0, $f8 /* 34E23C E003851C 00000000 */ nop /* 34E240 E0038520 46804221 */ cvt.d.w $f8, $f8 /* 34E244 E0038524 46264202 */ mul.d $f8, $f8, $f6 /* 34E248 E0038528 00000000 */ nop /* 34E24C E003852C 462010A0 */ cvt.s.d $f2, $f2 /* 34E250 E0038530 46200020 */ cvt.s.d $f0, $f0 /* 34E254 E0038534 E6000008 */ swc1 $f0, 0x8($s0) /* 34E258 E0038538 44830000 */ mtc1 $v1, $f0 /* 34E25C E003853C 00000000 */ nop /* 34E260 E0038540 46800021 */ cvt.d.w $f0, $f0 /* 34E264 E0038544 46202120 */ cvt.s.d $f4, $f4 /* 34E268 E0038548 46280000 */ add.d $f0, $f0, $f8 /* 34E26C E003854C E6020004 */ swc1 $f2, 0x4($s0) /* 34E270 E0038550 E604000C */ swc1 $f4, 0xC($s0) /* 34E274 E0038554 4620028D */ trunc.w.d $f10, $f0 /* 34E278 E0038558 44035000 */ mfc1 $v1, $f10 /* 34E27C E003855C 00000000 */ nop /* 34E280 E0038560 000317C2 */ srl $v0, $v1, 31 /* 34E284 E0038564 00621021 */ addu $v0, $v1, $v0 /* 34E288 E0038568 00021043 */ sra $v0, $v0, 1 /* 34E28C E003856C 44826000 */ mtc1 $v0, $f12 /* 34E290 E0038570 00000000 */ nop /* 34E294 E0038574 46806320 */ cvt.s.w $f12, $f12 /* 34E298 E0038578 0C080140 */ jal shim_sin_deg /* 34E29C E003857C AE030018 */ sw $v1, 0x18($s0) /* 34E2A0 E0038580 44926000 */ mtc1 $s2, $f12 /* 34E2A4 E0038584 00000000 */ nop /* 34E2A8 E0038588 46806320 */ cvt.s.w $f12, $f12 /* 34E2AC E003858C 461A6302 */ mul.s $f12, $f12, $f26 /* 34E2B0 E0038590 00000000 */ nop /* 34E2B4 E0038594 0C080140 */ jal shim_sin_deg /* 34E2B8 E0038598 46000506 */ mov.s $f20, $f0 /* 34E2BC E003859C 461CA502 */ mul.s $f20, $f20, $f28 /* 34E2C0 E00385A0 00000000 */ nop /* 34E2C4 E00385A4 4600A500 */ add.s $f20, $f20, $f0 /* 34E2C8 E00385A8 E6140014 */ swc1 $f20, 0x14($s0) /* 34E2CC E00385AC 2A620005 */ slti $v0, $s3, 0x5 .LE00385B0: /* 34E2D0 E00385B0 10400035 */ beqz $v0, .LE0038688 /* 34E2D4 E00385B4 00000000 */ nop /* 34E2D8 E00385B8 3C01E004 */ lui $at, (0xE0040000 >> 16) /* 34E2DC E00385BC D4208A40 */ ldc1 $f0, -0x75C0($at) /* 34E2E0 E00385C0 C6060018 */ lwc1 $f6, 0x18($s0) /* 34E2E4 E00385C4 468031A1 */ cvt.d.w $f6, $f6 /* 34E2E8 E00385C8 46203182 */ mul.d $f6, $f6, $f0 /* 34E2EC E00385CC 00000000 */ nop /* 34E2F0 E00385D0 C6040004 */ lwc1 $f4, 0x4($s0) /* 34E2F4 E00385D4 46002121 */ cvt.d.s $f4, $f4 /* 34E2F8 E00385D8 46362102 */ mul.d $f4, $f4, $f22 /* 34E2FC E00385DC 00000000 */ nop /* 34E300 E00385E0 C602000C */ lwc1 $f2, 0xC($s0) /* 34E304 E00385E4 460010A1 */ cvt.d.s $f2, $f2 /* 34E308 E00385E8 46361082 */ mul.d $f2, $f2, $f22 /* 34E30C E00385EC 00000000 */ nop /* 34E310 E00385F0 C6000008 */ lwc1 $f0, 0x8($s0) /* 34E314 E00385F4 46000021 */ cvt.d.s $f0, $f0 /* 34E318 E00385F8 46360002 */ mul.d $f0, $f0, $f22 /* 34E31C E00385FC 00000000 */ nop /* 34E320 E0038600 4620328D */ trunc.w.d $f10, $f6 /* 34E324 E0038604 E60A0018 */ swc1 $f10, 0x18($s0) /* 34E328 E0038608 46202120 */ cvt.s.d $f4, $f4 /* 34E32C E003860C 8E030018 */ lw $v1, 0x18($s0) /* 34E330 E0038610 462010A0 */ cvt.s.d $f2, $f2 /* 34E334 E0038614 E6040004 */ swc1 $f4, 0x4($s0) /* 34E338 E0038618 E602000C */ swc1 $f2, 0xC($s0) /* 34E33C E003861C 46200020 */ cvt.s.d $f0, $f0 /* 34E340 E0038620 000317C2 */ srl $v0, $v1, 31 /* 34E344 E0038624 00621821 */ addu $v1, $v1, $v0 /* 34E348 E0038628 00031843 */ sra $v1, $v1, 1 /* 34E34C E003862C 44836000 */ mtc1 $v1, $f12 /* 34E350 E0038630 00000000 */ nop /* 34E354 E0038634 46806320 */ cvt.s.w $f12, $f12 /* 34E358 E0038638 0C080140 */ jal shim_sin_deg /* 34E35C E003863C E6000008 */ swc1 $f0, 0x8($s0) /* 34E360 E0038640 44926000 */ mtc1 $s2, $f12 /* 34E364 E0038644 00000000 */ nop /* 34E368 E0038648 46806320 */ cvt.s.w $f12, $f12 /* 34E36C E003864C 461A6302 */ mul.s $f12, $f12, $f26 /* 34E370 E0038650 00000000 */ nop /* 34E374 E0038654 0C080140 */ jal shim_sin_deg /* 34E378 E0038658 46000506 */ mov.s $f20, $f0 /* 34E37C E003865C 461CA502 */ mul.s $f20, $f20, $f28 /* 34E380 E0038660 00000000 */ nop /* 34E384 E0038664 8E020018 */ lw $v0, 0x18($s0) /* 34E388 E0038668 02A21023 */ subu $v0, $s5, $v0 /* 34E38C E003866C 4600A500 */ add.s $f20, $f20, $f0 /* 34E390 E0038670 44820000 */ mtc1 $v0, $f0 /* 34E394 E0038674 00000000 */ nop /* 34E398 E0038678 46800020 */ cvt.s.w $f0, $f0 /* 34E39C E003867C 461A0003 */ div.s $f0, $f0, $f26 /* 34E3A0 E0038680 4600A500 */ add.s $f20, $f20, $f0 /* 34E3A4 E0038684 E6140014 */ swc1 $f20, 0x14($s0) .LE0038688: /* 34E3A8 E0038688 C606FFF8 */ lwc1 $f6, -0x8($s0) /* 34E3AC E003868C C6000004 */ lwc1 $f0, 0x4($s0) /* 34E3B0 E0038690 C604FFFC */ lwc1 $f4, -0x4($s0) /* 34E3B4 E0038694 46003180 */ add.s $f6, $f6, $f0 /* 34E3B8 E0038698 C6000008 */ lwc1 $f0, 0x8($s0) /* 34E3BC E003869C C602000C */ lwc1 $f2, 0xC($s0) /* 34E3C0 E00386A0 46002100 */ add.s $f4, $f4, $f0 /* 34E3C4 E00386A4 C6000000 */ lwc1 $f0, 0x0($s0) /* 34E3C8 E00386A8 26310001 */ addiu $s1, $s1, 0x1 /* 34E3CC E00386AC 46020000 */ add.s $f0, $f0, $f2 /* 34E3D0 E00386B0 E606FFF8 */ swc1 $f6, -0x8($s0) /* 34E3D4 E00386B4 E604FFFC */ swc1 $f4, -0x4($s0) /* 34E3D8 E00386B8 E6000000 */ swc1 $f0, 0x0($s0) /* 34E3DC E00386BC 8E820008 */ lw $v0, 0x8($s4) /* 34E3E0 E00386C0 0222102A */ slt $v0, $s1, $v0 /* 34E3E4 E00386C4 1440FF81 */ bnez $v0, .LE00384CC /* 34E3E8 E00386C8 26100030 */ addiu $s0, $s0, 0x30 .LE00386CC: /* 34E3EC E00386CC 8FBF0028 */ lw $ra, 0x28($sp) /* 34E3F0 E00386D0 8FB50024 */ lw $s5, 0x24($sp) /* 34E3F4 E00386D4 8FB40020 */ lw $s4, 0x20($sp) /* 34E3F8 E00386D8 8FB3001C */ lw $s3, 0x1C($sp) /* 34E3FC E00386DC 8FB20018 */ lw $s2, 0x18($sp) /* 34E400 E00386E0 8FB10014 */ lw $s1, 0x14($sp) /* 34E404 E00386E4 8FB00010 */ lw $s0, 0x10($sp) /* 34E408 E00386E8 D7BC0050 */ ldc1 $f28, 0x50($sp) /* 34E40C E00386EC D7BA0048 */ ldc1 $f26, 0x48($sp) /* 34E410 E00386F0 D7B80040 */ ldc1 $f24, 0x40($sp) /* 34E414 E00386F4 D7B60038 */ ldc1 $f22, 0x38($sp) /* 34E418 E00386F8 D7B40030 */ ldc1 $f20, 0x30($sp) /* 34E41C E00386FC 03E00008 */ jr $ra /* 34E420 E0038700 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void spiky_white_aura_update(EffectInstance* effect) { SpikyWhiteAuraFXData* part = effect->data.spikyWhiteAura; s32 unk_28; s32 unk_2C; s32 i; part->unk_28--; part->unk_2C++; if (part->unk_28 < 0) { shim_remove_effect(effect); return; } unk_28 = part->unk_28; unk_2C = part->unk_2C; for (i = 0; i < effect->numParts; i++, part++) { if (unk_28 >= 6) { part->unk_10 *= 0.8; part->unk_14 *= 0.8; part->unk_18 *= 0.8; part->unk_24 += (255 - part->unk_24) * 0.4; part->unk_20 = shim_sin_deg(part->unk_24 / 2) * 3.0f + shim_sin_deg(unk_2C * 30.0f); } if (unk_28 < 5) { part->unk_24 *= 0.6; part->unk_10 *= 0.7; part->unk_14 *= 0.7; part->unk_18 *= 0.7; part->unk_20 = shim_sin_deg(part->unk_24 / 2) * 3.0f + shim_sin_deg(unk_2C * 30.0f) + (255 - part->unk_24) / 30.0f; } part->unk_04 += part->unk_10; part->unk_08 += part->unk_14; part->unk_0C += part->unk_18; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel lil_oink_update /* 3FEBBC E01140DC 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 3FEBC0 E01140E0 AFBF0028 */ sw $ra, 0x28($sp) /* 3FEBC4 E01140E4 AFB50024 */ sw $s5, 0x24($sp) /* 3FEBC8 E01140E8 AFB40020 */ sw $s4, 0x20($sp) /* 3FEBCC E01140EC AFB3001C */ sw $s3, 0x1C($sp) /* 3FEBD0 E01140F0 AFB20018 */ sw $s2, 0x18($sp) /* 3FEBD4 E01140F4 AFB10014 */ sw $s1, 0x14($sp) /* 3FEBD8 E01140F8 AFB00010 */ sw $s0, 0x10($sp) /* 3FEBDC E01140FC 8C94000C */ lw $s4, 0xC($a0) /* 3FEBE0 E0114100 3C15E011 */ lui $s5, %hi(D_E0114740) /* 3FEBE4 E0114104 26B54740 */ addiu $s5, $s5, %lo(D_E0114740) /* 3FEBE8 E0114108 0280902D */ daddu $s2, $s4, $zero /* 3FEBEC E011410C 8E820004 */ lw $v0, 0x4($s4) /* 3FEBF0 E0114110 0280882D */ daddu $s1, $s4, $zero /* 3FEBF4 E0114114 24420001 */ addiu $v0, $v0, 0x1 /* 3FEBF8 E0114118 AE820004 */ sw $v0, 0x4($s4) .LE011411C: /* 3FEBFC E011411C 922300FA */ lbu $v1, 0xFA($s1) /* 3FEC00 E0114120 8230013C */ lb $s0, 0x13C($s1) /* 3FEC04 E0114124 2C620006 */ sltiu $v0, $v1, 0x6 /* 3FEC08 E0114128 10400050 */ beqz $v0, .LE011426C /* 3FEC0C E011412C 0000982D */ daddu $s3, $zero, $zero /* 3FEC10 E0114130 00031080 */ sll $v0, $v1, 2 /* 3FEC14 E0114134 3C01E011 */ lui $at, (0xE0114750 >> 16) /* 3FEC18 E0114138 00220821 */ addu $at, $at, $v0 /* 3FEC1C E011413C 8C224750 */ lw $v0, (0xE0114750 & 0xFFFF)($at) /* 3FEC20 E0114140 00400008 */ jr $v0 /* 3FEC24 E0114144 00000000 */ nop /* 3FEC28 E0114148 24020001 */ addiu $v0, $zero, 0x1 /* 3FEC2C E011414C A2220105 */ sb $v0, 0x105($s1) /* 3FEC30 E0114150 080450B5 */ j .LE01142D4 /* 3FEC34 E0114154 24130001 */ addiu $s3, $zero, 0x1 /* 3FEC38 E0114158 06010002 */ bgez $s0, .LE0114164 /* 3FEC3C E011415C 0200102D */ daddu $v0, $s0, $zero /* 3FEC40 E0114160 26020003 */ addiu $v0, $s0, 0x3 .LE0114164: /* 3FEC44 E0114164 00021083 */ sra $v0, $v0, 2 /* 3FEC48 E0114168 00021080 */ sll $v0, $v0, 2 /* 3FEC4C E011416C 02021023 */ subu $v0, $s0, $v0 /* 3FEC50 E0114170 00551021 */ addu $v0, $v0, $s5 /* 3FEC54 E0114174 00101880 */ sll $v1, $s0, 2 /* 3FEC58 E0114178 00701821 */ addu $v1, $v1, $s0 /* 3FEC5C E011417C 00031840 */ sll $v1, $v1, 1 /* 3FEC60 E0114180 90420000 */ lbu $v0, 0x0($v0) /* 3FEC64 E0114184 44836000 */ mtc1 $v1, $f12 /* 3FEC68 E0114188 00000000 */ nop /* 3FEC6C E011418C 46806320 */ cvt.s.w $f12, $f12 /* 3FEC70 E0114190 0C080140 */ jal shim_sin_deg /* 3FEC74 E0114194 A2220105 */ sb $v0, 0x105($s1) /* 3FEC78 E0114198 C64200B8 */ lwc1 $f2, 0xB8($s2) /* 3FEC7C E011419C 46001080 */ add.s $f2, $f2, $f0 /* 3FEC80 E01141A0 2A020024 */ slti $v0, $s0, 0x24 /* 3FEC84 E01141A4 1440004B */ bnez $v0, .LE01142D4 /* 3FEC88 E01141A8 E64200B8 */ swc1 $f2, 0xB8($s2) /* 3FEC8C E01141AC 080450B4 */ j .LE01142D0 /* 3FEC90 E01141B0 24130001 */ addiu $s3, $zero, 0x1 /* 3FEC94 E01141B4 06010002 */ bgez $s0, .LE01141C0 /* 3FEC98 E01141B8 0200102D */ daddu $v0, $s0, $zero /* 3FEC9C E01141BC 26020003 */ addiu $v0, $s0, 0x3 .LE01141C0: /* 3FECA0 E01141C0 00021083 */ sra $v0, $v0, 2 /* 3FECA4 E01141C4 00021080 */ sll $v0, $v0, 2 /* 3FECA8 E01141C8 02021023 */ subu $v0, $s0, $v0 /* 3FECAC E01141CC 00551021 */ addu $v0, $v0, $s5 /* 3FECB0 E01141D0 00101880 */ sll $v1, $s0, 2 /* 3FECB4 E01141D4 00701821 */ addu $v1, $v1, $s0 /* 3FECB8 E01141D8 00031880 */ sll $v1, $v1, 2 /* 3FECBC E01141DC 90420000 */ lbu $v0, 0x0($v0) /* 3FECC0 E01141E0 44836000 */ mtc1 $v1, $f12 /* 3FECC4 E01141E4 00000000 */ nop /* 3FECC8 E01141E8 46806320 */ cvt.s.w $f12, $f12 /* 3FECCC E01141EC 0C080140 */ jal shim_sin_deg /* 3FECD0 E01141F0 A2220105 */ sb $v0, 0x105($s1) /* 3FECD4 E01141F4 46000000 */ add.s $f0, $f0, $f0 /* 3FECD8 E01141F8 24130001 */ addiu $s3, $zero, 0x1 /* 3FECDC E01141FC 2A020009 */ slti $v0, $s0, 0x9 /* 3FECE0 E0114200 14400034 */ bnez $v0, .LE01142D4 /* 3FECE4 E0114204 E6400110 */ swc1 $f0, 0x110($s2) /* 3FECE8 E0114208 080450B4 */ j .LE01142D0 /* 3FECEC E011420C AE400110 */ sw $zero, 0x110($s2) /* 3FECF0 E0114210 06010002 */ bgez $s0, .LE011421C /* 3FECF4 E0114214 0200102D */ daddu $v0, $s0, $zero /* 3FECF8 E0114218 26020003 */ addiu $v0, $s0, 0x3 .LE011421C: /* 3FECFC E011421C 00021083 */ sra $v0, $v0, 2 /* 3FED00 E0114220 00021080 */ sll $v0, $v0, 2 /* 3FED04 E0114224 02021023 */ subu $v0, $s0, $v0 /* 3FED08 E0114228 00551021 */ addu $v0, $v0, $s5 /* 3FED0C E011422C 00101880 */ sll $v1, $s0, 2 /* 3FED10 E0114230 00701821 */ addu $v1, $v1, $s0 /* 3FED14 E0114234 00031880 */ sll $v1, $v1, 2 /* 3FED18 E0114238 90420000 */ lbu $v0, 0x0($v0) /* 3FED1C E011423C 44836000 */ mtc1 $v1, $f12 /* 3FED20 E0114240 00000000 */ nop /* 3FED24 E0114244 46806320 */ cvt.s.w $f12, $f12 /* 3FED28 E0114248 0C080140 */ jal shim_sin_deg /* 3FED2C E011424C A2220105 */ sb $v0, 0x105($s1) /* 3FED30 E0114250 3C014080 */ lui $at, (0x40800000 >> 16) /* 3FED34 E0114254 44811000 */ mtc1 $at, $f2 /* 3FED38 E0114258 00000000 */ nop /* 3FED3C E011425C 46020002 */ mul.s $f0, $f0, $f2 /* 3FED40 E0114260 00000000 */ nop /* 3FED44 E0114264 080450B0 */ j .LE01142C0 /* 3FED48 E0114268 2A020009 */ slti $v0, $s0, 0x9 .LE011426C: /* 3FED4C E011426C 06010002 */ bgez $s0, .LE0114278 /* 3FED50 E0114270 0200102D */ daddu $v0, $s0, $zero /* 3FED54 E0114274 26020003 */ addiu $v0, $s0, 0x3 .LE0114278: /* 3FED58 E0114278 00021083 */ sra $v0, $v0, 2 /* 3FED5C E011427C 00021080 */ sll $v0, $v0, 2 /* 3FED60 E0114280 02021023 */ subu $v0, $s0, $v0 /* 3FED64 E0114284 00551021 */ addu $v0, $v0, $s5 /* 3FED68 E0114288 00101880 */ sll $v1, $s0, 2 /* 3FED6C E011428C 00701821 */ addu $v1, $v1, $s0 /* 3FED70 E0114290 90420000 */ lbu $v0, 0x0($v0) /* 3FED74 E0114294 44836000 */ mtc1 $v1, $f12 /* 3FED78 E0114298 00000000 */ nop /* 3FED7C E011429C 46806320 */ cvt.s.w $f12, $f12 /* 3FED80 E01142A0 0C080140 */ jal shim_sin_deg /* 3FED84 E01142A4 A2220105 */ sb $v0, 0x105($s1) /* 3FED88 E01142A8 3C014140 */ lui $at, (0x41400000 >> 16) /* 3FED8C E01142AC 44811000 */ mtc1 $at, $f2 /* 3FED90 E01142B0 00000000 */ nop /* 3FED94 E01142B4 46020002 */ mul.s $f0, $f0, $f2 /* 3FED98 E01142B8 00000000 */ nop /* 3FED9C E01142BC 2A020024 */ slti $v0, $s0, 0x24 .LE01142C0: /* 3FEDA0 E01142C0 14400004 */ bnez $v0, .LE01142D4 /* 3FEDA4 E01142C4 E6400110 */ swc1 $f0, 0x110($s2) /* 3FEDA8 E01142C8 24130001 */ addiu $s3, $zero, 0x1 /* 3FEDAC E01142CC AE400110 */ sw $zero, 0x110($s2) .LE01142D0: /* 3FEDB0 E01142D0 A220013C */ sb $zero, 0x13C($s1) .LE01142D4: /* 3FEDB4 E01142D4 9222013C */ lbu $v0, 0x13C($s1) /* 3FEDB8 E01142D8 24420001 */ addiu $v0, $v0, 0x1 /* 3FEDBC E01142DC 1260000A */ beqz $s3, .LE0114308 /* 3FEDC0 E01142E0 A222013C */ sb $v0, 0x13C($s1) /* 3FEDC4 E01142E4 8E430008 */ lw $v1, 0x8($s2) /* 3FEDC8 E01142E8 30620002 */ andi $v0, $v1, 0x2 /* 3FEDCC E01142EC 10400006 */ beqz $v0, .LE0114308 /* 3FEDD0 E01142F0 2402FFFD */ addiu $v0, $zero, -0x3 /* 3FEDD4 E01142F4 00621024 */ and $v0, $v1, $v0 /* 3FEDD8 E01142F8 AE420008 */ sw $v0, 0x8($s2) /* 3FEDDC E01142FC 922200EF */ lbu $v0, 0xEF($s1) /* 3FEDE0 E0114300 A220013C */ sb $zero, 0x13C($s1) /* 3FEDE4 E0114304 A22200FA */ sb $v0, 0xFA($s1) .LE0114308: /* 3FEDE8 E0114308 26310001 */ addiu $s1, $s1, 0x1 /* 3FEDEC E011430C 2682000B */ addiu $v0, $s4, 0xB /* 3FEDF0 E0114310 0222102A */ slt $v0, $s1, $v0 /* 3FEDF4 E0114314 1440FF81 */ bnez $v0, .LE011411C /* 3FEDF8 E0114318 26520004 */ addiu $s2, $s2, 0x4 /* 3FEDFC E011431C 8FBF0028 */ lw $ra, 0x28($sp) /* 3FEE00 E0114320 8FB50024 */ lw $s5, 0x24($sp) /* 3FEE04 E0114324 8FB40020 */ lw $s4, 0x20($sp) /* 3FEE08 E0114328 8FB3001C */ lw $s3, 0x1C($sp) /* 3FEE0C E011432C 8FB20018 */ lw $s2, 0x18($sp) /* 3FEE10 E0114330 8FB10014 */ lw $s1, 0x14($sp) /* 3FEE14 E0114334 8FB00010 */ lw $s0, 0x10($sp) /* 3FEE18 E0114338 03E00008 */ jr $ra /* 3FEE1C E011433C 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void lil_oink_update(EffectInstance* effect) { LilOinkFXData* data = effect->data.lilOink; s32 i; data->lifetime++; for (i = 0; i < MAX_LIL_OINKS; i++) { s32 time = data->animTime[i]; s32 animDone = FALSE; switch (data->anim[i]) { case LIL_OINK_ANIM_0: animDone = TRUE; break; case LIL_OINK_ANIM_1: data->gfxFrame[i] = 1; animDone = TRUE; break; case LIL_OINK_ANIM_3: data->gfxFrame[i] = lil_oink_AnimateGfxSelect[time % ARRAY_COUNT(lil_oink_AnimateGfxSelect)]; data->rot[i] = data->rot[i] + shim_sin_deg(time * 10); if (time >= 36) { animDone = TRUE; data->animTime[i] = 0; } break; case LIL_OINK_ANIM_2: data->gfxFrame[i] = lil_oink_AnimateGfxSelect[time % ARRAY_COUNT(lil_oink_AnimateGfxSelect)]; data->jumpOffset[i] = shim_sin_deg(time * 20) * 2.0f; animDone = TRUE; if (time >= 9) { data->jumpOffset[i] = 0.0f; data->animTime[i] = 0; } break; case LIL_OINK_ANIM_4: data->gfxFrame[i] = lil_oink_AnimateGfxSelect[time % ARRAY_COUNT(lil_oink_AnimateGfxSelect)]; data->jumpOffset[i] = shim_sin_deg(time * 20) * 4.0f; if (!(time < 9)) { animDone = TRUE; data->jumpOffset[i] = 0.0f; data->animTime[i] = 0; } break; case LIL_OINK_ANIM_5: default: data->gfxFrame[i] = lil_oink_AnimateGfxSelect[time % ARRAY_COUNT(lil_oink_AnimateGfxSelect)]; data->jumpOffset[i] = shim_sin_deg(time * 5) * 12.0f; if (!(time < 36)) { animDone = TRUE; data->jumpOffset[i] = 0.0f; data->animTime[i] = 0; } break; } data->animTime[i]++; if (animDone) { if (data->flags[i] & LIL_OINK_FLAG_ANIM_CHANGED) { data->flags[i] &= ~LIL_OINK_FLAG_ANIM_CHANGED; data->animTime[i] = 0; data->anim[i] = data->nextAnim[i]; } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_syn_update /* 2EA54 80053654 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 2EA58 80053658 AFB3002C */ sw $s3, 0x2C($sp) /* 2EA5C 8005365C 0080982D */ daddu $s3, $a0, $zero /* 2EA60 80053660 AFBF0034 */ sw $ra, 0x34($sp) /* 2EA64 80053664 AFB40030 */ sw $s4, 0x30($sp) /* 2EA68 80053668 AFB20028 */ sw $s2, 0x28($sp) /* 2EA6C 8005366C AFB10024 */ sw $s1, 0x24($sp) /* 2EA70 80053670 AFB00020 */ sw $s0, 0x20($sp) /* 2EA74 80053674 9262130C */ lbu $v0, 0x130C($s3) /* 2EA78 80053678 24100002 */ addiu $s0, $zero, 0x2 /* 2EA7C 8005367C 14500003 */ bne $v0, $s0, .L8005368C /* 2EA80 80053680 24020001 */ addiu $v0, $zero, 0x1 /* 2EA84 80053684 0C015FAC */ jal au_disable_channel_delay /* 2EA88 80053688 A262130C */ sb $v0, 0x130C($s3) .L8005368C: /* 2EA8C 8005368C 92620050 */ lbu $v0, 0x50($s3) /* 2EA90 80053690 1040001B */ beqz $v0, .L80053700 /* 2EA94 80053694 00000000 */ nop /* 2EA98 80053698 9262130C */ lbu $v0, 0x130C($s3) /* 2EA9C 8005369C 14400018 */ bnez $v0, .L80053700 /* 2EAA0 800536A0 24020001 */ addiu $v0, $zero, 0x1 /* 2EAA4 800536A4 92630053 */ lbu $v1, 0x53($s3) /* 2EAA8 800536A8 10620005 */ beq $v1, $v0, .L800536C0 /* 2EAAC 800536AC 00000000 */ nop /* 2EAB0 800536B0 10700009 */ beq $v1, $s0, .L800536D8 /* 2EAB4 800536B4 00000000 */ nop /* 2EAB8 800536B8 08014DBD */ j .L800536F4 /* 2EABC 800536BC 00000000 */ nop .L800536C0: /* 2EAC0 800536C0 0C015F72 */ jal au_set_delay_time /* 2EAC4 800536C4 92640052 */ lbu $a0, 0x52($s3) /* 2EAC8 800536C8 0C015F82 */ jal au_delay_left_channel /* 2EACC 800536CC 92640051 */ lbu $a0, 0x51($s3) /* 2EAD0 800536D0 08014DC0 */ j .L80053700 /* 2EAD4 800536D4 A2600050 */ sb $zero, 0x50($s3) .L800536D8: /* 2EAD8 800536D8 92640052 */ lbu $a0, 0x52($s3) /* 2EADC 800536DC 0C015F72 */ jal au_set_delay_time /* 2EAE0 800536E0 00000000 */ nop /* 2EAE4 800536E4 0C015F97 */ jal au_delay_right_channel /* 2EAE8 800536E8 92640051 */ lbu $a0, 0x51($s3) /* 2EAEC 800536EC 08014DC0 */ j .L80053700 /* 2EAF0 800536F0 A2600050 */ sb $zero, 0x50($s3) .L800536F4: /* 2EAF4 800536F4 0C015FAC */ jal au_disable_channel_delay /* 2EAF8 800536F8 00000000 */ nop /* 2EAFC 800536FC A2600050 */ sb $zero, 0x50($s3) .L80053700: /* 2EB00 80053700 92620041 */ lbu $v0, 0x41($s3) /* 2EB04 80053704 10400005 */ beqz $v0, .L8005371C /* 2EB08 80053708 00000000 */ nop /* 2EB0C 8005370C 92650040 */ lbu $a1, 0x40($s3) /* 2EB10 80053710 0C015B73 */ jal au_bus_set_effect /* 2EB14 80053714 0000202D */ daddu $a0, $zero, $zero /* 2EB18 80053718 A2600041 */ sb $zero, 0x41($s3) .L8005371C: /* 2EB1C 8005371C 92620045 */ lbu $v0, 0x45($s3) /* 2EB20 80053720 10400005 */ beqz $v0, .L80053738 /* 2EB24 80053724 00000000 */ nop /* 2EB28 80053728 92650044 */ lbu $a1, 0x44($s3) /* 2EB2C 8005372C 0C015B73 */ jal au_bus_set_effect /* 2EB30 80053730 24040001 */ addiu $a0, $zero, 0x1 /* 2EB34 80053734 A2600045 */ sb $zero, 0x45($s3) .L80053738: /* 2EB38 80053738 92620049 */ lbu $v0, 0x49($s3) /* 2EB3C 8005373C 10400005 */ beqz $v0, .L80053754 /* 2EB40 80053740 00000000 */ nop /* 2EB44 80053744 92650048 */ lbu $a1, 0x48($s3) /* 2EB48 80053748 0C015B73 */ jal au_bus_set_effect /* 2EB4C 8005374C 24040002 */ addiu $a0, $zero, 0x2 /* 2EB50 80053750 A2600049 */ sb $zero, 0x49($s3) .L80053754: /* 2EB54 80053754 9262004D */ lbu $v0, 0x4D($s3) /* 2EB58 80053758 10400006 */ beqz $v0, .L80053774 /* 2EB5C 8005375C 0000902D */ daddu $s2, $zero, $zero /* 2EB60 80053760 9265004C */ lbu $a1, 0x4C($s3) /* 2EB64 80053764 0C015B73 */ jal au_bus_set_effect /* 2EB68 80053768 24040003 */ addiu $a0, $zero, 0x3 /* 2EB6C 8005376C A260004D */ sb $zero, 0x4D($s3) /* 2EB70 80053770 0000902D */ daddu $s2, $zero, $zero .L80053774: /* 2EB74 80053774 24141320 */ addiu $s4, $zero, 0x1320 .L80053778: /* 2EB78 80053778 02748021 */ addu $s0, $s3, $s4 /* 2EB7C 8005377C 92020042 */ lbu $v0, 0x42($s0) /* 2EB80 80053780 92110043 */ lbu $s1, 0x43($s0) /* 2EB84 80053784 10400007 */ beqz $v0, .L800537A4 /* 2EB88 80053788 32220002 */ andi $v0, $s1, 0x2 /* 2EB8C 8005378C 0C015BBA */ jal func_80056EE8 /* 2EB90 80053790 324400FF */ andi $a0, $s2, 0xFF /* 2EB94 80053794 A2000042 */ sb $zero, 0x42($s0) /* 2EB98 80053798 AE00001C */ sw $zero, 0x1C($s0) /* 2EB9C 8005379C A2000045 */ sb $zero, 0x45($s0) /* 2EBA0 800537A0 32220002 */ andi $v0, $s1, 0x2 .L800537A4: /* 2EBA4 800537A4 10400013 */ beqz $v0, .L800537F4 /* 2EBA8 800537A8 0200202D */ daddu $a0, $s0, $zero /* 2EBAC 800537AC 0C014AFE */ jal au_voice_start /* 2EBB0 800537B0 26050014 */ addiu $a1, $s0, 0x14 /* 2EBB4 800537B4 8602000C */ lh $v0, 0xC($s0) /* 2EBB8 800537B8 92050010 */ lbu $a1, 0x10($s0) /* 2EBBC 800537BC AFA20010 */ sw $v0, 0x10($sp) /* 2EBC0 800537C0 9202000E */ lbu $v0, 0xE($s0) /* 2EBC4 800537C4 AFA20014 */ sw $v0, 0x14($sp) /* 2EBC8 800537C8 9202000F */ lbu $v0, 0xF($s0) /* 2EBCC 800537CC AFA20018 */ sw $v0, 0x18($sp) /* 2EBD0 800537D0 8E020008 */ lw $v0, 0x8($s0) /* 2EBD4 800537D4 AFA2001C */ sw $v0, 0x1C($sp) /* 2EBD8 800537D8 8E060000 */ lw $a2, 0x0($s0) /* 2EBDC 800537DC 8E070004 */ lw $a3, 0x4($s0) /* 2EBE0 800537E0 0C015BE9 */ jal func_80056FA4 /* 2EBE4 800537E4 324400FF */ andi $a0, $s2, 0xFF /* 2EBE8 800537E8 92020044 */ lbu $v0, 0x44($s0) /* 2EBEC 800537EC 08014E15 */ j .L80053854 /* 2EBF0 800537F0 A2020045 */ sb $v0, 0x45($s0) .L800537F4: /* 2EBF4 800537F4 32220008 */ andi $v0, $s1, 0x8 /* 2EBF8 800537F8 10400005 */ beqz $v0, .L80053810 /* 2EBFC 800537FC 32220004 */ andi $v0, $s1, 0x4 /* 2EC00 80053800 8E050004 */ lw $a1, 0x4($s0) /* 2EC04 80053804 0C015CD1 */ jal func_80057344 /* 2EC08 80053808 324400FF */ andi $a0, $s2, 0xFF /* 2EC0C 8005380C 32220004 */ andi $v0, $s1, 0x4 .L80053810: /* 2EC10 80053810 1040000A */ beqz $v0, .L8005383C /* 2EC14 80053814 32220010 */ andi $v0, $s1, 0x10 /* 2EC18 80053818 9202000F */ lbu $v0, 0xF($s0) /* 2EC1C 8005381C 8605000C */ lh $a1, 0xC($s0) /* 2EC20 80053820 9207000E */ lbu $a3, 0xE($s0) /* 2EC24 80053824 AFA20010 */ sw $v0, 0x10($sp) /* 2EC28 80053828 8E060008 */ lw $a2, 0x8($s0) /* 2EC2C 8005382C 0C015CDB */ jal au_syn_set_mixer_params /* 2EC30 80053830 324400FF */ andi $a0, $s2, 0xFF /* 2EC34 80053834 08014E16 */ j .L80053858 /* 2EC38 80053838 A2000043 */ sb $zero, 0x43($s0) .L8005383C: /* 2EC3C 8005383C 50400006 */ beql $v0, $zero, .L80053858 /* 2EC40 80053840 A2000043 */ sb $zero, 0x43($s0) /* 2EC44 80053844 9205000E */ lbu $a1, 0xE($s0) /* 2EC48 80053848 9206000F */ lbu $a2, 0xF($s0) /* 2EC4C 8005384C 0C015D52 */ jal au_syn_set_pan_fxmix /* 2EC50 80053850 324400FF */ andi $a0, $s2, 0xFF .L80053854: /* 2EC54 80053854 A2000043 */ sb $zero, 0x43($s0) .L80053858: /* 2EC58 80053858 26520001 */ addiu $s2, $s2, 0x1 /* 2EC5C 8005385C 2E420018 */ sltiu $v0, $s2, 0x18 /* 2EC60 80053860 1440FFC5 */ bnez $v0, .L80053778 /* 2EC64 80053864 26940048 */ addiu $s4, $s4, 0x48 /* 2EC68 80053868 8FBF0034 */ lw $ra, 0x34($sp) /* 2EC6C 8005386C 8FB40030 */ lw $s4, 0x30($sp) /* 2EC70 80053870 8FB3002C */ lw $s3, 0x2C($sp) /* 2EC74 80053874 8FB20028 */ lw $s2, 0x28($sp) /* 2EC78 80053878 8FB10024 */ lw $s1, 0x24($sp) /* 2EC7C 8005387C 8FB00020 */ lw $s0, 0x20($sp) /* 2EC80 80053880 03E00008 */ jr $ra /* 2EC84 80053884 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void au_syn_update(AuGlobals* globals) { u32 i; if (globals->unk_130C == 2) { globals->unk_130C = 1; au_disable_channel_delay(); } if (globals->channelDelayPending && (globals->unk_130C == 0)) { switch (globals->channelDelaySide) { case 1: au_set_delay_time(globals->channelDelayTime); au_delay_left_channel(globals->channelDelayBusId); globals->channelDelayPending = FALSE; break; case 2: au_set_delay_time(globals->channelDelayTime); au_delay_right_channel(globals->channelDelayBusId); globals->channelDelayPending = FALSE; break; default: au_disable_channel_delay(); globals->channelDelayPending = FALSE; break; } } if (globals->effectChanges[FX_BUS_BGMA_MAIN].changed) { au_bus_set_effect(FX_BUS_BGMA_MAIN, globals->effectChanges[FX_BUS_BGMA_MAIN].type); globals->effectChanges[FX_BUS_BGMA_MAIN].changed = FALSE; } if (globals->effectChanges[FX_BUS_SOUND].changed) { au_bus_set_effect(FX_BUS_SOUND, globals->effectChanges[FX_BUS_SOUND].type); globals->effectChanges[FX_BUS_SOUND].changed = FALSE; } if (globals->effectChanges[FX_BUS_BGMB].changed) { au_bus_set_effect(FX_BUS_BGMB, globals->effectChanges[FX_BUS_BGMB].type); globals->effectChanges[FX_BUS_BGMB].changed = FALSE; } if (globals->effectChanges[FX_BUS_BGMA_AUX].changed) { au_bus_set_effect(FX_BUS_BGMA_AUX, globals->effectChanges[FX_BUS_BGMA_AUX].type); globals->effectChanges[FX_BUS_BGMA_AUX].changed = FALSE; } for (i = 0; i < ARRAY_COUNT(globals->voices); i++) { AuVoice* voice = &globals->voices[i]; u8 voiceUpdateFlags = voice->syncFlags; if (voice->stopPending) { au_syn_stop_voice(i); voice->stopPending = FALSE; voice->cmdPtr = NULL; voice->priority = AU_PRIORITY_FREE; } if (voiceUpdateFlags & AU_VOICE_SYNC_FLAG_ALL) { au_voice_start(voice, &voice->envelope); au_syn_start_voice_params(i, voice->busId, voice->instrument, voice->pitchRatio, voice->p_volume, voice->pan, voice->reverb, voice->delta); // priority may be AU_PRIORITY_FREE if this voice was stolen and reset voice->priority = voice->clientPriority; } else { if (voiceUpdateFlags & AU_VOICE_SYNC_FLAG_PITCH) { au_syn_set_pitch(i, voice->pitchRatio); } if (voiceUpdateFlags & AU_VOICE_SYNC_FLAG_PARAMS) { au_syn_set_mixer_params(i, voice->p_volume, voice->delta, voice->pan, voice->reverb); } else if (voiceUpdateFlags & AU_VOICE_SYNC_FLAG_PAN_FXMIX) { au_syn_set_pan_fxmix(i, voice->pan, voice->reverb); } } voice->syncFlags = 0; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel status_bar_draw_stat /* 812E4 800E7E34 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 812E8 800E7E38 AFB40030 */ sw $s4, 0x30($sp) /* 812EC 800E7E3C 0080A02D */ daddu $s4, $a0, $zero /* 812F0 800E7E40 AFB00020 */ sw $s0, 0x20($sp) /* 812F4 800E7E44 00A0802D */ daddu $s0, $a1, $zero /* 812F8 800E7E48 AFB10024 */ sw $s1, 0x24($sp) /* 812FC 800E7E4C 00C0882D */ daddu $s1, $a2, $zero /* 81300 800E7E50 AFB3002C */ sw $s3, 0x2C($sp) /* 81304 800E7E54 00E0982D */ daddu $s3, $a3, $zero /* 81308 800E7E58 AFB60038 */ sw $s6, 0x38($sp) /* 8130C 800E7E5C 24160002 */ addiu $s6, $zero, 0x2 /* 81310 800E7E60 AFB20028 */ sw $s2, 0x28($sp) /* 81314 800E7E64 0000902D */ daddu $s2, $zero, $zero /* 81318 800E7E68 AFB50034 */ sw $s5, 0x34($sp) /* 8131C 800E7E6C 8FB50058 */ lw $s5, 0x58($sp) /* 81320 800E7E70 3C05800F */ lui $a1, %hi(SlashHudScript) /* 81324 800E7E74 8CA57FAC */ lw $a1, %lo(SlashHudScript)($a1) /* 81328 800E7E78 26080008 */ addiu $t0, $s0, 0x8 /* 8132C 800E7E7C AFA80018 */ sw $t0, 0x18($sp) /* 81330 800E7E80 26280008 */ addiu $t0, $s1, 0x8 /* 81334 800E7E84 AFBF0044 */ sw $ra, 0x44($sp) /* 81338 800E7E88 AFBE0040 */ sw $fp, 0x40($sp) /* 8133C 800E7E8C AFB7003C */ sw $s7, 0x3C($sp) /* 81340 800E7E90 0C0511FF */ jal hud_element_set_script /* 81344 800E7E94 AFA8001C */ sw $t0, 0x1C($sp) /* 81348 800E7E98 0280202D */ daddu $a0, $s4, $zero /* 8134C 800E7E9C 26050016 */ addiu $a1, $s0, 0x16 /* 81350 800E7EA0 0C051261 */ jal hud_element_set_render_pos /* 81354 800E7EA4 26260009 */ addiu $a2, $s1, 0x9 /* 81358 800E7EA8 0280202D */ daddu $a0, $s4, $zero /* 8135C 800E7EAC 0C05128B */ jal hud_element_clear_flags /* 81360 800E7EB0 02C0282D */ daddu $a1, $s6, $zero /* 81364 800E7EB4 0C0511F1 */ jal hud_element_draw_next /* 81368 800E7EB8 0280202D */ daddu $a0, $s4, $zero /* 8136C 800E7EBC 3C066666 */ lui $a2, (0x66666667 >> 16) /* 81370 800E7EC0 34C66667 */ ori $a2, $a2, (0x66666667 & 0xFFFF) /* 81374 800E7EC4 27A50010 */ addiu $a1, $sp, 0x10 .L800E7EC8: /* 81378 800E7EC8 02660018 */ mult $s3, $a2 /* 8137C 800E7ECC 02D22023 */ subu $a0, $s6, $s2 /* 81380 800E7ED0 26520001 */ addiu $s2, $s2, 0x1 /* 81384 800E7ED4 001317C3 */ sra $v0, $s3, 31 /* 81388 800E7ED8 00852021 */ addu $a0, $a0, $a1 /* 8138C 800E7EDC 00004010 */ mfhi $t0 /* 81390 800E7EE0 00081883 */ sra $v1, $t0, 2 /* 81394 800E7EE4 00621023 */ subu $v0, $v1, $v0 /* 81398 800E7EE8 0040182D */ daddu $v1, $v0, $zero /* 8139C 800E7EEC 00031080 */ sll $v0, $v1, 2 /* 813A0 800E7EF0 00431021 */ addu $v0, $v0, $v1 /* 813A4 800E7EF4 00021040 */ sll $v0, $v0, 1 /* 813A8 800E7EF8 02621023 */ subu $v0, $s3, $v0 /* 813AC 800E7EFC A082FFFF */ sb $v0, -0x1($a0) /* 813B0 800E7F00 0256102A */ slt $v0, $s2, $s6 /* 813B4 800E7F04 1440FFF0 */ bnez $v0, .L800E7EC8 /* 813B8 800E7F08 0060982D */ daddu $s3, $v1, $zero /* 813BC 800E7F0C 8FB00018 */ lw $s0, 0x18($sp) /* 813C0 800E7F10 0000882D */ daddu $s1, $zero, $zero /* 813C4 800E7F14 8FB3001C */ lw $s3, 0x1C($sp) /* 813C8 800E7F18 12C00020 */ beqz $s6, .L800E7F9C /* 813CC 800E7F1C 0220902D */ daddu $s2, $s1, $zero /* 813D0 800E7F20 27BE0010 */ addiu $fp, $sp, 0x10 /* 813D4 800E7F24 26D7FFFF */ addiu $s7, $s6, -0x1 .L800E7F28: /* 813D8 800E7F28 03D21021 */ addu $v0, $fp, $s2 /* 813DC 800E7F2C 80420000 */ lb $v0, 0x0($v0) /* 813E0 800E7F30 54400006 */ bnel $v0, $zero, .L800E7F4C /* 813E4 800E7F34 24110001 */ addiu $s1, $zero, 0x1 /* 813E8 800E7F38 56200004 */ bnel $s1, $zero, .L800E7F4C /* 813EC 800E7F3C 24110001 */ addiu $s1, $zero, 0x1 /* 813F0 800E7F40 56570013 */ bnel $s2, $s7, .L800E7F90 /* 813F4 800E7F44 26520001 */ addiu $s2, $s2, 0x1 /* 813F8 800E7F48 24110001 */ addiu $s1, $zero, 0x1 .L800E7F4C: /* 813FC 800E7F4C 00021080 */ sll $v0, $v0, 2 /* 81400 800E7F50 3C08800F */ lui $t0, %hi(DigitHudScripts) /* 81404 800E7F54 25087F80 */ addiu $t0, $t0, %lo(DigitHudScripts) /* 81408 800E7F58 00481021 */ addu $v0, $v0, $t0 /* 8140C 800E7F5C 8C450000 */ lw $a1, 0x0($v0) /* 81410 800E7F60 0C0511FF */ jal hud_element_set_script /* 81414 800E7F64 0280202D */ daddu $a0, $s4, $zero /* 81418 800E7F68 0280202D */ daddu $a0, $s4, $zero /* 8141C 800E7F6C 0200282D */ daddu $a1, $s0, $zero /* 81420 800E7F70 0C051261 */ jal hud_element_set_render_pos /* 81424 800E7F74 0260302D */ daddu $a2, $s3, $zero /* 81428 800E7F78 0280202D */ daddu $a0, $s4, $zero /* 8142C 800E7F7C 0C05128B */ jal hud_element_clear_flags /* 81430 800E7F80 24050002 */ addiu $a1, $zero, 0x2 /* 81434 800E7F84 0C0511F1 */ jal hud_element_draw_next /* 81438 800E7F88 0280202D */ daddu $a0, $s4, $zero /* 8143C 800E7F8C 26520001 */ addiu $s2, $s2, 0x1 .L800E7F90: /* 81440 800E7F90 0256102A */ slt $v0, $s2, $s6 /* 81444 800E7F94 1440FFE4 */ bnez $v0, .L800E7F28 /* 81448 800E7F98 26100008 */ addiu $s0, $s0, 0x8 .L800E7F9C: /* 8144C 800E7F9C 12C00014 */ beqz $s6, .L800E7FF0 /* 81450 800E7FA0 0000902D */ daddu $s2, $zero, $zero /* 81454 800E7FA4 27A60010 */ addiu $a2, $sp, 0x10 /* 81458 800E7FA8 3C056666 */ lui $a1, (0x66666667 >> 16) /* 8145C 800E7FAC 34A56667 */ ori $a1, $a1, (0x66666667 & 0xFFFF) .L800E7FB0: /* 81460 800E7FB0 02A50018 */ mult $s5, $a1 /* 81464 800E7FB4 02D22023 */ subu $a0, $s6, $s2 /* 81468 800E7FB8 26520001 */ addiu $s2, $s2, 0x1 /* 8146C 800E7FBC 00862021 */ addu $a0, $a0, $a2 /* 81470 800E7FC0 001517C3 */ sra $v0, $s5, 31 /* 81474 800E7FC4 00004010 */ mfhi $t0 /* 81478 800E7FC8 00081883 */ sra $v1, $t0, 2 /* 8147C 800E7FCC 00621823 */ subu $v1, $v1, $v0 /* 81480 800E7FD0 00031080 */ sll $v0, $v1, 2 /* 81484 800E7FD4 00431021 */ addu $v0, $v0, $v1 /* 81488 800E7FD8 00021040 */ sll $v0, $v0, 1 /* 8148C 800E7FDC 02A21023 */ subu $v0, $s5, $v0 /* 81490 800E7FE0 A082FFFF */ sb $v0, -0x1($a0) /* 81494 800E7FE4 0256102A */ slt $v0, $s2, $s6 /* 81498 800E7FE8 1440FFF1 */ bnez $v0, .L800E7FB0 /* 8149C 800E7FEC 0060A82D */ daddu $s5, $v1, $zero .L800E7FF0: /* 814A0 800E7FF0 0000882D */ daddu $s1, $zero, $zero /* 814A4 800E7FF4 0220902D */ daddu $s2, $s1, $zero /* 814A8 800E7FF8 8FA80018 */ lw $t0, 0x18($sp) /* 814AC 800E7FFC 8FB3001C */ lw $s3, 0x1C($sp) /* 814B0 800E8000 12C00020 */ beqz $s6, .L800E8084 /* 814B4 800E8004 2510001A */ addiu $s0, $t0, 0x1A /* 814B8 800E8008 27B70010 */ addiu $s7, $sp, 0x10 /* 814BC 800E800C 26D5FFFF */ addiu $s5, $s6, -0x1 /* 814C0 800E8010 3C1E800F */ lui $fp, %hi(DigitHudScripts) /* 814C4 800E8014 27DE7F80 */ addiu $fp, $fp, %lo(DigitHudScripts) .L800E8018: /* 814C8 800E8018 02F21021 */ addu $v0, $s7, $s2 /* 814CC 800E801C 80420000 */ lb $v0, 0x0($v0) /* 814D0 800E8020 54400006 */ bnel $v0, $zero, .L800E803C /* 814D4 800E8024 24110001 */ addiu $s1, $zero, 0x1 /* 814D8 800E8028 56200004 */ bnel $s1, $zero, .L800E803C /* 814DC 800E802C 24110001 */ addiu $s1, $zero, 0x1 /* 814E0 800E8030 56550011 */ bnel $s2, $s5, .L800E8078 /* 814E4 800E8034 26520001 */ addiu $s2, $s2, 0x1 /* 814E8 800E8038 24110001 */ addiu $s1, $zero, 0x1 .L800E803C: /* 814EC 800E803C 00021080 */ sll $v0, $v0, 2 /* 814F0 800E8040 005E1021 */ addu $v0, $v0, $fp /* 814F4 800E8044 8C450000 */ lw $a1, 0x0($v0) /* 814F8 800E8048 0C0511FF */ jal hud_element_set_script /* 814FC 800E804C 0280202D */ daddu $a0, $s4, $zero /* 81500 800E8050 0280202D */ daddu $a0, $s4, $zero /* 81504 800E8054 0200282D */ daddu $a1, $s0, $zero /* 81508 800E8058 0C051261 */ jal hud_element_set_render_pos /* 8150C 800E805C 0260302D */ daddu $a2, $s3, $zero /* 81510 800E8060 0280202D */ daddu $a0, $s4, $zero /* 81514 800E8064 0C05128B */ jal hud_element_clear_flags /* 81518 800E8068 24050002 */ addiu $a1, $zero, 0x2 /* 8151C 800E806C 0C0511F1 */ jal hud_element_draw_next /* 81520 800E8070 0280202D */ daddu $a0, $s4, $zero /* 81524 800E8074 26520001 */ addiu $s2, $s2, 0x1 .L800E8078: /* 81528 800E8078 0256102A */ slt $v0, $s2, $s6 /* 8152C 800E807C 1440FFE6 */ bnez $v0, .L800E8018 /* 81530 800E8080 26100008 */ addiu $s0, $s0, 0x8 .L800E8084: /* 81534 800E8084 8FBF0044 */ lw $ra, 0x44($sp) /* 81538 800E8088 8FBE0040 */ lw $fp, 0x40($sp) /* 8153C 800E808C 8FB7003C */ lw $s7, 0x3C($sp) /* 81540 800E8090 8FB60038 */ lw $s6, 0x38($sp) /* 81544 800E8094 8FB50034 */ lw $s5, 0x34($sp) /* 81548 800E8098 8FB40030 */ lw $s4, 0x30($sp) /* 8154C 800E809C 8FB3002C */ lw $s3, 0x2C($sp) /* 81550 800E80A0 8FB20028 */ lw $s2, 0x28($sp) /* 81554 800E80A4 8FB10024 */ lw $s1, 0x24($sp) /* 81558 800E80A8 8FB00020 */ lw $s0, 0x20($sp) /* 8155C 800E80AC 03E00008 */ jr $ra /* 81560 800E80B0 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void status_bar_draw_stat(s32 id, s32 x, s32 y, s32 currentValue, s32 maxValue) { s8 digits[4]; s32 cond; s32 digit; s32 numDigits = 2; s32 localX; s32 localY; s32 i = 0; s32 baseX = x + 8; s32 baseY = y + 8; hud_element_set_script(id, SlashHudScript); hud_element_set_render_pos(id, baseX + 14, baseY + 1); hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED); hud_element_draw_next(id); for (i = 0; i < numDigits; i++) { s32 num = currentValue % 10; digits[numDigits - i - 1] = num; currentValue /= 10; } localX = baseX; localY = baseY; cond = FALSE; for (i = 0; i < numDigits; i++, localX += 8) { digit = digits[i]; if (digit != 0 || cond || i == numDigits - 1) { cond = TRUE; hud_element_set_script(id, DigitHudScripts[digit]); hud_element_set_render_pos(id, localX, localY); hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED); hud_element_draw_next(id); } } for (i = 0; i < numDigits; i++) { digits[numDigits - i - 1] = maxValue % 10; maxValue /= 10; } localX = baseX + 26; localY = baseY; cond = FALSE; for (i = 0; i < numDigits; i++, localX += 8) { digit = digits[i]; if (digit != 0 || cond || i == numDigits - 1) { cond = TRUE; hud_element_set_script(id, DigitHudScripts[digit]); hud_element_set_render_pos(id, localX, localY); hud_element_clear_flags(id, HUD_ELEMENT_FLAG_DISABLED); hud_element_draw_next(id); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel radial_shimmer_update /* 3664C8 E0066498 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 3664CC E006649C AFB1003C */ sw $s1, 0x3C($sp) /* 3664D0 E00664A0 0080882D */ daddu $s1, $a0, $zero /* 3664D4 E00664A4 AFBF0040 */ sw $ra, 0x40($sp) /* 3664D8 E00664A8 AFB00038 */ sw $s0, 0x38($sp) /* 3664DC E00664AC F7B40048 */ sdc1 $f20, 0x48($sp) /* 3664E0 E00664B0 8E30000C */ lw $s0, 0xC($s1) /* 3664E4 E00664B4 8E020028 */ lw $v0, 0x28($s0) /* 3664E8 E00664B8 8E03002C */ lw $v1, 0x2C($s0) /* 3664EC E00664BC 2442FFFF */ addiu $v0, $v0, -0x1 /* 3664F0 E00664C0 24630001 */ addiu $v1, $v1, 0x1 /* 3664F4 E00664C4 AE020028 */ sw $v0, 0x28($s0) /* 3664F8 E00664C8 AE03002C */ sw $v1, 0x2C($s0) /* 3664FC E00664CC 8E230000 */ lw $v1, 0x0($s1) /* 366500 E00664D0 30620010 */ andi $v0, $v1, 0x10 /* 366504 E00664D4 10400005 */ beqz $v0, .LE00664EC /* 366508 E00664D8 2402FFEF */ addiu $v0, $zero, -0x11 /* 36650C E00664DC 00621024 */ and $v0, $v1, $v0 /* 366510 E00664E0 AE220000 */ sw $v0, 0x0($s1) /* 366514 E00664E4 24020010 */ addiu $v0, $zero, 0x10 /* 366518 E00664E8 AE020028 */ sw $v0, 0x28($s0) .LE00664EC: /* 36651C E00664EC 8E050028 */ lw $a1, 0x28($s0) /* 366520 E00664F0 04A10005 */ bgez $a1, .LE0066508 /* 366524 E00664F4 00000000 */ nop /* 366528 E00664F8 0C080128 */ jal shim_remove_effect /* 36652C E00664FC 0220202D */ daddu $a0, $s1, $zero /* 366530 E0066500 080199C5 */ j .LE0066714 /* 366534 E0066504 00000000 */ nop .LE0066508: /* 366538 E0066508 8E04002C */ lw $a0, 0x2C($s0) /* 36653C E006650C 2882000B */ slti $v0, $a0, 0xB /* 366540 E0066510 1040000A */ beqz $v0, .LE006653C /* 366544 E0066514 3C036666 */ lui $v1, (0x66666667 >> 16) /* 366548 E0066518 34636667 */ ori $v1, $v1, (0x66666667 & 0xFFFF) /* 36654C E006651C 00041200 */ sll $v0, $a0, 8 /* 366550 E0066520 00441023 */ subu $v0, $v0, $a0 /* 366554 E0066524 00430018 */ mult $v0, $v1 /* 366558 E0066528 000217C3 */ sra $v0, $v0, 31 /* 36655C E006652C 00004010 */ mfhi $t0 /* 366560 E0066530 00081883 */ sra $v1, $t0, 2 /* 366564 E0066534 00621823 */ subu $v1, $v1, $v0 /* 366568 E0066538 AE030024 */ sw $v1, 0x24($s0) .LE006653C: /* 36656C E006653C 28A20006 */ slti $v0, $a1, 0x6 /* 366570 E0066540 10400009 */ beqz $v0, .LE0066568 /* 366574 E0066544 3C032AAA */ lui $v1, (0x2AAAAAAB >> 16) /* 366578 E0066548 3463AAAB */ ori $v1, $v1, (0x2AAAAAAB & 0xFFFF) /* 36657C E006654C 00051200 */ sll $v0, $a1, 8 /* 366580 E0066550 00451023 */ subu $v0, $v0, $a1 /* 366584 E0066554 00430018 */ mult $v0, $v1 /* 366588 E0066558 000217C3 */ sra $v0, $v0, 31 /* 36658C E006655C 00004010 */ mfhi $t0 /* 366590 E0066560 01021023 */ subu $v0, $t0, $v0 /* 366594 E0066564 AE020024 */ sw $v0, 0x24($s0) .LE0066568: /* 366598 E0066568 28A2000A */ slti $v0, $a1, 0xA /* 36659C E006656C 1040000C */ beqz $v0, .LE00665A0 /* 3665A0 E0066570 24020004 */ addiu $v0, $zero, 0x4 /* 3665A4 E0066574 8E030000 */ lw $v1, 0x0($s0) /* 3665A8 E0066578 14620009 */ bne $v1, $v0, .LE00665A0 /* 3665AC E006657C 00000000 */ nop /* 3665B0 E0066580 C600001C */ lwc1 $f0, 0x1C($s0) /* 3665B4 E0066584 3C01E006 */ lui $at, (0xE0066D20 >> 16) /* 3665B8 E0066588 D4226D20 */ ldc1 $f2, (0xE0066D20 & 0xFFFF)($at) /* 3665BC E006658C 46000021 */ cvt.d.s $f0, $f0 /* 3665C0 E0066590 46220002 */ mul.d $f0, $f0, $f2 /* 3665C4 E0066594 00000000 */ nop /* 3665C8 E0066598 46200020 */ cvt.s.d $f0, $f0 /* 3665CC E006659C E600001C */ swc1 $f0, 0x1C($s0) .LE00665A0: /* 3665D0 E00665A0 C6000020 */ lwc1 $f0, 0x20($s0) /* 3665D4 E00665A4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3665D8 E00665A8 4481A000 */ mtc1 $at, $f20 /* 3665DC E00665AC 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3665E0 E00665B0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3665E4 E00665B4 27A20028 */ addiu $v0, $sp, 0x28 /* 3665E8 E00665B8 E600001C */ swc1 $f0, 0x1C($s0) /* 3665EC E00665BC AFA20014 */ sw $v0, 0x14($sp) /* 3665F0 E00665C0 27A2002C */ addiu $v0, $sp, 0x2C /* 3665F4 E00665C4 AFA20018 */ sw $v0, 0x18($sp) /* 3665F8 E00665C8 27A20030 */ addiu $v0, $sp, 0x30 /* 3665FC E00665CC AFA2001C */ sw $v0, 0x1C($sp) /* 366600 E00665D0 27A20034 */ addiu $v0, $sp, 0x34 /* 366604 E00665D4 00032080 */ sll $a0, $v1, 2 /* 366608 E00665D8 00832021 */ addu $a0, $a0, $v1 /* 36660C E00665DC 00042080 */ sll $a0, $a0, 2 /* 366610 E00665E0 00832023 */ subu $a0, $a0, $v1 /* 366614 E00665E4 AFA20020 */ sw $v0, 0x20($sp) /* 366618 E00665E8 000410C0 */ sll $v0, $a0, 3 /* 36661C E00665EC 00822021 */ addu $a0, $a0, $v0 /* 366620 E00665F0 000420C0 */ sll $a0, $a0, 3 /* 366624 E00665F4 3C02800B */ lui $v0, %hi(gCameras + 0xD4) /* 366628 E00665F8 24421E54 */ addiu $v0, $v0, %lo(gCameras + 0xD4) /* 36662C E00665FC E7B40010 */ swc1 $f20, 0x10($sp) /* 366630 E0066600 8E050004 */ lw $a1, 0x4($s0) /* 366634 E0066604 8E060008 */ lw $a2, 0x8($s0) /* 366638 E0066608 8E07000C */ lw $a3, 0xC($s0) /* 36663C E006660C 0C080168 */ jal shim_transform_point /* 366640 E0066610 00822021 */ addu $a0, $a0, $v0 /* 366644 E0066614 C7A00034 */ lwc1 $f0, 0x34($sp) /* 366648 E0066618 C7A40028 */ lwc1 $f4, 0x28($sp) /* 36664C E006661C 4600A503 */ div.s $f20, $f20, $f0 /* 366650 E0066620 46142102 */ mul.s $f4, $f4, $f20 /* 366654 E0066624 00000000 */ nop /* 366658 E0066628 C7A0002C */ lwc1 $f0, 0x2C($sp) /* 36665C E006662C 46140002 */ mul.s $f0, $f0, $f20 /* 366660 E0066630 00000000 */ nop /* 366664 E0066634 C7A20030 */ lwc1 $f2, 0x30($sp) /* 366668 E0066638 46141082 */ mul.s $f2, $f2, $f20 /* 36666C E006663C 00000000 */ nop /* 366670 E0066640 AE000018 */ sw $zero, 0x18($s0) /* 366674 E0066644 E6040010 */ swc1 $f4, 0x10($s0) /* 366678 E0066648 E6000014 */ swc1 $f0, 0x14($s0) /* 36667C E006664C 8E220008 */ lw $v0, 0x8($s1) /* 366680 E0066650 0000202D */ daddu $a0, $zero, $zero /* 366684 E0066654 E7B40034 */ swc1 $f20, 0x34($sp) /* 366688 E0066658 E7A40028 */ swc1 $f4, 0x28($sp) /* 36668C E006665C E7A0002C */ swc1 $f0, 0x2C($sp) /* 366690 E0066660 1840002C */ blez $v0, .LE0066714 /* 366694 E0066664 E7A20030 */ swc1 $f2, 0x30($sp) /* 366698 E0066668 26030048 */ addiu $v1, $s0, 0x48 /* 36669C E006666C C60E0018 */ lwc1 $f14, 0x18($s0) /* 3666A0 E0066670 3C014400 */ lui $at, (0x44000000 >> 16) /* 3666A4 E0066674 44816000 */ mtc1 $at, $f12 .LE0066678: /* 3666A8 E0066678 C4620010 */ lwc1 $f2, 0x10($v1) /* 3666AC E006667C C4600014 */ lwc1 $f0, 0x14($v1) /* 3666B0 E0066680 C4680008 */ lwc1 $f8, 0x8($v1) /* 3666B4 E0066684 C464FFF8 */ lwc1 $f4, -0x8($v1) /* 3666B8 E0066688 46001080 */ add.s $f2, $f2, $f0 /* 3666BC E006668C C460000C */ lwc1 $f0, 0xC($v1) /* 3666C0 E0066690 C46AFFE8 */ lwc1 $f10, -0x18($v1) /* 3666C4 E0066694 46004200 */ add.s $f8, $f8, $f0 /* 3666C8 E0066698 C460FFFC */ lwc1 $f0, -0x4($v1) /* 3666CC E006669C C466FFF0 */ lwc1 $f6, -0x10($v1) /* 3666D0 E00666A0 46002100 */ add.s $f4, $f4, $f0 /* 3666D4 E00666A4 C460FFEC */ lwc1 $f0, -0x14($v1) /* 3666D8 E00666A8 E4620010 */ swc1 $f2, 0x10($v1) /* 3666DC E00666AC 46005280 */ add.s $f10, $f10, $f0 /* 3666E0 E00666B0 C462FFF4 */ lwc1 $f2, -0xC($v1) /* 3666E4 E00666B4 46023180 */ add.s $f6, $f6, $f2 /* 3666E8 E00666B8 C4600000 */ lwc1 $f0, 0x0($v1) /* 3666EC E00666BC C4620004 */ lwc1 $f2, 0x4($v1) /* 3666F0 E00666C0 46020000 */ add.s $f0, $f0, $f2 /* 3666F4 E00666C4 E4680008 */ swc1 $f8, 0x8($v1) /* 3666F8 E00666C8 460E203C */ c.lt.s $f4, $f14 /* 3666FC E00666CC E464FFF8 */ swc1 $f4, -0x8($v1) /* 366700 E00666D0 E46AFFE8 */ swc1 $f10, -0x18($v1) /* 366704 E00666D4 E466FFF0 */ swc1 $f6, -0x10($v1) /* 366708 E00666D8 45000003 */ bc1f .LE00666E8 /* 36670C E00666DC E4600000 */ swc1 $f0, 0x0($v1) /* 366710 E00666E0 460C2000 */ add.s $f0, $f4, $f12 /* 366714 E00666E4 E460FFF8 */ swc1 $f0, -0x8($v1) .LE00666E8: /* 366718 E00666E8 C4600000 */ lwc1 $f0, 0x0($v1) /* 36671C E00666EC 460E003C */ c.lt.s $f0, $f14 /* 366720 E00666F0 00000000 */ nop /* 366724 E00666F4 45000003 */ bc1f .LE0066704 /* 366728 E00666F8 24840001 */ addiu $a0, $a0, 0x1 /* 36672C E00666FC 460C0000 */ add.s $f0, $f0, $f12 /* 366730 E0066700 E4600000 */ swc1 $f0, 0x0($v1) .LE0066704: /* 366734 E0066704 8E220008 */ lw $v0, 0x8($s1) /* 366738 E0066708 0082102A */ slt $v0, $a0, $v0 /* 36673C E006670C 1440FFDA */ bnez $v0, .LE0066678 /* 366740 E0066710 24630070 */ addiu $v1, $v1, 0x70 .LE0066714: /* 366744 E0066714 8FBF0040 */ lw $ra, 0x40($sp) /* 366748 E0066718 8FB1003C */ lw $s1, 0x3C($sp) /* 36674C E006671C 8FB00038 */ lw $s0, 0x38($sp) /* 366750 E0066720 D7B40048 */ ldc1 $f20, 0x48($sp) /* 366754 E0066724 03E00008 */ jr $ra /* 366758 E0066728 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void radial_shimmer_update(EffectInstance* effect) { RadialShimmerFXData* part = effect->data.radialShimmer; s32 unk_28; f32 outX; f32 outY; f32 outZ; f32 outS; s32 i; part->timeLeft--; part->lifeTime++; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; part->timeLeft = 16; } if (part->timeLeft < 0) { shim_remove_effect(effect); return; } unk_28 = part->timeLeft; if (part->lifeTime <= 10) { part->unk_24 = (part->lifeTime * 255) / 10; } if (unk_28 < 6) { part->unk_24 = (unk_28 * 255) / 6; } if (unk_28 < 10 && part->unk_00 == 4) { part->unk_1C *= 0.7; } part->unk_1C = part->unk_20; shim_transform_point(&gCameras[gCurrentCameraID].perspectiveMatrix[0], part->unk_04, part->unk_08, part->unk_0C, 1.0f, &outX, &outY, &outZ, &outS); outS = 1.0f / outS; outX *= outS; outY *= outS; outZ *= outS; part->unk_10 = outX; part->unk_14 = outY; part->unk_18 = 0.0f; for (i = 0; i < effect->numParts; i++, part++) { part->unk_58 += part->unk_5C; part->unk_50 += part->unk_54; part->unk_40 += part->unk_44; part->unk_30 += part->unk_34; part->unk_38 += part->unk_3C; part->unk_48 += part->unk_4C; if (part->unk_40 < 0.0f) { part->unk_40 += 512.0f; } if (part->unk_48 < 0.0f) { part->unk_48 += 512.0f; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel player_raycast_down /* 779FC 800DE54C 27BDFF78 */ addiu $sp, $sp, -0x88 /* 77A00 800DE550 AFB20060 */ sw $s2, 0x60($sp) /* 77A04 800DE554 0080902D */ daddu $s2, $a0, $zero /* 77A08 800DE558 AFB30064 */ sw $s3, 0x64($sp) /* 77A0C 800DE55C 00A0982D */ daddu $s3, $a1, $zero /* 77A10 800DE560 AFB40068 */ sw $s4, 0x68($sp) /* 77A14 800DE564 00C0A02D */ daddu $s4, $a2, $zero /* 77A18 800DE568 AFB5006C */ sw $s5, 0x6C($sp) /* 77A1C 800DE56C 00E0A82D */ daddu $s5, $a3, $zero /* 77A20 800DE570 AFBF0070 */ sw $ra, 0x70($sp) /* 77A24 800DE574 AFB1005C */ sw $s1, 0x5C($sp) /* 77A28 800DE578 AFB00058 */ sw $s0, 0x58($sp) /* 77A2C 800DE57C F7B60080 */ sdc1 $f22, 0x80($sp) /* 77A30 800DE580 F7B40078 */ sdc1 $f20, 0x78($sp) /* 77A34 800DE584 C6A20000 */ lwc1 $f2, 0x0($s5) /* 77A38 800DE588 44802000 */ mtc1 $zero, $f4 /* 77A3C 800DE58C 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 77A40 800DE590 44810000 */ mtc1 $at, $f0 /* 77A44 800DE594 27A20038 */ addiu $v0, $sp, 0x38 /* 77A48 800DE598 E7A20044 */ swc1 $f2, 0x44($sp) /* 77A4C 800DE59C AFA20018 */ sw $v0, 0x18($sp) /* 77A50 800DE5A0 27A2003C */ addiu $v0, $sp, 0x3C /* 77A54 800DE5A4 AFA2001C */ sw $v0, 0x1C($sp) /* 77A58 800DE5A8 27A20040 */ addiu $v0, $sp, 0x40 /* 77A5C 800DE5AC AFA20020 */ sw $v0, 0x20($sp) /* 77A60 800DE5B0 27A20044 */ addiu $v0, $sp, 0x44 /* 77A64 800DE5B4 AFA20024 */ sw $v0, 0x24($sp) /* 77A68 800DE5B8 27A20048 */ addiu $v0, $sp, 0x48 /* 77A6C 800DE5BC AFA20028 */ sw $v0, 0x28($sp) /* 77A70 800DE5C0 27A2004C */ addiu $v0, $sp, 0x4C /* 77A74 800DE5C4 AFA2002C */ sw $v0, 0x2C($sp) /* 77A78 800DE5C8 27A20050 */ addiu $v0, $sp, 0x50 /* 77A7C 800DE5CC E7A00010 */ swc1 $f0, 0x10($sp) /* 77A80 800DE5D0 E7A40014 */ swc1 $f4, 0x14($sp) /* 77A84 800DE5D4 AFA20030 */ sw $v0, 0x30($sp) /* 77A88 800DE5D8 C64C0000 */ lwc1 $f12, 0x0($s2) /* 77A8C 800DE5DC C66E0000 */ lwc1 $f14, 0x0($s3) /* 77A90 800DE5E0 8E860000 */ lw $a2, 0x0($s4) /* 77A94 800DE5E4 44072000 */ mfc1 $a3, $f4 /* 77A98 800DE5E8 0C017512 */ jal test_ray_entities /* 77A9C 800DE5EC 2411FFFF */ addiu $s1, $zero, -0x1 /* 77AA0 800DE5F0 0040802D */ daddu $s0, $v0, $zero /* 77AA4 800DE5F4 0600000E */ bltz $s0, .L800DE630 /* 77AA8 800DE5F8 00000000 */ nop /* 77AAC 800DE5FC 0C04417A */ jal get_entity_by_index /* 77AB0 800DE600 0200202D */ daddu $a0, $s0, $zero /* 77AB4 800DE604 0040202D */ daddu $a0, $v0, $zero /* 77AB8 800DE608 9082000B */ lbu $v0, 0xB($a0) /* 77ABC 800DE60C 2C4200FF */ sltiu $v0, $v0, 0xFF /* 77AC0 800DE610 10400006 */ beqz $v0, .L800DE62C /* 77AC4 800DE614 24030004 */ addiu $v1, $zero, 0x4 /* 77AC8 800DE618 8C820000 */ lw $v0, 0x0($a0) /* 77ACC 800DE61C A0830007 */ sb $v1, 0x7($a0) /* 77AD0 800DE620 34420040 */ ori $v0, $v0, 0x40 /* 77AD4 800DE624 0803798C */ j .L800DE630 /* 77AD8 800DE628 AC820000 */ sw $v0, 0x0($a0) .L800DE62C: /* 77ADC 800DE62C 36114000 */ ori $s1, $s0, 0x4000 .L800DE630: /* 77AE0 800DE630 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 77AE4 800DE634 44810000 */ mtc1 $at, $f0 /* 77AE8 800DE638 27A20038 */ addiu $v0, $sp, 0x38 /* 77AEC 800DE63C AFA2001C */ sw $v0, 0x1C($sp) /* 77AF0 800DE640 27A2003C */ addiu $v0, $sp, 0x3C /* 77AF4 800DE644 AFA20020 */ sw $v0, 0x20($sp) /* 77AF8 800DE648 27A20040 */ addiu $v0, $sp, 0x40 /* 77AFC 800DE64C AFA20024 */ sw $v0, 0x24($sp) /* 77B00 800DE650 27A20044 */ addiu $v0, $sp, 0x44 /* 77B04 800DE654 AFA20028 */ sw $v0, 0x28($sp) /* 77B08 800DE658 27A20048 */ addiu $v0, $sp, 0x48 /* 77B0C 800DE65C AFA2002C */ sw $v0, 0x2C($sp) /* 77B10 800DE660 27A2004C */ addiu $v0, $sp, 0x4C /* 77B14 800DE664 AFA20030 */ sw $v0, 0x30($sp) /* 77B18 800DE668 27A20050 */ addiu $v0, $sp, 0x50 /* 77B1C 800DE66C AFA00010 */ sw $zero, 0x10($sp) /* 77B20 800DE670 AFA00018 */ sw $zero, 0x18($sp) /* 77B24 800DE674 AFA20034 */ sw $v0, 0x34($sp) /* 77B28 800DE678 E7A00014 */ swc1 $f0, 0x14($sp) /* 77B2C 800DE67C 8E660000 */ lw $a2, 0x0($s3) /* 77B30 800DE680 8E870000 */ lw $a3, 0x0($s4) /* 77B34 800DE684 8E450000 */ lw $a1, 0x0($s2) /* 77B38 800DE688 0C017334 */ jal test_ray_colliders /* 77B3C 800DE68C 3C040001 */ lui $a0, (0x10000 >> 16) /* 77B40 800DE690 04430001 */ bgezl $v0, .L800DE698 /* 77B44 800DE694 0040882D */ daddu $s1, $v0, $zero .L800DE698: /* 77B48 800DE698 06200041 */ bltz $s1, .L800DE7A0 /* 77B4C 800DE69C 00000000 */ nop /* 77B50 800DE6A0 C7A00044 */ lwc1 $f0, 0x44($sp) /* 77B54 800DE6A4 E6A00000 */ swc1 $f0, 0x0($s5) /* 77B58 800DE6A8 C7A00038 */ lwc1 $f0, 0x38($sp) /* 77B5C 800DE6AC E6400000 */ swc1 $f0, 0x0($s2) /* 77B60 800DE6B0 C7A0003C */ lwc1 $f0, 0x3C($sp) /* 77B64 800DE6B4 E6600000 */ swc1 $f0, 0x0($s3) /* 77B68 800DE6B8 C7A00040 */ lwc1 $f0, 0x40($sp) /* 77B6C 800DE6BC 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 77B70 800DE6C0 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 77B74 800DE6C4 E6800000 */ swc1 $f0, 0x0($s4) /* 77B78 800DE6C8 8E020000 */ lw $v0, 0x0($s0) /* 77B7C 800DE6CC C7A00048 */ lwc1 $f0, 0x48($sp) /* 77B80 800DE6D0 C7A2004C */ lwc1 $f2, 0x4C($sp) /* 77B84 800DE6D4 C7A40050 */ lwc1 $f4, 0x50($sp) /* 77B88 800DE6D8 E4400128 */ swc1 $f0, 0x128($v0) /* 77B8C 800DE6DC E442012C */ swc1 $f2, 0x12C($v0) /* 77B90 800DE6E0 0C00A788 */ jal get_player_normal_yaw /* 77B94 800DE6E4 E4440130 */ swc1 $f4, 0x130($v0) /* 77B98 800DE6E8 3C018011 */ lui $at, %hi(D_8010C938) /* 77B9C 800DE6EC E420C938 */ swc1 $f0, %lo(D_8010C938)($at) /* 77BA0 800DE6F0 0C00A794 */ jal get_player_normal_pitch /* 77BA4 800DE6F4 00000000 */ nop /* 77BA8 800DE6F8 C7A40050 */ lwc1 $f4, 0x50($sp) /* 77BAC 800DE6FC 3C014059 */ lui $at, (0x40590000 >> 16) /* 77BB0 800DE700 4481A800 */ mtc1 $at, $f21 /* 77BB4 800DE704 4480A000 */ mtc1 $zero, $f20 /* 77BB8 800DE708 46002121 */ cvt.d.s $f4, $f4 /* 77BBC 800DE70C 46342102 */ mul.d $f4, $f4, $f20 /* 77BC0 800DE710 00000000 */ nop /* 77BC4 800DE714 C7A2004C */ lwc1 $f2, 0x4C($sp) /* 77BC8 800DE718 460010A1 */ cvt.d.s $f2, $f2 /* 77BCC 800DE71C 46341082 */ mul.d $f2, $f2, $f20 /* 77BD0 800DE720 00000000 */ nop /* 77BD4 800DE724 4480B000 */ mtc1 $zero, $f22 /* 77BD8 800DE728 3C018011 */ lui $at, %hi(D_8010C990) /* 77BDC 800DE72C E420C990 */ swc1 $f0, %lo(D_8010C990)($at) /* 77BE0 800DE730 4600B306 */ mov.s $f12, $f22 /* 77BE4 800DE734 46202120 */ cvt.s.d $f4, $f4 /* 77BE8 800DE738 462010A0 */ cvt.s.d $f2, $f2 /* 77BEC 800DE73C 44062000 */ mfc1 $a2, $f4 /* 77BF0 800DE740 44071000 */ mfc1 $a3, $f2 /* 77BF4 800DE744 0C00A720 */ jal atan2 /* 77BF8 800DE748 4600B386 */ mov.s $f14, $f22 /* 77BFC 800DE74C C7A40048 */ lwc1 $f4, 0x48($sp) /* 77C00 800DE750 46002121 */ cvt.d.s $f4, $f4 /* 77C04 800DE754 46342102 */ mul.d $f4, $f4, $f20 /* 77C08 800DE758 00000000 */ nop /* 77C0C 800DE75C C7A2004C */ lwc1 $f2, 0x4C($sp) /* 77C10 800DE760 460010A1 */ cvt.d.s $f2, $f2 /* 77C14 800DE764 46341082 */ mul.d $f2, $f2, $f20 /* 77C18 800DE768 00000000 */ nop /* 77C1C 800DE76C 4600B306 */ mov.s $f12, $f22 /* 77C20 800DE770 8E020000 */ lw $v0, 0x0($s0) /* 77C24 800DE774 46202120 */ cvt.s.d $f4, $f4 /* 77C28 800DE778 462010A0 */ cvt.s.d $f2, $f2 /* 77C2C 800DE77C 44062000 */ mfc1 $a2, $f4 /* 77C30 800DE780 44071000 */ mfc1 $a3, $f2 /* 77C34 800DE784 46006386 */ mov.s $f14, $f12 /* 77C38 800DE788 E440011C */ swc1 $f0, 0x11C($v0) /* 77C3C 800DE78C 0C00A720 */ jal atan2 /* 77C40 800DE790 E44C0120 */ swc1 $f12, 0x120($v0) /* 77C44 800DE794 8E020000 */ lw $v0, 0x0($s0) /* 77C48 800DE798 080379ED */ j .L800DE7B4 /* 77C4C 800DE79C E4400124 */ swc1 $f0, 0x124($v0) .L800DE7A0: /* 77C50 800DE7A0 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 77C54 800DE7A4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 77C58 800DE7A8 AC40011C */ sw $zero, 0x11C($v0) /* 77C5C 800DE7AC AC400120 */ sw $zero, 0x120($v0) /* 77C60 800DE7B0 AC400124 */ sw $zero, 0x124($v0) .L800DE7B4: /* 77C64 800DE7B4 0220102D */ daddu $v0, $s1, $zero /* 77C68 800DE7B8 8FBF0070 */ lw $ra, 0x70($sp) /* 77C6C 800DE7BC 8FB5006C */ lw $s5, 0x6C($sp) /* 77C70 800DE7C0 8FB40068 */ lw $s4, 0x68($sp) /* 77C74 800DE7C4 8FB30064 */ lw $s3, 0x64($sp) /* 77C78 800DE7C8 8FB20060 */ lw $s2, 0x60($sp) /* 77C7C 800DE7CC 8FB1005C */ lw $s1, 0x5C($sp) /* 77C80 800DE7D0 8FB00058 */ lw $s0, 0x58($sp) /* 77C84 800DE7D4 D7B60080 */ ldc1 $f22, 0x80($sp) /* 77C88 800DE7D8 D7B40078 */ ldc1 $f20, 0x78($sp) /* 77C8C 800DE7DC 03E00008 */ jr $ra /* 77C90 800DE7E0 27BD0088 */ addiu $sp, $sp, 0x88 ### DECOMPILED C INSTRUCTIONS: s32 player_raycast_down(f32* x, f32* y, f32* z, f32* length) { f32 hitX; f32 hitY; f32 hitZ; f32 hitDepth; f32 hitNx; f32 hitNy; f32 hitNz; s32 entityID, colliderID; Entity* entity; s32 ret = NO_COLLIDER; hitDepth = *length; entityID = test_ray_entities(*x, *y, *z, 0.0f, -1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); if (entityID >= 0) { entity = get_entity_by_index(entityID); if (entity->alpha < 255) { entity->collisionTimer = 4; entity->flags |= ENTITY_FLAG_CONTINUOUS_COLLISION; } else { ret = entityID | COLLISION_WITH_ENTITY_BIT; } } colliderID = test_ray_colliders(0x10000, *x, *y, *z, 0, -1.0f, 0, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); if (colliderID >= 0) { ret = colliderID; } if (ret >= 0) { *length = hitDepth; *x = hitX; *y = hitY; *z = hitZ; gGameStatusPtr->playerGroundTraceNormal.x = hitNx; gGameStatusPtr->playerGroundTraceNormal.y = hitNy; gGameStatusPtr->playerGroundTraceNormal.z = hitNz; D_8010C938 = get_player_normal_yaw(); D_8010C990 = get_player_normal_pitch(); gGameStatusPtr->playerGroundTraceAngles.x = atan2(0.0f, 0.0f, hitNz * 100.0, hitNy * 100.0); gGameStatusPtr->playerGroundTraceAngles.y = 0.0f; gGameStatusPtr->playerGroundTraceAngles.z = atan2(0.0f, 0.0f, hitNx * 100.0, hitNy * 100.0); } else { gGameStatusPtr->playerGroundTraceAngles.x = 0.0f; gGameStatusPtr->playerGroundTraceAngles.y = 0.0f; gGameStatusPtr->playerGroundTraceAngles.z = 0.0f; } return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel dust_main /* 33E8C0 E002A000 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 33E8C4 E002A004 F7B40040 */ sdc1 $f20, 0x40($sp) /* 33E8C8 E002A008 4485A000 */ mtc1 $a1, $f20 /* 33E8CC E002A00C AFB40038 */ sw $s4, 0x38($sp) /* 33E8D0 E002A010 0080A02D */ daddu $s4, $a0, $zero /* 33E8D4 E002A014 AFB20030 */ sw $s2, 0x30($sp) /* 33E8D8 E002A018 24120004 */ addiu $s2, $zero, 0x4 /* 33E8DC E002A01C F7B60048 */ sdc1 $f22, 0x48($sp) /* 33E8E0 E002A020 4486B000 */ mtc1 $a2, $f22 /* 33E8E4 E002A024 27A40010 */ addiu $a0, $sp, 0x10 /* 33E8E8 E002A028 F7B80050 */ sdc1 $f24, 0x50($sp) /* 33E8EC E002A02C 4487C000 */ mtc1 $a3, $f24 /* 33E8F0 E002A030 2A820002 */ slti $v0, $s4, 0x2 /* 33E8F4 E002A034 AFBF003C */ sw $ra, 0x3C($sp) /* 33E8F8 E002A038 AFB30034 */ sw $s3, 0x34($sp) /* 33E8FC E002A03C AFB1002C */ sw $s1, 0x2C($sp) /* 33E900 E002A040 10400002 */ beqz $v0, .LE002A04C /* 33E904 E002A044 AFB00028 */ sw $s0, 0x28($sp) /* 33E908 E002A048 24120005 */ addiu $s2, $zero, 0x5 .LE002A04C: /* 33E90C E002A04C 3C02E003 */ lui $v0, %hi(dust_init) /* 33E910 E002A050 2442A284 */ addiu $v0, $v0, %lo(dust_init) /* 33E914 E002A054 AFA20018 */ sw $v0, 0x18($sp) /* 33E918 E002A058 3C02E003 */ lui $v0, %hi(dust_update) /* 33E91C E002A05C 2442A28C */ addiu $v0, $v0, %lo(dust_update) /* 33E920 E002A060 AFA2001C */ sw $v0, 0x1C($sp) /* 33E924 E002A064 3C02E003 */ lui $v0, %hi(dust_render) /* 33E928 E002A068 2442A380 */ addiu $v0, $v0, %lo(dust_render) /* 33E92C E002A06C AFA20020 */ sw $v0, 0x20($sp) /* 33E930 E002A070 24020015 */ addiu $v0, $zero, 0x15 /* 33E934 E002A074 AFA00010 */ sw $zero, 0x10($sp) /* 33E938 E002A078 AFA00024 */ sw $zero, 0x24($sp) /* 33E93C E002A07C 0C080124 */ jal shim_create_effect_instance /* 33E940 E002A080 AFA20014 */ sw $v0, 0x14($sp) /* 33E944 E002A084 001220C0 */ sll $a0, $s2, 3 /* 33E948 E002A088 00922021 */ addu $a0, $a0, $s2 /* 33E94C E002A08C 000420C0 */ sll $a0, $a0, 3 /* 33E950 E002A090 0040982D */ daddu $s3, $v0, $zero /* 33E954 E002A094 0C08012C */ jal shim_general_heap_malloc /* 33E958 E002A098 AE720008 */ sw $s2, 0x8($s3) /* 33E95C E002A09C 0040202D */ daddu $a0, $v0, $zero /* 33E960 E002A0A0 14800003 */ bnez $a0, .LE002A0B0 /* 33E964 E002A0A4 AE64000C */ sw $a0, 0xC($s3) .LE002A0A8: /* 33E968 E002A0A8 0800A82A */ j .LE002A0A8 /* 33E96C E002A0AC 00000000 */ nop .LE002A0B0: /* 33E970 E002A0B0 2403008C */ addiu $v1, $zero, 0x8C /* 33E974 E002A0B4 AC940000 */ sw $s4, 0x0($a0) /* 33E978 E002A0B8 E4940004 */ swc1 $f20, 0x4($a0) /* 33E97C E002A0BC E4960008 */ swc1 $f22, 0x8($a0) /* 33E980 E002A0C0 E498000C */ swc1 $f24, 0xC($a0) /* 33E984 E002A0C4 8FA20068 */ lw $v0, 0x68($sp) /* 33E988 E002A0C8 24110001 */ addiu $s1, $zero, 0x1 /* 33E98C E002A0CC AC830038 */ sw $v1, 0x38($a0) /* 33E990 E002A0D0 AC830044 */ sw $v1, 0x44($a0) /* 33E994 E002A0D4 AC82002C */ sw $v0, 0x2C($a0) /* 33E998 E002A0D8 240200FF */ addiu $v0, $zero, 0xFF /* 33E99C E002A0DC AC820018 */ sw $v0, 0x18($a0) /* 33E9A0 E002A0E0 240200A0 */ addiu $v0, $zero, 0xA0 /* 33E9A4 E002A0E4 AC820030 */ sw $v0, 0x30($a0) /* 33E9A8 E002A0E8 AC820034 */ sw $v0, 0x34($a0) /* 33E9AC E002A0EC AC82003C */ sw $v0, 0x3C($a0) /* 33E9B0 E002A0F0 AC820040 */ sw $v0, 0x40($a0) /* 33E9B4 E002A0F4 0232102A */ slt $v0, $s1, $s2 /* 33E9B8 E002A0F8 10400056 */ beqz $v0, .LE002A254 /* 33E9BC E002A0FC 24840048 */ addiu $a0, $a0, 0x48 /* 33E9C0 E002A100 24900008 */ addiu $s0, $a0, 0x8 /* 33E9C4 E002A104 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 33E9C8 E002A108 4481C000 */ mtc1 $at, $f24 /* 33E9CC E002A10C 3C01E003 */ lui $at, (0xE0030000 >> 16) /* 33E9D0 E002A110 D434A720 */ ldc1 $f20, -0x58E0($at) /* 33E9D4 E002A114 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) /* 33E9D8 E002A118 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) /* 33E9DC E002A11C 4481B000 */ mtc1 $at, $f22 .LE002A120: /* 33E9E0 E002A120 0C080138 */ jal shim_rand_int /* 33E9E4 E002A124 240400C8 */ addiu $a0, $zero, 0xC8 /* 33E9E8 E002A128 24040032 */ addiu $a0, $zero, 0x32 /* 33E9EC E002A12C 2442FF9C */ addiu $v0, $v0, -0x64 /* 33E9F0 E002A130 44820000 */ mtc1 $v0, $f0 /* 33E9F4 E002A134 00000000 */ nop /* 33E9F8 E002A138 46800020 */ cvt.s.w $f0, $f0 /* 33E9FC E002A13C 0C080138 */ jal shim_rand_int /* 33EA00 E002A140 E600FFFC */ swc1 $f0, -0x4($s0) /* 33EA04 E002A144 2404000A */ addiu $a0, $zero, 0xA /* 33EA08 E002A148 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 33EA0C E002A14C 44811000 */ mtc1 $at, $f2 /* 33EA10 E002A150 44820000 */ mtc1 $v0, $f0 /* 33EA14 E002A154 00000000 */ nop /* 33EA18 E002A158 46800020 */ cvt.s.w $f0, $f0 /* 33EA1C E002A15C E6000000 */ swc1 $f0, 0x0($s0) /* 33EA20 E002A160 AE000004 */ sw $zero, 0x4($s0) /* 33EA24 E002A164 AE00000C */ sw $zero, 0xC($s0) /* 33EA28 E002A168 E6180014 */ swc1 $f24, 0x14($s0) /* 33EA2C E002A16C E6180018 */ swc1 $f24, 0x18($s0) /* 33EA30 E002A170 0C080138 */ jal shim_rand_int /* 33EA34 E002A174 E6020008 */ swc1 $f2, 0x8($s0) /* 33EA38 E002A178 3C0351EB */ lui $v1, (0x51EB851F >> 16) /* 33EA3C E002A17C 3463851F */ ori $v1, $v1, (0x51EB851F & 0xFFFF) /* 33EA40 E002A180 00430018 */ mult $v0, $v1 /* 33EA44 E002A184 000217C3 */ sra $v0, $v0, 31 /* 33EA48 E002A188 00004010 */ mfhi $t0 /* 33EA4C E002A18C 00081983 */ sra $v1, $t0, 6 /* 33EA50 E002A190 00621823 */ subu $v1, $v1, $v0 /* 33EA54 E002A194 44830000 */ mtc1 $v1, $f0 /* 33EA58 E002A198 00000000 */ nop /* 33EA5C E002A19C 46800020 */ cvt.s.w $f0, $f0 /* 33EA60 E002A1A0 12800006 */ beqz $s4, .LE002A1BC /* 33EA64 E002A1A4 E600001C */ swc1 $f0, 0x1C($s0) /* 33EA68 E002A1A8 24020001 */ addiu $v0, $zero, 0x1 /* 33EA6C E002A1AC 12820008 */ beq $s4, $v0, .LE002A1D0 /* 33EA70 E002A1B0 24040028 */ addiu $a0, $zero, 0x28 /* 33EA74 E002A1B4 0800A87C */ j .LE002A1F0 /* 33EA78 E002A1B8 E616001C */ swc1 $f22, 0x1C($s0) .LE002A1BC: /* 33EA7C E002A1BC 46000021 */ cvt.d.s $f0, $f0 /* 33EA80 E002A1C0 46340002 */ mul.d $f0, $f0, $f20 /* 33EA84 E002A1C4 00000000 */ nop /* 33EA88 E002A1C8 0800A87A */ j .LE002A1E8 /* 33EA8C E002A1CC 46200020 */ cvt.s.d $f0, $f0 .LE002A1D0: /* 33EA90 E002A1D0 3C01E003 */ lui $at, (0xE0030000 >> 16) /* 33EA94 E002A1D4 D422A728 */ ldc1 $f2, -0x58D8($at) /* 33EA98 E002A1D8 46000021 */ cvt.d.s $f0, $f0 /* 33EA9C E002A1DC 46220002 */ mul.d $f0, $f0, $f2 /* 33EAA0 E002A1E0 00000000 */ nop /* 33EAA4 E002A1E4 46200020 */ cvt.s.d $f0, $f0 .LE002A1E8: /* 33EAA8 E002A1E8 0800A891 */ j .LE002A244 /* 33EAAC E002A1EC E6000020 */ swc1 $f0, 0x20($s0) .LE002A1F0: /* 33EAB0 E002A1F0 E6160020 */ swc1 $f22, 0x20($s0) /* 33EAB4 E002A1F4 0C080138 */ jal shim_rand_int /* 33EAB8 E002A1F8 AE000008 */ sw $zero, 0x8($s0) /* 33EABC E002A1FC 2442FFEC */ addiu $v0, $v0, -0x14 /* 33EAC0 E002A200 44820000 */ mtc1 $v0, $f0 /* 33EAC4 E002A204 00000000 */ nop /* 33EAC8 E002A208 46800021 */ cvt.d.w $f0, $f0 /* 33EACC E002A20C 46340002 */ mul.d $f0, $f0, $f20 /* 33EAD0 E002A210 00000000 */ nop /* 33EAD4 E002A214 24040028 */ addiu $a0, $zero, 0x28 /* 33EAD8 E002A218 46200020 */ cvt.s.d $f0, $f0 /* 33EADC E002A21C 0C080138 */ jal shim_rand_int /* 33EAE0 E002A220 E600FFFC */ swc1 $f0, -0x4($s0) /* 33EAE4 E002A224 2442FFEC */ addiu $v0, $v0, -0x14 /* 33EAE8 E002A228 44820000 */ mtc1 $v0, $f0 /* 33EAEC E002A22C 00000000 */ nop /* 33EAF0 E002A230 46800021 */ cvt.d.w $f0, $f0 /* 33EAF4 E002A234 46340002 */ mul.d $f0, $f0, $f20 /* 33EAF8 E002A238 00000000 */ nop /* 33EAFC E002A23C 46200020 */ cvt.s.d $f0, $f0 /* 33EB00 E002A240 E6000000 */ swc1 $f0, 0x0($s0) .LE002A244: /* 33EB04 E002A244 26310001 */ addiu $s1, $s1, 0x1 /* 33EB08 E002A248 0232102A */ slt $v0, $s1, $s2 /* 33EB0C E002A24C 1440FFB4 */ bnez $v0, .LE002A120 /* 33EB10 E002A250 26100048 */ addiu $s0, $s0, 0x48 .LE002A254: /* 33EB14 E002A254 0260102D */ daddu $v0, $s3, $zero /* 33EB18 E002A258 8FBF003C */ lw $ra, 0x3C($sp) /* 33EB1C E002A25C 8FB40038 */ lw $s4, 0x38($sp) /* 33EB20 E002A260 8FB30034 */ lw $s3, 0x34($sp) /* 33EB24 E002A264 8FB20030 */ lw $s2, 0x30($sp) /* 33EB28 E002A268 8FB1002C */ lw $s1, 0x2C($sp) /* 33EB2C E002A26C 8FB00028 */ lw $s0, 0x28($sp) /* 33EB30 E002A270 D7B80050 */ ldc1 $f24, 0x50($sp) /* 33EB34 E002A274 D7B60048 */ ldc1 $f22, 0x48($sp) /* 33EB38 E002A278 D7B40040 */ ldc1 $f20, 0x40($sp) /* 33EB3C E002A27C 03E00008 */ jr $ra /* 33EB40 E002A280 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: EffectInstance* dust_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; DustFXData* part; s32 numParts; s32 i; if (arg0 < 2) { numParts = 5; } else { numParts = 4; } bp.init = dust_init; bp.update = dust_update; bp.renderWorld = dust_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_DUST; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; part = effect->data.dust = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.dust != NULL); part->unk_00 = arg0; part->unk_04 = arg1; part->unk_08 = arg2; part->unk_0C = arg3; part->unk_2C = arg4; part->unk_18 = 255; part->unk_30 = 160; part->unk_34 = 160; part->unk_38 = 140; part->unk_3C = 160; part->unk_40 = 160; part->unk_44 = 140; part++; for (i = 1; i < numParts; i++, part++) { part->unk_04 = shim_rand_int(200) - 100; part->unk_08 = shim_rand_int(50); part->unk_0C = 0; part->unk_14 = 0; part->unk_1C = 1.0f; part->unk_20 = 1.0f; part->unk_10 = -1.0f; part->unk_24 = shim_rand_int(10) / 200; switch (arg0) { case 0: part->unk_28 = part->unk_24 * 0.1; break; case 1: part->unk_28 = part->unk_24 * 0.2; break; default: part->unk_24 = 0.4f; part->unk_28 = 0.4f; part->unk_10 = 0; part->unk_04 = (shim_rand_int(40) - 20) * 0.1; part->unk_08 = (shim_rand_int(40) - 20) * 0.1; break; } } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8025A2C4 /* 188BA4 8025A2C4 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 188BA8 8025A2C8 AFB20018 */ sw $s2, 0x18($sp) /* 188BAC 8025A2CC 0080902D */ daddu $s2, $a0, $zero /* 188BB0 8025A2D0 AFB10014 */ sw $s1, 0x14($sp) /* 188BB4 8025A2D4 00A0882D */ daddu $s1, $a1, $zero /* 188BB8 8025A2D8 AFB3001C */ sw $s3, 0x1C($sp) /* 188BBC 8025A2DC 00C0982D */ daddu $s3, $a2, $zero /* 188BC0 8025A2E0 AFBF0028 */ sw $ra, 0x28($sp) /* 188BC4 8025A2E4 AFB50024 */ sw $s5, 0x24($sp) /* 188BC8 8025A2E8 AFB40020 */ sw $s4, 0x20($sp) /* 188BCC 8025A2EC AFB00010 */ sw $s0, 0x10($sp) /* 188BD0 8025A2F0 8E3000C0 */ lw $s0, 0xC0($s1) /* 188BD4 8025A2F4 820206C1 */ lb $v0, 0x6C1($s0) /* 188BD8 8025A2F8 8FB50040 */ lw $s5, 0x40($sp) /* 188BDC 8025A2FC 10400033 */ beqz $v0, .L8025A3CC /* 188BE0 8025A300 00E0A02D */ daddu $s4, $a3, $zero /* 188BE4 8025A304 16400018 */ bnez $s2, .L8025A368 /* 188BE8 8025A308 00000000 */ nop /* 188BEC 8025A30C 0C0B7830 */ jal spr_get_player_palettes /* 188BF0 8025A310 96240088 */ lhu $a0, 0x88($s1) /* 188BF4 8025A314 AE0206D0 */ sw $v0, 0x6D0($s0) /* 188BF8 8025A318 0040202D */ daddu $a0, $v0, $zero /* 188BFC 8025A31C 24020002 */ addiu $v0, $zero, 0x2 /* 188C00 8025A320 A20206CD */ sb $v0, 0x6CD($s0) /* 188C04 8025A324 8C830008 */ lw $v1, 0x8($a0) /* 188C08 8025A328 2402FFFF */ addiu $v0, $zero, -0x1 /* 188C0C 8025A32C 50620024 */ beql $v1, $v0, .L8025A3C0 /* 188C10 8025A330 A20006C2 */ sb $zero, 0x6C2($s0) /* 188C14 8025A334 0080182D */ daddu $v1, $a0, $zero /* 188C18 8025A338 0040202D */ daddu $a0, $v0, $zero .L8025A33C: /* 188C1C 8025A33C 920206CD */ lbu $v0, 0x6CD($s0) /* 188C20 8025A340 24420001 */ addiu $v0, $v0, 0x1 /* 188C24 8025A344 A20206CD */ sb $v0, 0x6CD($s0) /* 188C28 8025A348 00021600 */ sll $v0, $v0, 24 /* 188C2C 8025A34C 00021583 */ sra $v0, $v0, 22 /* 188C30 8025A350 00431021 */ addu $v0, $v0, $v1 /* 188C34 8025A354 8C420000 */ lw $v0, 0x0($v0) /* 188C38 8025A358 1444FFF8 */ bne $v0, $a0, .L8025A33C /* 188C3C 8025A35C 00000000 */ nop /* 188C40 8025A360 080968F0 */ j .L8025A3C0 /* 188C44 8025A364 A20006C2 */ sb $zero, 0x6C2($s0) .L8025A368: /* 188C48 8025A368 96240088 */ lhu $a0, 0x88($s1) /* 188C4C 8025A36C 0C0B7A90 */ jal spr_get_npc_palettes /* 188C50 8025A370 00000000 */ nop /* 188C54 8025A374 AE0206D0 */ sw $v0, 0x6D0($s0) /* 188C58 8025A378 0040202D */ daddu $a0, $v0, $zero /* 188C5C 8025A37C A20006CD */ sb $zero, 0x6CD($s0) /* 188C60 8025A380 8C830000 */ lw $v1, 0x0($a0) /* 188C64 8025A384 2402FFFF */ addiu $v0, $zero, -0x1 /* 188C68 8025A388 5062000D */ beql $v1, $v0, .L8025A3C0 /* 188C6C 8025A38C A20006C2 */ sb $zero, 0x6C2($s0) /* 188C70 8025A390 0080182D */ daddu $v1, $a0, $zero /* 188C74 8025A394 0040202D */ daddu $a0, $v0, $zero .L8025A398: /* 188C78 8025A398 920206CD */ lbu $v0, 0x6CD($s0) /* 188C7C 8025A39C 24420001 */ addiu $v0, $v0, 0x1 /* 188C80 8025A3A0 A20206CD */ sb $v0, 0x6CD($s0) /* 188C84 8025A3A4 00021600 */ sll $v0, $v0, 24 /* 188C88 8025A3A8 00021583 */ sra $v0, $v0, 22 /* 188C8C 8025A3AC 00431021 */ addu $v0, $v0, $v1 /* 188C90 8025A3B0 8C420000 */ lw $v0, 0x0($v0) /* 188C94 8025A3B4 1444FFF8 */ bne $v0, $a0, .L8025A398 /* 188C98 8025A3B8 00000000 */ nop /* 188C9C 8025A3BC A20006C2 */ sb $zero, 0x6C2($s0) .L8025A3C0: /* 188CA0 8025A3C0 A60006CA */ sh $zero, 0x6CA($s0) /* 188CA4 8025A3C4 A60006C8 */ sh $zero, 0x6C8($s0) /* 188CA8 8025A3C8 A20006C1 */ sb $zero, 0x6C1($s0) .L8025A3CC: /* 188CAC 8025A3CC 820206CD */ lb $v0, 0x6CD($s0) /* 188CB0 8025A3D0 18400024 */ blez $v0, .L8025A464 /* 188CB4 8025A3D4 0000482D */ daddu $t1, $zero, $zero /* 188CB8 8025A3D8 0200502D */ daddu $t2, $s0, $zero .L8025A3DC: /* 188CBC 8025A3DC 8E0206D0 */ lw $v0, 0x6D0($s0) /* 188CC0 8025A3E0 00091880 */ sll $v1, $t1, 2 /* 188CC4 8025A3E4 00621821 */ addu $v1, $v1, $v0 /* 188CC8 8025A3E8 00091140 */ sll $v0, $t1, 5 /* 188CCC 8025A3EC 8C660000 */ lw $a2, 0x0($v1) /* 188CD0 8025A3F0 02023821 */ addu $a3, $s0, $v0 /* 188CD4 8025A3F4 10C00016 */ beqz $a2, .L8025A450 /* 188CD8 8025A3F8 AD4706D4 */ sw $a3, 0x6D4($t2) /* 188CDC 8025A3FC 0000402D */ daddu $t0, $zero, $zero .L8025A400: /* 188CE0 8025A400 94C20000 */ lhu $v0, 0x0($a2) /* 188CE4 8025A404 90C50001 */ lbu $a1, 0x1($a2) /* 188CE8 8025A408 24C60002 */ addiu $a2, $a2, 0x2 /* 188CEC 8025A40C 25080001 */ addiu $t0, $t0, 0x1 /* 188CF0 8025A410 000219C2 */ srl $v1, $v0, 7 /* 188CF4 8025A414 3063000F */ andi $v1, $v1, 0xF /* 188CF8 8025A418 00022082 */ srl $a0, $v0, 2 /* 188CFC 8025A41C 3084000F */ andi $a0, $a0, 0xF /* 188D00 8025A420 00021302 */ srl $v0, $v0, 12 /* 188D04 8025A424 30A50001 */ andi $a1, $a1, 0x1 /* 188D08 8025A428 000212C0 */ sll $v0, $v0, 11 /* 188D0C 8025A42C 00031980 */ sll $v1, $v1, 6 /* 188D10 8025A430 00431025 */ or $v0, $v0, $v1 /* 188D14 8025A434 00042040 */ sll $a0, $a0, 1 /* 188D18 8025A438 00441025 */ or $v0, $v0, $a0 /* 188D1C 8025A43C 00A22825 */ or $a1, $a1, $v0 /* 188D20 8025A440 A4E50000 */ sh $a1, 0x0($a3) /* 188D24 8025A444 29020010 */ slti $v0, $t0, 0x10 /* 188D28 8025A448 1440FFED */ bnez $v0, .L8025A400 /* 188D2C 8025A44C 24E70002 */ addiu $a3, $a3, 0x2 .L8025A450: /* 188D30 8025A450 820206CD */ lb $v0, 0x6CD($s0) /* 188D34 8025A454 25290001 */ addiu $t1, $t1, 0x1 /* 188D38 8025A458 0122102A */ slt $v0, $t1, $v0 /* 188D3C 8025A45C 1440FFDF */ bnez $v0, .L8025A3DC /* 188D40 8025A460 254A0004 */ addiu $t2, $t2, 0x4 .L8025A464: /* 188D44 8025A464 860206C8 */ lh $v0, 0x6C8($s0) /* 188D48 8025A468 1C400010 */ bgtz $v0, .L8025A4AC /* 188D4C 8025A46C 240300FF */ addiu $v1, $zero, 0xFF /* 188D50 8025A470 04420001 */ bltzl $v0, .L8025A478 /* 188D54 8025A474 00021023 */ negu $v0, $v0 .L8025A478: /* 188D58 8025A478 00021040 */ sll $v0, $v0, 1 /* 188D5C 8025A47C 3C018028 */ lui $at, %hi(D_802840B4) /* 188D60 8025A480 00220821 */ addu $at, $at, $v0 /* 188D64 8025A484 942240B4 */ lhu $v0, %lo(D_802840B4)($at) /* 188D68 8025A488 A6220068 */ sh $v0, 0x68($s1) /* 188D6C 8025A48C 00021400 */ sll $v0, $v0, 16 /* 188D70 8025A490 00021403 */ sra $v0, $v0, 16 /* 188D74 8025A494 14430005 */ bne $v0, $v1, .L8025A4AC /* 188D78 8025A498 2404003C */ addiu $a0, $zero, 0x3C D_8025A49C: /* 188D7C 8025A49C 0C00A67F */ jal rand_int /* 188D80 8025A4A0 A6200068 */ sh $zero, 0x68($s1) /* 188D84 8025A4A4 2442001E */ addiu $v0, $v0, 0x1E /* 188D88 8025A4A8 A60206C8 */ sh $v0, 0x6C8($s0) .L8025A4AC: /* 188D8C 8025A4AC 16A00004 */ bnez $s5, .L8025A4C0 /* 188D90 8025A4B0 00000000 */ nop /* 188D94 8025A4B4 960206C8 */ lhu $v0, 0x6C8($s0) /* 188D98 8025A4B8 2442FFFF */ addiu $v0, $v0, -0x1 /* 188D9C 8025A4BC A60206C8 */ sh $v0, 0x6C8($s0) .L8025A4C0: /* 188DA0 8025A4C0 16400006 */ bnez $s2, .L8025A4DC /* 188DA4 8025A4C4 0220202D */ daddu $a0, $s1, $zero /* 188DA8 8025A4C8 0260282D */ daddu $a1, $s3, $zero /* 188DAC 8025A4CC 0C096657 */ jal func_8025995C /* 188DB0 8025A4D0 0280302D */ daddu $a2, $s4, $zero /* 188DB4 8025A4D4 0809693A */ j .L8025A4E8 /* 188DB8 8025A4D8 00000000 */ nop .L8025A4DC: /* 188DBC 8025A4DC 0260282D */ daddu $a1, $s3, $zero /* 188DC0 8025A4E0 0C0965B0 */ jal func_802596C0 /* 188DC4 8025A4E4 0280302D */ daddu $a2, $s4, $zero .L8025A4E8: /* 188DC8 8025A4E8 8FBF0028 */ lw $ra, 0x28($sp) /* 188DCC 8025A4EC 8FB50024 */ lw $s5, 0x24($sp) /* 188DD0 8025A4F0 8FB40020 */ lw $s4, 0x20($sp) /* 188DD4 8025A4F4 8FB3001C */ lw $s3, 0x1C($sp) /* 188DD8 8025A4F8 8FB20018 */ lw $s2, 0x18($sp) /* 188DDC 8025A4FC 8FB10014 */ lw $s1, 0x14($sp) /* 188DE0 8025A500 8FB00010 */ lw $s0, 0x10($sp) /* 188DE4 8025A504 03E00008 */ jr $ra /* 188DE8 8025A508 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void render_with_fear_palettes(b32 isNpcSprite, ActorPart* part, s32 yaw, Matrix4f mtx, b32 skipAnimation) { DecorationTable* decorationTable = part->decorationTable; PAL_PTR palIn; PAL_PTR palOut; s32 i, j; s32 temp; if (decorationTable->resetPalAdjust) { if (isNpcSprite == SPRITE_MODE_PLAYER) { decorationTable->originalPalettesList = spr_get_player_palettes(part->currentAnimation >> 16); decorationTable->originalPalettesCount = 2; while ((s32)decorationTable->originalPalettesList[decorationTable->originalPalettesCount] != -1) { decorationTable->originalPalettesCount++; } } else { decorationTable->originalPalettesList = spr_get_npc_palettes(part->currentAnimation >> 16); decorationTable->originalPalettesCount = 0; while ((s32)decorationTable->originalPalettesList[decorationTable->originalPalettesCount] != -1) { decorationTable->originalPalettesCount++; } } decorationTable->palAnimState = 0; decorationTable->palBlendAlpha = 0; decorationTable->nextPalTime = 0; decorationTable->resetPalAdjust = FALSE; } for (i = 0; i < decorationTable->originalPalettesCount; i++) { palIn = decorationTable->originalPalettesList[i]; palOut = decorationTable->copiedPalettes[0][i]; decorationTable->adjustedPalettes[i] = palOut; if (palIn != NULL) { for (j = 0; j < SPR_PAL_SIZE; j++) { u8 r = UNPACK_PAL_R(*palIn); u8 g = UNPACK_PAL_G(*palIn); u8 b = UNPACK_PAL_B(*palIn); u8 a = UNPACK_PAL_A(*palIn); palIn++; // darken the color r /= 2; g /= 2; b /= 2; *palOut++ = PACK_PAL_RGBA(r, g, b, a); } } } if (decorationTable->nextPalTime <= 0) { part->palAnimPosOffset[0] = FearPaletteAnimXOffsets[abs(decorationTable->nextPalTime)]; if (part->palAnimPosOffset[0] == PAL_ANIM_END) { part->palAnimPosOffset[0] = 0; decorationTable->nextPalTime = rand_int(60) + 30; } } if (!skipAnimation) { decorationTable->nextPalTime--; } if (isNpcSprite == SPRITE_MODE_PLAYER) { func_8025995C(part, yaw, mtx); } else { func_802596C0(part, yaw, mtx); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel player_test_move_without_slipping /* 7860C 800DF15C 27BDFF60 */ addiu $sp, $sp, -0xA0 /* 78610 800DF160 AFB1006C */ sw $s1, 0x6C($sp) /* 78614 800DF164 00A0882D */ daddu $s1, $a1, $zero /* 78618 800DF168 AFB00068 */ sw $s0, 0x68($sp) /* 7861C 800DF16C 00C0802D */ daddu $s0, $a2, $zero /* 78620 800DF170 AFBF0078 */ sw $ra, 0x78($sp) /* 78624 800DF174 AFB30074 */ sw $s3, 0x74($sp) /* 78628 800DF178 AFB20070 */ sw $s2, 0x70($sp) /* 7862C 800DF17C F7BA0098 */ sdc1 $f26, 0x98($sp) /* 78630 800DF180 F7B80090 */ sdc1 $f24, 0x90($sp) /* 78634 800DF184 F7B60088 */ sdc1 $f22, 0x88($sp) /* 78638 800DF188 F7B40080 */ sdc1 $f20, 0x80($sp) /* 7863C 800DF18C 848200B2 */ lh $v0, 0xB2($a0) /* 78640 800DF190 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 78644 800DF194 44811000 */ mtc1 $at, $f2 /* 78648 800DF198 44820000 */ mtc1 $v0, $f0 /* 7864C 800DF19C 00000000 */ nop /* 78650 800DF1A0 46800020 */ cvt.s.w $f0, $f0 /* 78654 800DF1A4 46020582 */ mul.s $f22, $f0, $f2 /* 78658 800DF1A8 00000000 */ nop /* 7865C 800DF1AC 00E0902D */ daddu $s2, $a3, $zero /* 78660 800DF1B0 C7A200B4 */ lwc1 $f2, 0xB4($sp) /* 78664 800DF1B4 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 78668 800DF1B8 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 7866C 800DF1BC 44810000 */ mtc1 $at, $f0 /* 78670 800DF1C0 27A50038 */ addiu $a1, $sp, 0x38 /* 78674 800DF1C4 46001082 */ mul.s $f2, $f2, $f0 /* 78678 800DF1C8 00000000 */ nop /* 7867C 800DF1CC 27A6003C */ addiu $a2, $sp, 0x3C /* 78680 800DF1D0 848200B0 */ lh $v0, 0xB0($a0) /* 78684 800DF1D4 3C013E92 */ lui $at, (0x3E926E98 >> 16) /* 78688 800DF1D8 34216E98 */ ori $at, $at, (0x3E926E98 & 0xFFFF) /* 7868C 800DF1DC 44810000 */ mtc1 $at, $f0 /* 78690 800DF1E0 44822000 */ mtc1 $v0, $f4 /* 78694 800DF1E4 00000000 */ nop /* 78698 800DF1E8 46802120 */ cvt.s.w $f4, $f4 /* 7869C 800DF1EC 46002682 */ mul.s $f26, $f4, $f0 /* 786A0 800DF1F0 00000000 */ nop /* 786A4 800DF1F4 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 786A8 800DF1F8 44816000 */ mtc1 $at, $f12 /* 786AC 800DF1FC C7B800B0 */ lwc1 $f24, 0xB0($sp) /* 786B0 800DF200 0C00A82D */ jal sin_cos_rad /* 786B4 800DF204 460C1303 */ div.s $f12, $f2, $f12 /* 786B8 800DF208 4616C500 */ add.s $f20, $f24, $f22 /* 786BC 800DF20C C7A0003C */ lwc1 $f0, 0x3C($sp) /* 786C0 800DF210 C7A40038 */ lwc1 $f4, 0x38($sp) /* 786C4 800DF214 46000007 */ neg.s $f0, $f0 /* 786C8 800DF218 E7A0003C */ swc1 $f0, 0x3C($sp) /* 786CC 800DF21C E7B4004C */ swc1 $f20, 0x4C($sp) /* 786D0 800DF220 C6020000 */ lwc1 $f2, 0x0($s0) /* 786D4 800DF224 2413FFFF */ addiu $s3, $zero, -0x1 /* 786D8 800DF228 E7A00018 */ swc1 $f0, 0x18($sp) /* 786DC 800DF22C 3C018011 */ lui $at, %hi(D_8010BC50) /* 786E0 800DF230 D420BC50 */ ldc1 $f0, %lo(D_8010BC50)($at) /* 786E4 800DF234 27A20040 */ addiu $v0, $sp, 0x40 /* 786E8 800DF238 AFA2001C */ sw $v0, 0x1C($sp) /* 786EC 800DF23C 27A20044 */ addiu $v0, $sp, 0x44 /* 786F0 800DF240 AFA20020 */ sw $v0, 0x20($sp) /* 786F4 800DF244 27A20048 */ addiu $v0, $sp, 0x48 /* 786F8 800DF248 AFA20024 */ sw $v0, 0x24($sp) /* 786FC 800DF24C 27A2004C */ addiu $v0, $sp, 0x4C /* 78700 800DF250 AFA20028 */ sw $v0, 0x28($sp) /* 78704 800DF254 27A20050 */ addiu $v0, $sp, 0x50 /* 78708 800DF258 AFA2002C */ sw $v0, 0x2C($sp) /* 7870C 800DF25C 27A20054 */ addiu $v0, $sp, 0x54 /* 78710 800DF260 AFA20030 */ sw $v0, 0x30($sp) /* 78714 800DF264 27A20058 */ addiu $v0, $sp, 0x58 /* 78718 800DF268 E7A40010 */ swc1 $f4, 0x10($sp) /* 7871C 800DF26C AFA00014 */ sw $zero, 0x14($sp) /* 78720 800DF270 AFA20034 */ sw $v0, 0x34($sp) /* 78724 800DF274 460010A1 */ cvt.d.s $f2, $f2 /* 78728 800DF278 46201080 */ add.d $f2, $f2, $f0 /* 7872C 800DF27C 8E250000 */ lw $a1, 0x0($s1) /* 78730 800DF280 8E470000 */ lw $a3, 0x0($s2) /* 78734 800DF284 462010A0 */ cvt.s.d $f2, $f2 /* 78738 800DF288 44061000 */ mfc1 $a2, $f2 /* 7873C 800DF28C 0C037B97 */ jal player_raycast_general /* 78740 800DF290 0000202D */ daddu $a0, $zero, $zero /* 78744 800DF294 04420009 */ bltzl $v0, .L800DF2BC /* 78748 800DF298 4616C500 */ add.s $f20, $f24, $f22 /* 7874C 800DF29C C7A0004C */ lwc1 $f0, 0x4C($sp) /* 78750 800DF2A0 4614003E */ c.le.s $f0, $f20 /* 78754 800DF2A4 00000000 */ nop /* 78758 800DF2A8 45000003 */ bc1f .L800DF2B8 /* 7875C 800DF2AC 24030001 */ addiu $v1, $zero, 0x1 /* 78760 800DF2B0 8FA200B8 */ lw $v0, 0xB8($sp) /* 78764 800DF2B4 AC430000 */ sw $v1, 0x0($v0) .L800DF2B8: /* 78768 800DF2B8 4616C500 */ add.s $f20, $f24, $f22 .L800DF2BC: /* 7876C 800DF2BC C7A00038 */ lwc1 $f0, 0x38($sp) /* 78770 800DF2C0 C7A2003C */ lwc1 $f2, 0x3C($sp) /* 78774 800DF2C4 E7B4004C */ swc1 $f20, 0x4C($sp) /* 78778 800DF2C8 C6040000 */ lwc1 $f4, 0x0($s0) /* 7877C 800DF2CC 27A20040 */ addiu $v0, $sp, 0x40 /* 78780 800DF2D0 AFA2001C */ sw $v0, 0x1C($sp) /* 78784 800DF2D4 27A20044 */ addiu $v0, $sp, 0x44 /* 78788 800DF2D8 AFA20020 */ sw $v0, 0x20($sp) /* 7878C 800DF2DC 27A20048 */ addiu $v0, $sp, 0x48 /* 78790 800DF2E0 AFA20024 */ sw $v0, 0x24($sp) /* 78794 800DF2E4 27A2004C */ addiu $v0, $sp, 0x4C /* 78798 800DF2E8 AFA20028 */ sw $v0, 0x28($sp) /* 7879C 800DF2EC 27A20050 */ addiu $v0, $sp, 0x50 /* 787A0 800DF2F0 AFA2002C */ sw $v0, 0x2C($sp) /* 787A4 800DF2F4 27A20054 */ addiu $v0, $sp, 0x54 /* 787A8 800DF2F8 AFA20030 */ sw $v0, 0x30($sp) /* 787AC 800DF2FC 27A20058 */ addiu $v0, $sp, 0x58 /* 787B0 800DF300 E7A00010 */ swc1 $f0, 0x10($sp) /* 787B4 800DF304 AFA00014 */ sw $zero, 0x14($sp) /* 787B8 800DF308 E7A20018 */ swc1 $f2, 0x18($sp) /* 787BC 800DF30C AFA20034 */ sw $v0, 0x34($sp) /* 787C0 800DF310 461A2100 */ add.s $f4, $f4, $f26 /* 787C4 800DF314 8E250000 */ lw $a1, 0x0($s1) /* 787C8 800DF318 8E470000 */ lw $a3, 0x0($s2) /* 787CC 800DF31C 44062000 */ mfc1 $a2, $f4 /* 787D0 800DF320 0C037B97 */ jal player_raycast_general /* 787D4 800DF324 0000202D */ daddu $a0, $zero, $zero /* 787D8 800DF328 4480C000 */ mtc1 $zero, $f24 /* 787DC 800DF32C 0040802D */ daddu $s0, $v0, $zero /* 787E0 800DF330 06000020 */ bltz $s0, .L800DF3B4 /* 787E4 800DF334 4600C686 */ mov.s $f26, $f24 /* 787E8 800DF338 C7B6004C */ lwc1 $f22, 0x4C($sp) /* 787EC 800DF33C 4614B03E */ c.le.s $f22, $f20 /* 787F0 800DF340 00000000 */ nop /* 787F4 800DF344 4500001B */ bc1f .L800DF3B4 /* 787F8 800DF348 27A4005C */ addiu $a0, $sp, 0x5C /* 787FC 800DF34C 4614B581 */ sub.s $f22, $f22, $f20 /* 78800 800DF350 4406C000 */ mfc1 $a2, $f24 /* 78804 800DF354 C7B40038 */ lwc1 $f20, 0x38($sp) /* 78808 800DF358 4407C000 */ mfc1 $a3, $f24 /* 7880C 800DF35C C7A2003C */ lwc1 $f2, 0x3C($sp) /* 78810 800DF360 4614B502 */ mul.s $f20, $f22, $f20 /* 78814 800DF364 00000000 */ nop /* 78818 800DF368 C7A00050 */ lwc1 $f0, 0x50($sp) /* 7881C 800DF36C 27A50060 */ addiu $a1, $sp, 0x60 /* 78820 800DF370 E7A00010 */ swc1 $f0, 0x10($sp) /* 78824 800DF374 C7A00058 */ lwc1 $f0, 0x58($sp) /* 78828 800DF378 4602B582 */ mul.s $f22, $f22, $f2 /* 7882C 800DF37C 00000000 */ nop /* 78830 800DF380 0C037CFF */ jal player_get_slip_vector /* 78834 800DF384 E7A00014 */ swc1 $f0, 0x14($sp) /* 78838 800DF388 C7A0005C */ lwc1 $f0, 0x5C($sp) /* 7883C 800DF38C 4600A500 */ add.s $f20, $f20, $f0 /* 78840 800DF390 C6200000 */ lwc1 $f0, 0x0($s1) /* 78844 800DF394 46140000 */ add.s $f0, $f0, $f20 /* 78848 800DF398 E6200000 */ swc1 $f0, 0x0($s1) /* 7884C 800DF39C C7A00060 */ lwc1 $f0, 0x60($sp) /* 78850 800DF3A0 4600B580 */ add.s $f22, $f22, $f0 /* 78854 800DF3A4 C6400000 */ lwc1 $f0, 0x0($s2) /* 78858 800DF3A8 46160000 */ add.s $f0, $f0, $f22 /* 7885C 800DF3AC 0200982D */ daddu $s3, $s0, $zero /* 78860 800DF3B0 E6400000 */ swc1 $f0, 0x0($s2) .L800DF3B4: /* 78864 800DF3B4 C6200000 */ lwc1 $f0, 0x0($s1) /* 78868 800DF3B8 461A0000 */ add.s $f0, $f0, $f26 /* 7886C 800DF3BC E6200000 */ swc1 $f0, 0x0($s1) /* 78870 800DF3C0 C6400000 */ lwc1 $f0, 0x0($s2) /* 78874 800DF3C4 46180000 */ add.s $f0, $f0, $f24 /* 78878 800DF3C8 0260102D */ daddu $v0, $s3, $zero /* 7887C 800DF3CC E6400000 */ swc1 $f0, 0x0($s2) /* 78880 800DF3D0 8FBF0078 */ lw $ra, 0x78($sp) /* 78884 800DF3D4 8FB30074 */ lw $s3, 0x74($sp) /* 78888 800DF3D8 8FB20070 */ lw $s2, 0x70($sp) /* 7888C 800DF3DC 8FB1006C */ lw $s1, 0x6C($sp) /* 78890 800DF3E0 8FB00068 */ lw $s0, 0x68($sp) /* 78894 800DF3E4 D7BA0098 */ ldc1 $f26, 0x98($sp) /* 78898 800DF3E8 D7B80090 */ ldc1 $f24, 0x90($sp) /* 7889C 800DF3EC D7B60088 */ ldc1 $f22, 0x88($sp) /* 788A0 800DF3F0 D7B40080 */ ldc1 $f20, 0x80($sp) /* 788A4 800DF3F4 03E00008 */ jr $ra /* 788A8 800DF3F8 27BD00A0 */ addiu $sp, $sp, 0xA0 ### DECOMPILED C INSTRUCTIONS: s32 player_test_move_without_slipping(PlayerStatus* playerStatus, f32* x, f32* y, f32* z, f32 length, f32 yaw, s32* hasClimbableStep) { f32 sinTheta; f32 cosTheta; f32 hitX; f32 hitY; f32 hitZ; f32 hitDepth; f32 hitNx; f32 hitNy; f32 hitNz; f32 slipDx; f32 slipDz; f32 depth; f32 radius; f32 depthDiff; f32 height; s32 ret; s32 raycastID; f32 targetDx; f32 targetDz; f32 dx, dz; radius = playerStatus->colliderDiameter * 0.5f; height = playerStatus->colliderHeight * 0.286f; sin_cos_rad(DEG_TO_RAD(yaw), &sinTheta, &cosTheta); depth = length + radius; cosTheta = -cosTheta; hitDepth = depth; dx = radius * sinTheta; ret = NO_COLLIDER; raycastID = player_raycast_general(0, *x, *y + 0.1, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); if (raycastID >= 0 && hitDepth <= depth) { *hasClimbableStep = TRUE; } depth = length + radius; hitDepth = depth; dz = radius * cosTheta; raycastID = player_raycast_general(0, *x, *y + height, *z, sinTheta, 0, cosTheta, &hitX, &hitY, &hitZ, &hitDepth, &hitNx, &hitNy, &hitNz); targetDx = 0.0f; targetDz = 0.0f; if ((raycastID >= 0) && (hitDepth <= depth)) { depthDiff = hitDepth - depth; dx = depthDiff * sinTheta; dz = depthDiff * cosTheta; player_get_slip_vector(&slipDx, &slipDz, 0.0f, 0.0f, hitNx, hitNz); *x += dx + slipDx; *z += dz + slipDz; ret = raycastID; } *x += targetDx; *z += targetDz; return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_802448E0 /* 165140 802448E0 27BDFFD0 */ addiu $sp, $sp, -0x30 .L802448E4: /* 165144 802448E4 AFB40020 */ sw $s4, 0x20($sp) /* 165148 802448E8 0080A02D */ daddu $s4, $a0, $zero /* 16514C 802448EC 3C040013 */ lui $a0, %hi(D_131340) /* 165150 802448F0 24841340 */ addiu $a0, $a0, %lo(D_131340) D_802448F4: /* 165154 802448F4 3C050013 */ lui $a1, %hi(D_135EE0) /* 165158 802448F8 24A55EE0 */ addiu $a1, $a1, %lo(D_135EE0) D_802448FC: /* 16515C 802448FC 3C068024 */ lui $a2, %hi(get_dpad_input_radial) D_80244900: /* 165160 80244900 24C6E000 */ addiu $a2, $a2, %lo(get_dpad_input_radial) /* 165164 80244904 AFBF0028 */ sw $ra, 0x28($sp) /* 165168 80244908 AFB50024 */ sw $s5, 0x24($sp) D_8024490C: /* 16516C 8024490C AFB3001C */ sw $s3, 0x1C($sp) jtbl_80244910: /* 165170 80244910 AFB20018 */ sw $s2, 0x18($sp) /* 165174 80244914 AFB10014 */ sw $s1, 0x14($sp) .L80244918: /* 165178 80244918 0C00A5CF */ jal dma_copy .L8024491C: /* 16517C 8024491C AFB00010 */ sw $s0, 0x10($sp) D_80244920: /* 165180 80244920 0000802D */ daddu $s0, $zero, $zero .L80244924: /* 165184 80244924 3C128025 */ lui $s2, %hi(D_8024C0A0) /* 165188 80244928 2652C0A0 */ addiu $s2, $s2, %lo(D_8024C0A0) /* 16518C 8024492C 3C118025 */ lui $s1, %hi(D_80249B80) /* 165190 80244930 26319B80 */ addiu $s1, $s1, %lo(D_80249B80) glabel func_80244934 /* 165194 80244934 8E240000 */ lw $a0, 0x0($s1) /* 165198 80244938 26310004 */ addiu $s1, $s1, 0x4 /* 16519C 8024493C 0C050529 */ jal hud_element_create .L80244940: /* 1651A0 80244940 26100001 */ addiu $s0, $s0, 0x1 /* 1651A4 80244944 0040202D */ daddu $a0, $v0, $zero .L80244948: /* 1651A8 80244948 3C052000 */ lui $a1, (0x20000080 >> 16) /* 1651AC 8024494C 34A50080 */ ori $a1, $a1, (0x20000080 & 0xFFFF) /* 1651B0 80244950 0C051280 */ jal hud_element_set_flags .L80244954: /* 1651B4 80244954 AE440000 */ sw $a0, 0x0($s2) /* 1651B8 80244958 1A00FFF6 */ blez $s0, func_80244934 /* 1651BC 8024495C 26520004 */ addiu $s2, $s2, 0x4 D_80244960: /* 1651C0 80244960 3C028025 */ lui $v0, %hi(D_8024C0A0) .L80244964: /* 1651C4 80244964 8C42C0A0 */ lw $v0, %lo(D_8024C0A0)($v0) D_80244968: /* 1651C8 80244968 3C018025 */ lui $at, %hi(D_8024C088) /* 1651CC 8024496C AC22C088 */ sw $v0, %lo(D_8024C088)($at) /* 1651D0 80244970 16800004 */ bnez $s4, func_80244984 .L80244974: /* 1651D4 80244974 00000000 */ nop /* 1651D8 80244978 3C028025 */ lui $v0, %hi(D_80249DCC) /* 1651DC 8024497C 8C429DCC */ lw $v0, %lo(D_80249DCC)($v0) /* 1651E0 80244980 AC400000 */ sw $zero, 0x0($v0) glabel func_80244984 /* 1651E4 80244984 3C048025 */ lui $a0, %hi(D_80249DAC) D_80244988: /* 1651E8 80244988 24849DAC */ addiu $a0, $a0, %lo(D_80249DAC) .L8024498C: /* 1651EC 8024498C 0C051FCC */ jal setup_pause_menu_tab .L80244990: /* 1651F0 80244990 24050003 */ addiu $a1, $zero, 0x3 /* 1651F4 80244994 3C138025 */ lui $s3, %hi(D_80249B84) D_80244998: /* 1651F8 80244998 8E739B84 */ lw $s3, %lo(D_80249B84)($s3) /* 1651FC 8024499C 3C018025 */ lui $at, %hi(D_8024C098_C09918) .L802449A0: /* 165200 802449A0 A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at) .L802449A4: /* 165204 802449A4 16800003 */ bnez $s4, .L802449B4 /* 165208 802449A8 24020002 */ addiu $v0, $zero, 0x2 .L802449AC: /* 16520C 802449AC 0809126E */ j .L802449B8 D_802449B0: /* 165210 802449B0 A2600004 */ sb $zero, 0x4($s3) .L802449B4: /* 165214 802449B4 A2620004 */ sb $v0, 0x4($s3) .L802449B8: /* 165218 802449B8 82620004 */ lb $v0, 0x4($s3) /* 16521C 802449BC 14400031 */ bnez $v0, .L80244A84 /* 165220 802449C0 0260202D */ daddu $a0, $s3, $zero D_802449C4: /* 165224 802449C4 0000802D */ daddu $s0, $zero, $zero .L802449C8: /* 165228 802449C8 3C15800E */ lui $s5, %hi(gCurrentSaveFile) D_802449CC: /* 16522C 802449CC 26B5ACC0 */ addiu $s5, $s5, %lo(gCurrentSaveFile) D_802449D0: /* 165230 802449D0 24140001 */ addiu $s4, $zero, 0x1 /* 165234 802449D4 3C118007 */ lui $s1, %hi(gSaveSlotHasData) D_802449D8: /* 165238 802449D8 26317A24 */ addiu $s1, $s1, %lo(gSaveSlotHasData) .L802449DC: /* 16523C 802449DC 3C128007 */ lui $s2, %hi(gSaveSlotMetadata) .L802449E0: /* 165240 802449E0 265279C4 */ addiu $s2, $s2, %lo(gSaveSlotMetadata) glabel func_802449E4 /* 165244 802449E4 0C00ACB4 */ jal fio_load_game /* 165248 802449E8 0200202D */ daddu $a0, $s0, $zero D_802449EC: /* 16524C 802449EC 14400003 */ bnez $v0, D_802449FC D_802449F0: /* 165250 802449F0 00000000 */ nop D_802449F4: /* 165254 802449F4 0809128C */ j .L80244A30 glabel func_802449F8 /* 165258 802449F8 A2200000 */ sb $zero, 0x0($s1) D_802449FC: /* 16525C 802449FC 8EA712EC */ lw $a3, 0x12EC($s5) jtbl_80244A00: /* 165260 80244A00 8EA812F0 */ lw $t0, 0x12F0($s5) D_80244A04: /* 165264 80244A04 8EA912F4 */ lw $t1, 0x12F4($s5) /* 165268 80244A08 8EAA12F8 */ lw $t2, 0x12F8($s5) D_80244A0C: /* 16526C 80244A0C AE470000 */ sw $a3, 0x0($s2) D_80244A10: /* 165270 80244A10 AE480004 */ sw $t0, 0x4($s2) /* 165274 80244A14 AE490008 */ sw $t1, 0x8($s2) /* 165278 80244A18 AE4A000C */ sw $t2, 0xC($s2) .L80244A1C: /* 16527C 80244A1C 8EA712FC */ lw $a3, 0x12FC($s5) D_80244A20: /* 165280 80244A20 8EA81300 */ lw $t0, 0x1300($s5) .L80244A24: /* 165284 80244A24 AE470010 */ sw $a3, 0x10($s2) D_80244A28: /* 165288 80244A28 AE480014 */ sw $t0, 0x14($s2) D_80244A2C: /* 16528C 80244A2C A2340000 */ sb $s4, 0x0($s1) .L80244A30: /* 165290 80244A30 26310001 */ addiu $s1, $s1, 0x1 /* 165294 80244A34 26100001 */ addiu $s0, $s0, 0x1 /* 165298 80244A38 2A020004 */ slti $v0, $s0, 0x4 /* 16529C 80244A3C 1440FFE9 */ bnez $v0, func_802449E4 D_80244A40: /* 1652A0 80244A40 26520018 */ addiu $s2, $s2, 0x18 .L80244A44: /* 1652A4 80244A44 82620004 */ lb $v0, 0x4($s3) glabel func_80244A48 /* 1652A8 80244A48 1440000E */ bnez $v0, .L80244A84 glabel func_80244A4C /* 1652AC 80244A4C 0260202D */ daddu $a0, $s3, $zero D_80244A50: /* 1652B0 80244A50 0C00ABF6 */ jal fio_has_valid_backup D_80244A54: /* 1652B4 80244A54 00000000 */ nop glabel .L80244A58 /* 1652B8 80244A58 3C04800E */ lui $a0, %hi(D_800D95E8) /* 1652BC 80244A5C 248495E8 */ addiu $a0, $a0, %lo(D_800D95E8) D_80244A60: /* 1652C0 80244A60 8C82003C */ lw $v0, 0x3C($a0) /* 1652C4 80244A64 2C420004 */ sltiu $v0, $v0, 0x4 D_80244A68: /* 1652C8 80244A68 50400001 */ beql $v0, $zero, D_80244A70 D_80244A6C: /* 1652CC 80244A6C AC80003C */ sw $zero, 0x3C($a0) D_80244A70: /* 1652D0 80244A70 3C038007 */ lui $v1, %hi(gGameStatusPtr) D_80244A74: /* 1652D4 80244A74 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) D_80244A78: /* 1652D8 80244A78 9082003F */ lbu $v0, 0x3F($a0) .L80244A7C: /* 1652DC 80244A7C A0620166 */ sb $v0, 0x166($v1) /* 1652E0 80244A80 0260202D */ daddu $a0, $s3, $zero .L80244A84: /* 1652E4 80244A84 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 1652E8 80244A88 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 1652EC 80244A8C 3C118025 */ lui $s1, %hi(D_80249B84) /* 1652F0 80244A90 26319B84 */ addiu $s1, $s1, %lo(D_80249B84) /* 1652F4 80244A94 90460166 */ lbu $a2, 0x166($v0) /* 1652F8 80244A98 0000802D */ daddu $s0, $zero, $zero /* 1652FC 80244A9C 30C50001 */ andi $a1, $a2, 0x1 /* 165300 80244AA0 00052840 */ sll $a1, $a1, 1 /* 165304 80244AA4 0C090B65 */ jal func_80242D94 glabel .L80244AA8 /* 165308 80244AA8 00063042 */ srl $a2, $a2, 1 .L80244AAC: /* 16530C 80244AAC 8E240000 */ lw $a0, 0x0($s1) /* 165310 80244AB0 8C82000C */ lw $v0, 0xC($a0) .L80244AB4: /* 165314 80244AB4 10400003 */ beqz $v0, .L80244AC4 D_80244AB8: /* 165318 80244AB8 26100001 */ addiu $s0, $s0, 0x1 D_80244ABC: /* 16531C 80244ABC 0040F809 */ jalr $v0 /* 165320 80244AC0 00000000 */ nop glabel .L80244AC4 /* 165324 80244AC4 2A020004 */ slti $v0, $s0, 0x4 /* 165328 80244AC8 1440FFF8 */ bnez $v0, .L80244AAC /* 16532C 80244ACC 26310004 */ addiu $s1, $s1, 0x4 D_80244AD0: /* 165330 80244AD0 24040017 */ addiu $a0, $zero, 0x17 /* 165334 80244AD4 0C051F5C */ jal update_window_hierarchy .L80244AD8: /* 165338 80244AD8 24050040 */ addiu $a1, $zero, 0x40 D_80244ADC: /* 16533C 80244ADC 8FBF0028 */ lw $ra, 0x28($sp) /* 165340 80244AE0 8FB50024 */ lw $s5, 0x24($sp) .L80244AE4: /* 165344 80244AE4 8FB40020 */ lw $s4, 0x20($sp) /* 165348 80244AE8 8FB3001C */ lw $s3, 0x1C($sp) glabel .L80244AEC /* 16534C 80244AEC 8FB20018 */ lw $s2, 0x18($sp) /* 165350 80244AF0 8FB10014 */ lw $s1, 0x14($sp) D_80244AF4: /* 165354 80244AF4 8FB00010 */ lw $s0, 0x10($sp) /* 165358 80244AF8 03E00008 */ jr $ra /* 16535C 80244AFC 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void filemenu_init(s32 arg0) { MenuPanel** panelIt; MenuPanel* menu; s32 i; dma_copy(ui_images_ROM_START, ui_images_ROM_END, ui_images_VRAM); for (i = 0; i < ARRAY_COUNT(filemenu_cursorHudElemID); i++) { filemenu_cursorHudElemID[i] = hud_element_create(filemenu_cursor_hudElemScripts[i]); hud_element_set_flags(filemenu_cursorHudElemID[i], HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80); } filemenu_cursorHudElem = filemenu_cursorHudElemID[0]; if (!arg0) { filemenu_common_windowBPs[0].style.customStyle->background.imgData = NULL; // ??? } setup_pause_menu_tab(filemenu_common_windowBPs, ARRAY_COUNT(filemenu_common_windowBPs)); menu = filemenu_menus[0]; filemenu_currentMenu = 0; if (!arg0) { menu->page = 0; } else { menu->page = 2; } if (menu->page == 0) { for (i = 0; i < ARRAY_COUNT(filemenu_menus); i++) { if (!fio_load_game(i)) { gSaveSlotHasData[i] = FALSE; } else { gSaveSlotMetadata[i] = gCurrentSaveFile.unk_12EC; gSaveSlotHasData[i] = TRUE; } } if (menu->page == 0) { fio_has_valid_backup(); if (D_800D95E8.saveCount >= 4) { D_800D95E8.saveCount = 0; } gGameStatusPtr->saveSlot = D_800D95E8.saveCount; } } filemenu_set_selected(menu, (gGameStatusPtr->saveSlot & 1) * 2, gGameStatusPtr->saveSlot >> 1); panelIt = filemenu_menus; for (i = 0; i < ARRAY_COUNT(filemenu_menus); i++, panelIt++) { if ((*panelIt)->fpInit != NULL) { (*panelIt)->fpInit((*panelIt)); } } update_window_hierarchy(23, 64); }
### RAW ASSEMBLY INSTRUCTIONS: glabel appendGfx_interact_prompt /* E202F8 802B71E8 3C028011 */ lui $v0, %hi(gPlayerStatus + 0x4) /* E202FC 802B71EC 8C42EFCC */ lw $v0, %lo(gPlayerStatus + 0x4)($v0) /* E20300 802B71F0 27BDFF28 */ addiu $sp, $sp, -0xD8 /* E20304 802B71F4 AFBF00D0 */ sw $ra, 0xD0($sp) /* E20308 802B71F8 AFB500CC */ sw $s5, 0xCC($sp) /* E2030C 802B71FC AFB400C8 */ sw $s4, 0xC8($sp) /* E20310 802B7200 AFB300C4 */ sw $s3, 0xC4($sp) /* E20314 802B7204 AFB200C0 */ sw $s2, 0xC0($sp) .L802B7208: /* E20318 802B7208 AFB100BC */ sw $s1, 0xBC($sp) /* E2031C 802B720C 30420010 */ andi $v0, $v0, 0x10 /* E20320 802B7210 10400086 */ beqz $v0, interact_speech_update /* E20324 802B7214 AFB000B8 */ sw $s0, 0xB8($sp) /* E20328 802B7218 27B00038 */ addiu $s0, $sp, 0x38 /* E2032C 802B721C 3C14802B */ lui $s4, %hi(D_802B7CB8) /* E20330 802B7220 26947CB8 */ addiu $s4, $s4, %lo(D_802B7CB8) /* E20334 802B7224 8E820000 */ lw $v0, 0x0($s4) /* E20338 802B7228 0200202D */ daddu $a0, $s0, $zero /* E2033C 802B722C 8C450010 */ lw $a1, 0x10($v0) /* E20340 802B7230 3C150001 */ lui $s5, (0x11630 >> 16) /* E20344 802B7234 00A0302D */ daddu $a2, $a1, $zero /* E20348 802B7238 0C019DF0 */ jal guScaleF /* E2034C 802B723C 00A0382D */ daddu $a3, $a1, $zero /* E20350 802B7240 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* E20354 802B7244 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* E20358 802B7248 27B10078 */ addiu $s1, $sp, 0x78 /* E2035C 802B724C 00031080 */ sll $v0, $v1, 2 /* E20360 802B7250 00431021 */ addu $v0, $v0, $v1 /* E20364 802B7254 00021080 */ sll $v0, $v0, 2 /* E20368 802B7258 00431023 */ subu $v0, $v0, $v1 /* E2036C 802B725C 000218C0 */ sll $v1, $v0, 3 /* E20370 802B7260 00431021 */ addu $v0, $v0, $v1 /* E20374 802B7264 000210C0 */ sll $v0, $v0, 3 /* E20378 802B7268 8E830000 */ lw $v1, 0x0($s4) /* E2037C 802B726C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* E20380 802B7270 00220821 */ addu $at, $at, $v0 /* E20384 802B7274 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* E20388 802B7278 C464000C */ lwc1 $f4, 0xC($v1) /* E2038C 802B727C 44800000 */ mtc1 $zero, $f0 /* E20390 802B7280 46022101 */ sub.s $f4, $f4, $f2 /* E20394 802B7284 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* E20398 802B7288 44060000 */ mfc1 $a2, $f0 /* E2039C 802B728C 44052000 */ mfc1 $a1, $f4 /* E203A0 802B7290 0220202D */ daddu $a0, $s1, $zero /* E203A4 802B7294 0C019EC8 */ jal guRotateF /* E203A8 802B7298 AFA60010 */ sw $a2, 0x10($sp) /* E203AC 802B729C 0200202D */ daddu $a0, $s0, $zero /* E203B0 802B72A0 0220282D */ daddu $a1, $s1, $zero .L802B72A4: /* E203B4 802B72A4 0C019D80 */ jal guMtxCatF /* E203B8 802B72A8 0200302D */ daddu $a2, $s0, $zero /* E203BC 802B72AC 8E820000 */ lw $v0, 0x0($s4) /* E203C0 802B72B0 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* E203C4 802B72B4 8C450000 */ lw $a1, 0x0($v0) /* E203C8 802B72B8 8C460004 */ lw $a2, 0x4($v0) /* E203CC 802B72BC 8C470008 */ lw $a3, 0x8($v0) glabel ispy_notification_setup /* E203D0 802B72C0 0C019E40 */ jal guTranslateF /* E203D4 802B72C4 0220202D */ daddu $a0, $s1, $zero /* E203D8 802B72C8 0200202D */ daddu $a0, $s0, $zero /* E203DC 802B72CC 0220282D */ daddu $a1, $s1, $zero /* E203E0 802B72D0 0C019D80 */ jal guMtxCatF /* E203E4 802B72D4 0220302D */ daddu $a2, $s1, $zero /* E203E8 802B72D8 0220202D */ daddu $a0, $s1, $zero /* E203EC 802B72DC 3C108007 */ lui $s0, %hi(gMatrixListPos) /* E203F0 802B72E0 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* E203F4 802B72E4 3C13800A */ lui $s3, %hi(gDisplayContext) /* E203F8 802B72E8 2673A674 */ addiu $s3, $s3, %lo(gDisplayContext) /* E203FC 802B72EC 96050000 */ lhu $a1, 0x0($s0) /* E20400 802B72F0 8E620000 */ lw $v0, 0x0($s3) /* E20404 802B72F4 00052980 */ sll $a1, $a1, 6 /* E20408 802B72F8 00B52821 */ addu $a1, $a1, $s5 /* E2040C 802B72FC 0C019D40 */ jal guMtxF2L /* E20410 802B7300 00452821 */ addu $a1, $v0, $a1 /* E20414 802B7304 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* E20418 802B7308 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* E2041C 802B730C 0000202D */ daddu $a0, $zero, $zero /* E20420 802B7310 0080282D */ daddu $a1, $a0, $zero /* E20424 802B7314 0080302D */ daddu $a2, $a0, $zero /* E20428 802B7318 3C12800A */ lui $s2, %hi(gMainGfxPos) /* E2042C 802B731C 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* E20430 802B7320 0080382D */ daddu $a3, $a0, $zero /* E20434 802B7324 8E480000 */ lw $t0, 0x0($s2) /* E20438 802B7328 96020000 */ lhu $v0, 0x0($s0) /* E2043C 802B732C 0100482D */ daddu $t1, $t0, $zero /* E20440 802B7330 25080008 */ addiu $t0, $t0, 0x8 /* E20444 802B7334 AE480000 */ sw $t0, 0x0($s2) /* E20448 802B7338 AD230000 */ sw $v1, 0x0($t1) /* E2044C 802B733C 24430001 */ addiu $v1, $v0, 0x1 /* E20450 802B7340 3042FFFF */ andi $v0, $v0, 0xFFFF /* E20454 802B7344 00021180 */ sll $v0, $v0, 6 /* E20458 802B7348 A6030000 */ sh $v1, 0x0($s0) /* E2045C 802B734C 8E630000 */ lw $v1, 0x0($s3) /* E20460 802B7350 00551021 */ addu $v0, $v0, $s5 /* E20464 802B7354 00621821 */ addu $v1, $v1, $v0 /* E20468 802B7358 25020008 */ addiu $v0, $t0, 0x8 glabel ispy_notification_update /* E2046C 802B735C AD230004 */ sw $v1, 0x4($t1) /* E20470 802B7360 AE420000 */ sw $v0, 0x0($s2) /* E20474 802B7364 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* E20478 802B7368 AD020000 */ sw $v0, 0x0($t0) /* E2047C 802B736C 3C02802B */ lui $v0, %hi(D_802B7C40) /* E20480 802B7370 24427C40 */ addiu $v0, $v0, %lo(D_802B7C40) /* E20484 802B7374 AD020004 */ sw $v0, 0x4($t0) /* E20488 802B7378 3C02802B */ lui $v0, %hi(D_802B7A20) /* E2048C 802B737C 24427A20 */ addiu $v0, $v0, %lo(D_802B7A20) /* E20490 802B7380 AFA20020 */ sw $v0, 0x20($sp) /* E20494 802B7384 3C02802B */ lui $v0, %hi(D_802B7C20) /* E20498 802B7388 24427C20 */ addiu $v0, $v0, %lo(D_802B7C20) /* E2049C 802B738C AFA20024 */ sw $v0, 0x24($sp) .L802B7390: /* E204A0 802B7390 24020020 */ addiu $v0, $zero, 0x20 /* E204A4 802B7394 A7A20028 */ sh $v0, 0x28($sp) /* E204A8 802B7398 A7A2002A */ sh $v0, 0x2A($sp) /* E204AC 802B739C 2402FFF0 */ addiu $v0, $zero, -0x10 /* E204B0 802B73A0 A7A2002C */ sh $v0, 0x2C($sp) /* E204B4 802B73A4 2402001A */ addiu $v0, $zero, 0x1A /* E204B8 802B73A8 A7A2002E */ sh $v0, 0x2E($sp) /* E204BC 802B73AC 240200FF */ addiu $v0, $zero, 0xFF /* E204C0 802B73B0 A3A20030 */ sb $v0, 0x30($sp) /* E204C4 802B73B4 24020440 */ addiu $v0, $zero, 0x440 /* E204C8 802B73B8 AFA00010 */ sw $zero, 0x10($sp) /* E204CC 802B73BC AFA00014 */ sw $zero, 0x14($sp) glabel .L802B73C0 /* E204D0 802B73C0 0C04EAA7 */ jal imgfx_update /* E204D4 802B73C4 AFA20018 */ sw $v0, 0x18($sp) glabel .L802B73C8 /* E204D8 802B73C8 0000202D */ daddu $a0, $zero, $zero /* E204DC 802B73CC 8E820000 */ lw $v0, 0x0($s4) glabel .L802B73D0 /* E204E0 802B73D0 24050006 */ addiu $a1, $zero, 0x6 /* E204E4 802B73D4 90460024 */ lbu $a2, 0x24($v0) glabel .L802B73D8 /* E204E8 802B73D8 240200FF */ addiu $v0, $zero, 0xFF /* E204EC 802B73DC AFA20014 */ sw $v0, 0x14($sp) glabel .L802B73E0 /* E204F0 802B73E0 24020448 */ addiu $v0, $zero, 0x448 /* E204F4 802B73E4 AFA20018 */ sw $v0, 0x18($sp) glabel .L802B73E8 /* E204F8 802B73E8 00C0382D */ daddu $a3, $a2, $zero /* E204FC 802B73EC 0C04EAA7 */ jal imgfx_update .L802B73F0: /* E20500 802B73F0 AFA60010 */ sw $a2, 0x10($sp) /* E20504 802B73F4 0000202D */ daddu $a0, $zero, $zero .L802B73F8: /* E20508 802B73F8 27A50020 */ addiu $a1, $sp, 0x20 .L802B73FC: /* E2050C 802B73FC 0080302D */ daddu $a2, $a0, $zero /* E20510 802B7400 0C04EBDC */ jal imgfx_appendGfx_component /* E20514 802B7404 0220382D */ daddu $a3, $s1, $zero .L802B7408: /* E20518 802B7408 3C04D838 */ lui $a0, (0xD8380002 >> 16) /* E2051C 802B740C 8E420000 */ lw $v0, 0x0($s2) .L802B7410: /* E20520 802B7410 34840002 */ ori $a0, $a0, (0xD8380002 & 0xFFFF) /* E20524 802B7414 0040182D */ daddu $v1, $v0, $zero /* E20528 802B7418 24420008 */ addiu $v0, $v0, 0x8 /* E2052C 802B741C AE420000 */ sw $v0, 0x0($s2) /* E20530 802B7420 24020040 */ addiu $v0, $zero, 0x40 /* E20534 802B7424 AC640000 */ sw $a0, 0x0($v1) /* E20538 802B7428 AC620004 */ sw $v0, 0x4($v1) glabel interact_speech_update /* E2053C 802B742C 8FBF00D0 */ lw $ra, 0xD0($sp) /* E20540 802B7430 8FB500CC */ lw $s5, 0xCC($sp) /* E20544 802B7434 8FB400C8 */ lw $s4, 0xC8($sp) .L802B7438: /* E20548 802B7438 8FB300C4 */ lw $s3, 0xC4($sp) /* E2054C 802B743C 8FB200C0 */ lw $s2, 0xC0($sp) .L802B7440: /* E20550 802B7440 8FB100BC */ lw $s1, 0xBC($sp) .L802B7444: /* E20554 802B7444 8FB000B8 */ lw $s0, 0xB8($sp) /* E20558 802B7448 03E00008 */ jr $ra /* E2055C 802B744C 27BD00D8 */ addiu $sp, $sp, 0xD8 ### DECOMPILED C INSTRUCTIONS: void appendGfx_interact_prompt(void) { ImgFXTexture ifxImg; Matrix4f sp38, sp78; if (gPlayerStatus.animFlags & PA_FLAG_INTERACT_PROMPT_AVAILABLE) { guScaleF(sp38, InspectIconPtr->scale, InspectIconPtr->scale, InspectIconPtr->scale); guRotateF(sp78, InspectIconPtr->yaw - gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); guMtxCatF(sp38, sp78, sp38); guTranslateF(sp78, InspectIconPtr->pos.x, InspectIconPtr->pos.y, InspectIconPtr->pos.z); guMtxCatF(sp38, sp78, sp78); guMtxF2L(sp78, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, &inspect_icon_gfx); ifxImg.raster = inspect_icon_img; ifxImg.palette = inspect_icon_pal; ifxImg.width = inspect_icon_img_width; ifxImg.height = inspect_icon_img_height; ifxImg.xOffset = -16; ifxImg.yOffset = 26; ifxImg.alpha = 255; imgfx_update(0, IMGFX_CLEAR, 0, 0, 0, 0, IMGFX_FLAG_400 | IMGFX_FLAG_40); imgfx_update(0, IMGFX_SET_COLOR, InspectIconPtr->brightness, InspectIconPtr->brightness, InspectIconPtr->brightness, 255, IMGFX_FLAG_400 | IMGFX_FLAG_40 | IMGFX_FLAG_8); imgfx_appendGfx_component(0, &ifxImg, 0, sp78); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel appendGfx_speech_bubble /* E21078 802B71C8 3C028011 */ lui $v0, %hi(gPlayerStatus + 0x4) /* E2107C 802B71CC 8C42EFCC */ lw $v0, %lo(gPlayerStatus + 0x4)($v0) /* E21080 802B71D0 27BDFF28 */ addiu $sp, $sp, -0xD8 glabel appendGfx_pulse_stone_icon /* E21084 802B71D4 AFBF00D0 */ sw $ra, 0xD0($sp) /* E21088 802B71D8 AFB500CC */ sw $s5, 0xCC($sp) /* E2108C 802B71DC AFB400C8 */ sw $s4, 0xC8($sp) /* E21090 802B71E0 AFB300C4 */ sw $s3, 0xC4($sp) /* E21094 802B71E4 AFB200C0 */ sw $s2, 0xC0($sp) glabel appendGfx_interact_prompt /* E21098 802B71E8 AFB100BC */ sw $s1, 0xBC($sp) /* E2109C 802B71EC 30420020 */ andi $v0, $v0, 0x20 /* E210A0 802B71F0 10400085 */ beqz $v0, .L802B7408 /* E210A4 802B71F4 AFB000B8 */ sw $s0, 0xB8($sp) /* E210A8 802B71F8 27B00038 */ addiu $s0, $sp, 0x38 /* E210AC 802B71FC 3C14802B */ lui $s4, %hi(D_802B79A8) /* E210B0 802B7200 269479A8 */ addiu $s4, $s4, %lo(D_802B79A8) /* E210B4 802B7204 8E820000 */ lw $v0, 0x0($s4) .L802B7208: /* E210B8 802B7208 0200202D */ daddu $a0, $s0, $zero /* E210BC 802B720C 8C450014 */ lw $a1, 0x14($v0) /* E210C0 802B7210 3C150001 */ lui $s5, (0x11630 >> 16) /* E210C4 802B7214 00A0302D */ daddu $a2, $a1, $zero /* E210C8 802B7218 0C019DF0 */ jal guScaleF /* E210CC 802B721C 00A0382D */ daddu $a3, $a1, $zero /* E210D0 802B7220 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* E210D4 802B7224 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* E210D8 802B7228 27B10078 */ addiu $s1, $sp, 0x78 /* E210DC 802B722C 00031080 */ sll $v0, $v1, 2 /* E210E0 802B7230 00431021 */ addu $v0, $v0, $v1 /* E210E4 802B7234 00021080 */ sll $v0, $v0, 2 /* E210E8 802B7238 00431023 */ subu $v0, $v0, $v1 /* E210EC 802B723C 000218C0 */ sll $v1, $v0, 3 /* E210F0 802B7240 00431021 */ addu $v0, $v0, $v1 /* E210F4 802B7244 000210C0 */ sll $v0, $v0, 3 /* E210F8 802B7248 8E830000 */ lw $v1, 0x0($s4) /* E210FC 802B724C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* E21100 802B7250 00220821 */ addu $at, $at, $v0 /* E21104 802B7254 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* E21108 802B7258 C4640010 */ lwc1 $f4, 0x10($v1) /* E2110C 802B725C 44800000 */ mtc1 $zero, $f0 /* E21110 802B7260 46022101 */ sub.s $f4, $f4, $f2 /* E21114 802B7264 3C073F80 */ lui $a3, (0x3F800000 >> 16) /* E21118 802B7268 44060000 */ mfc1 $a2, $f0 /* E2111C 802B726C 44052000 */ mfc1 $a1, $f4 /* E21120 802B7270 0220202D */ daddu $a0, $s1, $zero /* E21124 802B7274 0C019EC8 */ jal guRotateF /* E21128 802B7278 AFA60010 */ sw $a2, 0x10($sp) /* E2112C 802B727C 0200202D */ daddu $a0, $s0, $zero /* E21130 802B7280 0220282D */ daddu $a1, $s1, $zero /* E21134 802B7284 0C019D80 */ jal guMtxCatF /* E21138 802B7288 0200302D */ daddu $a2, $s0, $zero /* E2113C 802B728C 8E820000 */ lw $v0, 0x0($s4) /* E21140 802B7290 36B51630 */ ori $s5, $s5, (0x11630 & 0xFFFF) /* E21144 802B7294 8C450004 */ lw $a1, 0x4($v0) /* E21148 802B7298 8C460008 */ lw $a2, 0x8($v0) /* E2114C 802B729C 8C47000C */ lw $a3, 0xC($v0) /* E21150 802B72A0 0C019E40 */ jal guTranslateF .L802B72A4: /* E21154 802B72A4 0220202D */ daddu $a0, $s1, $zero /* E21158 802B72A8 0200202D */ daddu $a0, $s0, $zero /* E2115C 802B72AC 0220282D */ daddu $a1, $s1, $zero /* E21160 802B72B0 0C019D80 */ jal guMtxCatF /* E21164 802B72B4 0220302D */ daddu $a2, $s1, $zero /* E21168 802B72B8 0220202D */ daddu $a0, $s1, $zero /* E2116C 802B72BC 3C108007 */ lui $s0, %hi(gMatrixListPos) glabel ispy_notification_setup /* E21170 802B72C0 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* E21174 802B72C4 3C13800A */ lui $s3, %hi(gDisplayContext) /* E21178 802B72C8 2673A674 */ addiu $s3, $s3, %lo(gDisplayContext) /* E2117C 802B72CC 96050000 */ lhu $a1, 0x0($s0) /* E21180 802B72D0 8E620000 */ lw $v0, 0x0($s3) /* E21184 802B72D4 00052980 */ sll $a1, $a1, 6 /* E21188 802B72D8 00B52821 */ addu $a1, $a1, $s5 /* E2118C 802B72DC 0C019D40 */ jal guMtxF2L /* E21190 802B72E0 00452821 */ addu $a1, $v0, $a1 /* E21194 802B72E4 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* E21198 802B72E8 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* E2119C 802B72EC 0000202D */ daddu $a0, $zero, $zero /* E211A0 802B72F0 0080282D */ daddu $a1, $a0, $zero /* E211A4 802B72F4 0080302D */ daddu $a2, $a0, $zero /* E211A8 802B72F8 3C12800A */ lui $s2, %hi(gMainGfxPos) /* E211AC 802B72FC 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* E211B0 802B7300 0080382D */ daddu $a3, $a0, $zero /* E211B4 802B7304 8E480000 */ lw $t0, 0x0($s2) /* E211B8 802B7308 96020000 */ lhu $v0, 0x0($s0) /* E211BC 802B730C 0100482D */ daddu $t1, $t0, $zero /* E211C0 802B7310 25080008 */ addiu $t0, $t0, 0x8 /* E211C4 802B7314 AE480000 */ sw $t0, 0x0($s2) /* E211C8 802B7318 AD230000 */ sw $v1, 0x0($t1) /* E211CC 802B731C 24430001 */ addiu $v1, $v0, 0x1 /* E211D0 802B7320 3042FFFF */ andi $v0, $v0, 0xFFFF /* E211D4 802B7324 00021180 */ sll $v0, $v0, 6 /* E211D8 802B7328 00551021 */ addu $v0, $v0, $s5 /* E211DC 802B732C A6030000 */ sh $v1, 0x0($s0) /* E211E0 802B7330 8E630000 */ lw $v1, 0x0($s3) /* E211E4 802B7334 24100440 */ addiu $s0, $zero, 0x440 /* E211E8 802B7338 00621821 */ addu $v1, $v1, $v0 /* E211EC 802B733C 25020008 */ addiu $v0, $t0, 0x8 /* E211F0 802B7340 AD230004 */ sw $v1, 0x4($t1) /* E211F4 802B7344 AE420000 */ sw $v0, 0x0($s2) /* E211F8 802B7348 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* E211FC 802B734C AD020000 */ sw $v0, 0x0($t0) /* E21200 802B7350 3C02802B */ lui $v0, %hi(D_802B7930) /* E21204 802B7354 24427930 */ addiu $v0, $v0, %lo(D_802B7930) /* E21208 802B7358 AD020004 */ sw $v0, 0x4($t0) glabel ispy_notification_update /* E2120C 802B735C 3C02802B */ lui $v0, %hi(D_802B7710) /* E21210 802B7360 24427710 */ addiu $v0, $v0, %lo(D_802B7710) /* E21214 802B7364 AFA20020 */ sw $v0, 0x20($sp) /* E21218 802B7368 3C02802B */ lui $v0, %hi(D_802B7910) /* E2121C 802B736C 24427910 */ addiu $v0, $v0, %lo(D_802B7910) /* E21220 802B7370 AFA20024 */ sw $v0, 0x24($sp) /* E21224 802B7374 24020020 */ addiu $v0, $zero, 0x20 /* E21228 802B7378 A7A20028 */ sh $v0, 0x28($sp) /* E2122C 802B737C A7A2002A */ sh $v0, 0x2A($sp) /* E21230 802B7380 2402FFF0 */ addiu $v0, $zero, -0x10 /* E21234 802B7384 A7A2002C */ sh $v0, 0x2C($sp) /* E21238 802B7388 2402001A */ addiu $v0, $zero, 0x1A /* E2123C 802B738C A7A2002E */ sh $v0, 0x2E($sp) .L802B7390: /* E21240 802B7390 240200FF */ addiu $v0, $zero, 0xFF /* E21244 802B7394 A3A20030 */ sb $v0, 0x30($sp) /* E21248 802B7398 AFA00010 */ sw $zero, 0x10($sp) /* E2124C 802B739C AFA00014 */ sw $zero, 0x14($sp) /* E21250 802B73A0 0C04EAA7 */ jal imgfx_update /* E21254 802B73A4 AFB00018 */ sw $s0, 0x18($sp) /* E21258 802B73A8 0000202D */ daddu $a0, $zero, $zero /* E2125C 802B73AC 8E820000 */ lw $v0, 0x0($s4) /* E21260 802B73B0 24050006 */ addiu $a1, $zero, 0x6 /* E21264 802B73B4 9046002B */ lbu $a2, 0x2B($v0) /* E21268 802B73B8 240200FF */ addiu $v0, $zero, 0xFF /* E2126C 802B73BC AFA20014 */ sw $v0, 0x14($sp) glabel .L802B73C0 /* E21270 802B73C0 AFB00018 */ sw $s0, 0x18($sp) /* E21274 802B73C4 00C0382D */ daddu $a3, $a2, $zero glabel .L802B73C8 /* E21278 802B73C8 0C04EAA7 */ jal imgfx_update /* E2127C 802B73CC AFA60010 */ sw $a2, 0x10($sp) glabel .L802B73D0 /* E21280 802B73D0 0000202D */ daddu $a0, $zero, $zero /* E21284 802B73D4 27A50020 */ addiu $a1, $sp, 0x20 glabel .L802B73D8 /* E21288 802B73D8 24060040 */ addiu $a2, $zero, 0x40 /* E2128C 802B73DC 0C04EBDC */ jal imgfx_appendGfx_component glabel .L802B73E0 /* E21290 802B73E0 0220382D */ daddu $a3, $s1, $zero /* E21294 802B73E4 3C04D838 */ lui $a0, (0xD8380002 >> 16) glabel .L802B73E8 /* E21298 802B73E8 8E420000 */ lw $v0, 0x0($s2) /* E2129C 802B73EC 34840002 */ ori $a0, $a0, (0xD8380002 & 0xFFFF) .L802B73F0: /* E212A0 802B73F0 0040182D */ daddu $v1, $v0, $zero /* E212A4 802B73F4 24420008 */ addiu $v0, $v0, 0x8 .L802B73F8: /* E212A8 802B73F8 AE420000 */ sw $v0, 0x0($s2) .L802B73FC: /* E212AC 802B73FC 24020040 */ addiu $v0, $zero, 0x40 /* E212B0 802B7400 AC640000 */ sw $a0, 0x0($v1) /* E212B4 802B7404 AC620004 */ sw $v0, 0x4($v1) .L802B7408: /* E212B8 802B7408 8FBF00D0 */ lw $ra, 0xD0($sp) /* E212BC 802B740C 8FB500CC */ lw $s5, 0xCC($sp) .L802B7410: /* E212C0 802B7410 8FB400C8 */ lw $s4, 0xC8($sp) /* E212C4 802B7414 8FB300C4 */ lw $s3, 0xC4($sp) /* E212C8 802B7418 8FB200C0 */ lw $s2, 0xC0($sp) /* E212CC 802B741C 8FB100BC */ lw $s1, 0xBC($sp) /* E212D0 802B7420 8FB000B8 */ lw $s0, 0xB8($sp) /* E212D4 802B7424 03E00008 */ jr $ra /* E212D8 802B7428 27BD00D8 */ addiu $sp, $sp, 0xD8 ### DECOMPILED C INSTRUCTIONS: void appendGfx_speech_bubble(void) { ImgFXTexture ifxImg; Matrix4f mtxTemp, mtxTransform; if (gPlayerStatus.animFlags & PA_FLAG_SPEECH_PROMPT_AVAILABLE) { guScaleF(mtxTemp, SpeechBubblePtr->scale, SpeechBubblePtr->scale, SpeechBubblePtr->scale); guRotateF(mtxTransform, SpeechBubblePtr->yaw - gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); guMtxCatF(mtxTemp, mtxTransform, mtxTemp); guTranslateF(mtxTransform, SpeechBubblePtr->pos.x, SpeechBubblePtr->pos.y, SpeechBubblePtr->pos.z); guMtxCatF(mtxTemp, mtxTransform, mtxTransform); guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, &speech_bubble_gfx); ifxImg.raster = speech_bubble_img; ifxImg.palette = speech_bubble_pal; ifxImg.width = speech_bubble_img_width; ifxImg.height = speech_bubble_img_height; ifxImg.xOffset = -16; ifxImg.yOffset = 26; ifxImg.alpha = 255; imgfx_update(0, IMGFX_CLEAR, 0, 0, 0, 0, IMGFX_FLAG_400 | IMGFX_FLAG_40); imgfx_update(0, IMGFX_SET_COLOR, SpeechBubblePtr->brightness, SpeechBubblePtr->brightness, SpeechBubblePtr->brightness, 255, 0x440); imgfx_appendGfx_component(0, &ifxImg, IMGFX_FLAG_40, mtxTransform); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel spawn_default_surface_effects /* 18B88 8003D788 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 18B8C 8003D78C AFB00030 */ sw $s0, 0x30($sp) /* 18B90 8003D790 0080802D */ daddu $s0, $a0, $zero /* 18B94 8003D794 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 18B98 8003D798 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 18B9C 8003D79C AFBF0038 */ sw $ra, 0x38($sp) /* 18BA0 8003D7A0 AFB10034 */ sw $s1, 0x34($sp) /* 18BA4 8003D7A4 84620086 */ lh $v0, 0x86($v1) /* 18BA8 8003D7A8 24110005 */ addiu $s1, $zero, 0x5 /* 18BAC 8003D7AC 14510004 */ bne $v0, $s1, .L8003D7C0 /* 18BB0 8003D7B0 0000302D */ daddu $a2, $zero, $zero /* 18BB4 8003D7B4 8462008C */ lh $v0, 0x8C($v1) /* 18BB8 8003D7B8 38420002 */ xori $v0, $v0, 0x2 /* 18BBC 8003D7BC 2C460001 */ sltiu $a2, $v0, 0x1 .L8003D7C0: /* 18BC0 8003D7C0 24020002 */ addiu $v0, $zero, 0x2 /* 18BC4 8003D7C4 14A20026 */ bne $a1, $v0, .L8003D860 /* 18BC8 8003D7C8 00000000 */ nop /* 18BCC 8003D7CC C602003C */ lwc1 $f2, 0x3C($s0) /* 18BD0 8003D7D0 44800000 */ mtc1 $zero, $f0 /* 18BD4 8003D7D4 C6040040 */ lwc1 $f4, 0x40($s0) /* 18BD8 8003D7D8 46001080 */ add.s $f2, $f2, $f0 /* 18BDC 8003D7DC C6000038 */ lwc1 $f0, 0x38($s0) /* 18BE0 8003D7E0 14C00011 */ bnez $a2, .L8003D828 /* 18BE4 8003D7E4 24040003 */ addiu $a0, $zero, 0x3 /* 18BE8 8003D7E8 3C108007 */ lui $s0, %hi(D_80077C10) /* 18BEC 8003D7EC 26107C10 */ addiu $s0, $s0, %lo(D_80077C10) /* 18BF0 8003D7F0 44050000 */ mfc1 $a1, $f0 /* 18BF4 8003D7F4 44061000 */ mfc1 $a2, $f2 /* 18BF8 8003D7F8 44072000 */ mfc1 $a3, $f4 /* 18BFC 8003D7FC C6000000 */ lwc1 $f0, 0x0($s0) /* 18C00 8003D800 0000202D */ daddu $a0, $zero, $zero /* 18C04 8003D804 0C01BEB4 */ jal fx_landing_dust /* 18C08 8003D808 E7A00010 */ swc1 $f0, 0x10($sp) /* 18C0C 8003D80C C6000000 */ lwc1 $f0, 0x0($s0) /* 18C10 8003D810 3C01420C */ lui $at, (0x420C0000 >> 16) /* 18C14 8003D814 44816000 */ mtc1 $at, $f12 /* 18C18 8003D818 0C00A6C9 */ jal clamp_angle /* 18C1C 8003D81C 460C0300 */ add.s $f12, $f0, $f12 /* 18C20 8003D820 0800F689 */ j .L8003DA24 /* 18C24 8003D824 E6000000 */ swc1 $f0, 0x0($s0) .L8003D828: /* 18C28 8003D828 44050000 */ mfc1 $a1, $f0 /* 18C2C 8003D82C 44061000 */ mfc1 $a2, $f2 /* 18C30 8003D830 44072000 */ mfc1 $a3, $f4 /* 18C34 8003D834 3C014150 */ lui $at, (0x41500000 >> 16) /* 18C38 8003D838 44810000 */ mtc1 $at, $f0 /* 18C3C 8003D83C 3C014120 */ lui $at, (0x41200000 >> 16) /* 18C40 8003D840 44811000 */ mtc1 $at, $f2 /* 18C44 8003D844 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 18C48 8003D848 44812000 */ mtc1 $at, $f4 /* 18C4C 8003D84C 2402001E */ addiu $v0, $zero, 0x1E /* 18C50 8003D850 AFB1001C */ sw $s1, 0x1C($sp) /* 18C54 8003D854 AFA20020 */ sw $v0, 0x20($sp) /* 18C58 8003D858 0800F686 */ j .L8003DA18 /* 18C5C 8003D85C E7A00010 */ swc1 $f0, 0x10($sp) .L8003D860: /* 18C60 8003D860 10A00070 */ beqz $a1, .L8003DA24 /* 18C64 8003D864 00000000 */ nop /* 18C68 8003D868 3C048007 */ lui $a0, %hi(D_80077C14) /* 18C6C 8003D86C 24847C14 */ addiu $a0, $a0, %lo(D_80077C14) /* 18C70 8003D870 94820000 */ lhu $v0, 0x0($a0) /* 18C74 8003D874 24430001 */ addiu $v1, $v0, 0x1 /* 18C78 8003D878 00021400 */ sll $v0, $v0, 16 /* 18C7C 8003D87C 00021403 */ sra $v0, $v0, 16 /* 18C80 8003D880 28420004 */ slti $v0, $v0, 0x4 /* 18C84 8003D884 14400067 */ bnez $v0, .L8003DA24 /* 18C88 8003D888 A4830000 */ sh $v1, 0x0($a0) /* 18C8C 8003D88C 14C00034 */ bnez $a2, .L8003D960 /* 18C90 8003D890 A4800000 */ sh $zero, 0x0($a0) /* 18C94 8003D894 C60C000C */ lwc1 $f12, 0xC($s0) /* 18C98 8003D898 0C00A6C9 */ jal clamp_angle /* 18C9C 8003D89C 46006307 */ neg.s $f12, $f12 /* 18CA0 8003D8A0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 18CA4 8003D8A4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 18CA8 8003D8A8 44811000 */ mtc1 $at, $f2 /* 18CAC 8003D8AC 00000000 */ nop /* 18CB0 8003D8B0 46020002 */ mul.s $f0, $f0, $f2 /* 18CB4 8003D8B4 00000000 */ nop /* 18CB8 8003D8B8 27A50028 */ addiu $a1, $sp, 0x28 /* 18CBC 8003D8BC 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 18CC0 8003D8C0 44816000 */ mtc1 $at, $f12 /* 18CC4 8003D8C4 27A6002C */ addiu $a2, $sp, 0x2C /* 18CC8 8003D8C8 0C00A82D */ jal sin_cos_rad /* 18CCC 8003D8CC 460C0303 */ div.s $f12, $f0, $f12 /* 18CD0 8003D8D0 860200A6 */ lh $v0, 0xA6($s0) /* 18CD4 8003D8D4 C7AA0028 */ lwc1 $f10, 0x28($sp) /* 18CD8 8003D8D8 44821000 */ mtc1 $v0, $f2 /* 18CDC 8003D8DC 00000000 */ nop /* 18CE0 8003D8E0 468010A0 */ cvt.s.w $f2, $f2 /* 18CE4 8003D8E4 460A1182 */ mul.s $f6, $f2, $f10 /* 18CE8 8003D8E8 00000000 */ nop /* 18CEC 8003D8EC C7A8002C */ lwc1 $f8, 0x2C($sp) /* 18CF0 8003D8F0 46081082 */ mul.s $f2, $f2, $f8 /* 18CF4 8003D8F4 00000000 */ nop /* 18CF8 8003D8F8 3C013E4C */ lui $at, (0x3E4CCCCD >> 16) /* 18CFC 8003D8FC 3421CCCD */ ori $at, $at, (0x3E4CCCCD & 0xFFFF) /* 18D00 8003D900 44810000 */ mtc1 $at, $f0 /* 18D04 8003D904 00000000 */ nop /* 18D08 8003D908 46003182 */ mul.s $f6, $f6, $f0 /* 18D0C 8003D90C 00000000 */ nop /* 18D10 8003D910 46001082 */ mul.s $f2, $f2, $f0 /* 18D14 8003D914 00000000 */ nop /* 18D18 8003D918 C604003C */ lwc1 $f4, 0x3C($s0) /* 18D1C 8003D91C 3C013FC0 */ lui $at, (0x3FC00000 >> 16) /* 18D20 8003D920 44810000 */ mtc1 $at, $f0 /* 18D24 8003D924 00000000 */ nop /* 18D28 8003D928 46002100 */ add.s $f4, $f4, $f0 /* 18D2C 8003D92C C6000038 */ lwc1 $f0, 0x38($s0) /* 18D30 8003D930 46060000 */ add.s $f0, $f0, $f6 /* 18D34 8003D934 44050000 */ mfc1 $a1, $f0 /* 18D38 8003D938 C6000040 */ lwc1 $f0, 0x40($s0) /* 18D3C 8003D93C 46020000 */ add.s $f0, $f0, $f2 /* 18D40 8003D940 44062000 */ mfc1 $a2, $f4 /* 18D44 8003D944 44070000 */ mfc1 $a3, $f0 /* 18D48 8003D948 0000202D */ daddu $a0, $zero, $zero /* 18D4C 8003D94C E7AA0010 */ swc1 $f10, 0x10($sp) /* 18D50 8003D950 0C01BECC */ jal fx_walking_dust /* 18D54 8003D954 E7A80014 */ swc1 $f8, 0x14($sp) /* 18D58 8003D958 0800F689 */ j .L8003DA24 /* 18D5C 8003D95C 00000000 */ nop .L8003D960: /* 18D60 8003D960 0C00A6C9 */ jal clamp_angle /* 18D64 8003D964 C60C000C */ lwc1 $f12, 0xC($s0) /* 18D68 8003D968 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 18D6C 8003D96C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 18D70 8003D970 44811000 */ mtc1 $at, $f2 /* 18D74 8003D974 00000000 */ nop /* 18D78 8003D978 46020002 */ mul.s $f0, $f0, $f2 /* 18D7C 8003D97C 00000000 */ nop /* 18D80 8003D980 27A50028 */ addiu $a1, $sp, 0x28 /* 18D84 8003D984 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 18D88 8003D988 44816000 */ mtc1 $at, $f12 /* 18D8C 8003D98C 27A6002C */ addiu $a2, $sp, 0x2C /* 18D90 8003D990 0C00A82D */ jal sin_cos_rad /* 18D94 8003D994 460C0303 */ div.s $f12, $f0, $f12 /* 18D98 8003D998 C602003C */ lwc1 $f2, 0x3C($s0) /* 18D9C 8003D99C 3C013FC0 */ lui $at, (0x3FC00000 >> 16) /* 18DA0 8003D9A0 44810000 */ mtc1 $at, $f0 /* 18DA4 8003D9A4 860200A6 */ lh $v0, 0xA6($s0) /* 18DA8 8003D9A8 46001080 */ add.s $f2, $f2, $f0 /* 18DAC 8003D9AC C7A40028 */ lwc1 $f4, 0x28($sp) /* 18DB0 8003D9B0 44820000 */ mtc1 $v0, $f0 /* 18DB4 8003D9B4 00000000 */ nop /* 18DB8 8003D9B8 46800020 */ cvt.s.w $f0, $f0 /* 18DBC 8003D9BC 46040102 */ mul.s $f4, $f0, $f4 /* 18DC0 8003D9C0 00000000 */ nop /* 18DC4 8003D9C4 44061000 */ mfc1 $a2, $f2 /* 18DC8 8003D9C8 C7A2002C */ lwc1 $f2, 0x2C($sp) /* 18DCC 8003D9CC 46020002 */ mul.s $f0, $f0, $f2 /* 18DD0 8003D9D0 00000000 */ nop /* 18DD4 8003D9D4 24040003 */ addiu $a0, $zero, 0x3 /* 18DD8 8003D9D8 C6060038 */ lwc1 $f6, 0x38($s0) /* 18DDC 8003D9DC C6080040 */ lwc1 $f8, 0x40($s0) /* 18DE0 8003D9E0 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 18DE4 8003D9E4 44811000 */ mtc1 $at, $f2 /* 18DE8 8003D9E8 46043180 */ add.s $f6, $f6, $f4 /* 18DEC 8003D9EC E7A20010 */ swc1 $f2, 0x10($sp) /* 18DF0 8003D9F0 3C014120 */ lui $at, (0x41200000 >> 16) /* 18DF4 8003D9F4 44811000 */ mtc1 $at, $f2 /* 18DF8 8003D9F8 46004200 */ add.s $f8, $f8, $f0 /* 18DFC 8003D9FC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 18E00 8003DA00 44812000 */ mtc1 $at, $f4 /* 18E04 8003DA04 44053000 */ mfc1 $a1, $f6 /* 18E08 8003DA08 44074000 */ mfc1 $a3, $f8 /* 18E0C 8003DA0C 2402001E */ addiu $v0, $zero, 0x1E /* 18E10 8003DA10 AFB1001C */ sw $s1, 0x1C($sp) /* 18E14 8003DA14 AFA20020 */ sw $v0, 0x20($sp) .L8003DA18: /* 18E18 8003DA18 E7A20014 */ swc1 $f2, 0x14($sp) /* 18E1C 8003DA1C 0C01C8D4 */ jal fx_misc_particles /* 18E20 8003DA20 E7A40018 */ swc1 $f4, 0x18($sp) .L8003DA24: /* 18E24 8003DA24 8FBF0038 */ lw $ra, 0x38($sp) /* 18E28 8003DA28 8FB10034 */ lw $s1, 0x34($sp) /* 18E2C 8003DA2C 8FB00030 */ lw $s0, 0x30($sp) /* 18E30 8003DA30 03E00008 */ jr $ra /* 18E34 8003DA34 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void spawn_default_surface_effects(Npc* npc, SurfaceInteractMode mode) { s32 mapIsStarWay; f32 sinTheta; f32 cosTheta; mapIsStarWay = FALSE; if (gGameStatusPtr->areaID == AREA_HOS) { mapIsStarWay = gGameStatusPtr->mapID == 2; //TODO hard-coded map ID } if (mode == SURFACE_INTERACT_LAND) { f32 x = npc->pos.x; f32 y = npc->pos.y + 0.0f; f32 z = npc->pos.z; if (!mapIsStarWay) { fx_landing_dust(0, x, y, z, D_80077C10); D_80077C10 = clamp_angle(D_80077C10 + 35.0f); } else { fx_misc_particles(3, x, y, z, 13.0f, 10.0f, 1.0f, 5, 30); } } else if (mode != SURFACE_INTERACT_WALK) { if (D_80077C14++ >= 4) { D_80077C14 = 0; if (!mapIsStarWay) { sin_cos_rad(DEG_TO_RAD(clamp_angle(-npc->yaw)), &sinTheta, &cosTheta); fx_walking_dust(0, npc->pos.x + (npc->collisionDiameter * sinTheta * 0.2f), npc->pos.y + 1.5f, npc->pos.z + (npc->collisionDiameter * cosTheta * 0.2f), sinTheta, cosTheta); } else { sin_cos_rad(DEG_TO_RAD(clamp_angle(npc->yaw)), &sinTheta, &cosTheta); fx_misc_particles(3, npc->pos.x + (npc->collisionDiameter * sinTheta), npc->pos.y + 1.5f, npc->pos.z + (npc->collisionDiameter * cosTheta), 5.0f, 10.0f, 1.0f, 5, 30); } } } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_80252924 /* 181204 80252924 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 181208 80252928 AFB20018 */ sw $s2, 0x18($sp) /* 18120C 8025292C 0080902D */ daddu $s2, $a0, $zero /* 181210 80252930 AFBF0020 */ sw $ra, 0x20($sp) /* 181214 80252934 AFB3001C */ sw $s3, 0x1C($sp) /* 181218 80252938 AFB10014 */ sw $s1, 0x14($sp) /* 18121C 8025293C AFB00010 */ sw $s0, 0x10($sp) /* 181220 80252940 8E50000C */ lw $s0, 0xC($s2) /* 181224 80252944 3C11800E */ lui $s1, %hi(gBattleStatus) dgb_01_D_80252948_C101C8: /* 181228 80252948 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) /* 18122C 8025294C 8E130000 */ lw $s3, 0x0($s0) jtbl_80252950: /* 181230 80252950 26100004 */ addiu $s0, $s0, 0x4 /* 181234 80252954 8E020000 */ lw $v0, 0x0($s0) /* 181238 80252958 26100004 */ addiu $s0, $s0, 0x4 /* 18123C 8025295C AE20018C */ sw $zero, 0x18C($s1) /* 181240 80252960 AE220188 */ sw $v0, 0x188($s1) /* 181244 80252964 8E020000 */ lw $v0, 0x0($s0) /* 181248 80252968 26100004 */ addiu $s0, $s0, 0x4 /* 18124C 8025296C AE220190 */ sw $v0, 0x190($s1) jtbl_80252970: /* 181250 80252970 8E050000 */ lw $a1, 0x0($s0) dgb_01_D_80252974_C101F4: /* 181254 80252974 0C0B1EAF */ jal evt_get_variable /* 181258 80252978 26100004 */ addiu $s0, $s0, 0x4 /* 18125C 8025297C 8E230190 */ lw $v1, 0x190($s1) /* 181260 80252980 0240202D */ daddu $a0, $s2, $zero /* 181264 80252984 00621825 */ or $v1, $v1, $v0 /* 181268 80252988 AE230190 */ sw $v1, 0x190($s1) /* 18126C 8025298C 8E050000 */ lw $a1, 0x0($s0) /* 181270 80252990 0C0B1EAF */ jal evt_get_variable /* 181274 80252994 26100004 */ addiu $s0, $s0, 0x4 /* 181278 80252998 A622017E */ sh $v0, 0x17E($s1) /* 18127C 8025299C 8E100000 */ lw $s0, 0x0($s0) dgb_01_D_802529A0_C10220: /* 181280 802529A0 24020030 */ addiu $v0, $zero, 0x30 /* 181284 802529A4 32030030 */ andi $v1, $s0, 0x30 /* 181288 802529A8 54620004 */ bnel $v1, $v0, .L802529BC /* 18128C 802529AC 32020010 */ andi $v0, $s0, 0x10 jtbl_802529B0: /* 181290 802529B0 8E220000 */ lw $v0, 0x0($s1) D_802529B4: /* 181294 802529B4 08094A7F */ j .L802529FC /* 181298 802529B8 34420030 */ ori $v0, $v0, 0x30 .L802529BC: /* 18129C 802529BC 10400004 */ beqz $v0, mac_05_Quizmo_Worker /* 1812A0 802529C0 2403FFDF */ addiu $v1, $zero, -0x21 /* 1812A4 802529C4 8E220000 */ lw $v0, 0x0($s1) D_802529C8: /* 1812A8 802529C8 08094A7E */ j dgb_01_D_802529F8_C10278 dgb_01_D_802529CC_C1024C: /* 1812AC 802529CC 34420010 */ ori $v0, $v0, 0x10 mac_05_Quizmo_Worker: /* 1812B0 802529D0 32020020 */ andi $v0, $s0, 0x20 /* 1812B4 802529D4 10400005 */ beqz $v0, .L802529EC /* 1812B8 802529D8 2403FFEF */ addiu $v1, $zero, -0x11 /* 1812BC 802529DC 8E220000 */ lw $v0, 0x0($s1) /* 1812C0 802529E0 00431024 */ and $v0, $v0, $v1 /* 1812C4 802529E4 08094A7F */ j .L802529FC mac_05_Quizmo_AnswerResult: /* 1812C8 802529E8 34420020 */ ori $v0, $v0, 0x20 .L802529EC: /* 1812CC 802529EC 8E220000 */ lw $v0, 0x0($s1) mac_05_Quizmo_StageEffect: /* 1812D0 802529F0 00431024 */ and $v0, $v0, $v1 mac_05_Quizmo_AudienceEffect: /* 1812D4 802529F4 2403FFDF */ addiu $v1, $zero, -0x21 dgb_01_D_802529F8_C10278: /* 1812D8 802529F8 00431024 */ and $v0, $v0, $v1 .L802529FC: /* 1812DC 802529FC AE220000 */ sw $v0, 0x0($s1) mac_05_D_80252A00: /* 1812E0 80252A00 32020040 */ andi $v0, $s0, 0x40 /* 1812E4 80252A04 10400007 */ beqz $v0, dgb_01_D_80252A24_C102A4 /* 1812E8 80252A08 2404FFBF */ addiu $a0, $zero, -0x41 /* 1812EC 80252A0C 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1812F0 80252A10 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1812F4 80252A14 8C620000 */ lw $v0, 0x0($v1) /* 1812F8 80252A18 34420040 */ ori $v0, $v0, 0x40 /* 1812FC 80252A1C 08094A8E */ j .L80252A38 /* 181300 80252A20 AC620000 */ sw $v0, 0x0($v1) dgb_01_D_80252A24_C102A4: /* 181304 80252A24 3C02800E */ lui $v0, %hi(gBattleStatus) /* 181308 80252A28 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 18130C 80252A2C 8C430000 */ lw $v1, 0x0($v0) /* 181310 80252A30 00641824 */ and $v1, $v1, $a0 /* 181314 80252A34 AC430000 */ sw $v1, 0x0($v0) .L80252A38: /* 181318 80252A38 32020200 */ andi $v0, $s0, 0x200 /* 18131C 80252A3C 10400007 */ beqz $v0, .L80252A5C /* 181320 80252A40 2404FDFF */ addiu $a0, $zero, -0x201 /* 181324 80252A44 3C03800E */ lui $v1, %hi(gBattleStatus) /* 181328 80252A48 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 18132C 80252A4C 8C620000 */ lw $v0, 0x0($v1) dgb_01_D_80252A50_C102D0: /* 181330 80252A50 34420200 */ ori $v0, $v0, 0x200 /* 181334 80252A54 08094A9C */ j .L80252A70 /* 181338 80252A58 AC620000 */ sw $v0, 0x0($v1) .L80252A5C: /* 18133C 80252A5C 3C02800E */ lui $v0, %hi(gBattleStatus) /* 181340 80252A60 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 181344 80252A64 8C430000 */ lw $v1, 0x0($v0) /* 181348 80252A68 00641824 */ and $v1, $v1, $a0 /* 18134C 80252A6C AC430000 */ sw $v1, 0x0($v0) .L80252A70: /* 181350 80252A70 32020080 */ andi $v0, $s0, 0x80 /* 181354 80252A74 10400007 */ beqz $v0, .L80252A94 /* 181358 80252A78 2404FF7F */ addiu $a0, $zero, -0x81 dgb_01_D_80252A7C_C102FC: /* 18135C 80252A7C 3C03800E */ lui $v1, %hi(gBattleStatus) /* 181360 80252A80 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 181364 80252A84 8C620000 */ lw $v0, 0x0($v1) /* 181368 80252A88 34420080 */ ori $v0, $v0, 0x80 /* 18136C 80252A8C 08094AAA */ j dgb_01_D_80252AA8_C10328 /* 181370 80252A90 AC620000 */ sw $v0, 0x0($v1) .L80252A94: /* 181374 80252A94 3C02800E */ lui $v0, %hi(gBattleStatus) /* 181378 80252A98 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 18137C 80252A9C 8C430000 */ lw $v1, 0x0($v0) /* 181380 80252AA0 00641824 */ and $v1, $v1, $a0 /* 181384 80252AA4 AC430000 */ sw $v1, 0x0($v0) dgb_01_D_80252AA8_C10328: /* 181388 80252AA8 0C09A75B */ jal get_actor /* 18138C 80252AAC 8E440148 */ lw $a0, 0x148($s2) /* 181390 80252AB0 94430428 */ lhu $v1, 0x428($v0) /* 181394 80252AB4 A62301A0 */ sh $v1, 0x1A0($s1) /* 181398 80252AB8 92230193 */ lbu $v1, 0x193($s1) /* 18139C 80252ABC 90420426 */ lbu $v0, 0x426($v0) /* 1813A0 80252AC0 A2230194 */ sb $v1, 0x194($s1) /* 1813A4 80252AC4 306300FF */ andi $v1, $v1, 0xFF /* 1813A8 80252AC8 A22201A2 */ sb $v0, 0x1A2($s1) /* 1813AC 80252ACC 240200FF */ addiu $v0, $zero, 0xFF /* 1813B0 80252AD0 50620001 */ beql $v1, $v0, .L80252AD8 dgb_01_D_80252AD4_C10354: /* 1813B4 80252AD4 A2200194 */ sb $zero, 0x194($s1) .L80252AD8: /* 1813B8 80252AD8 8E220190 */ lw $v0, 0x190($s1) /* 1813BC 80252ADC 30420F00 */ andi $v0, $v0, 0xF00 /* 1813C0 80252AE0 00021203 */ sra $v0, $v0, 8 /* 1813C4 80252AE4 0C0945BA */ jal func_802516E8 /* 1813C8 80252AE8 A2220195 */ sb $v0, 0x195($s1) /* 1813CC 80252AEC 0440000B */ bltz $v0, .L80252B1C /* 1813D0 80252AF0 0240202D */ daddu $a0, $s2, $zero /* 1813D4 80252AF4 0260282D */ daddu $a1, $s3, $zero /* 1813D8 80252AF8 0C0B2026 */ jal evt_set_variable /* 1813DC 80252AFC 0040302D */ daddu $a2, $v0, $zero dgb_01_D_80252B00_C10380: /* 1813E0 80252B00 0C0B1069 */ jal does_script_exist_by_ref /* 1813E4 80252B04 0240202D */ daddu $a0, $s2, $zero /* 1813E8 80252B08 0040182D */ daddu $v1, $v0, $zero /* 1813EC 80252B0C 10600004 */ beqz $v1, .L80252B20 /* 1813F0 80252B10 240200FF */ addiu $v0, $zero, 0xFF /* 1813F4 80252B14 08094AC8 */ j .L80252B20 /* 1813F8 80252B18 24020002 */ addiu $v0, $zero, 0x2 .L80252B1C: /* 1813FC 80252B1C 240200FF */ addiu $v0, $zero, 0xFF .L80252B20: /* 181400 80252B20 8FBF0020 */ lw $ra, 0x20($sp) /* 181404 80252B24 8FB3001C */ lw $s3, 0x1C($sp) /* 181408 80252B28 8FB20018 */ lw $s2, 0x18($sp) dgb_01_D_80252B2C_C103AC: /* 18140C 80252B2C 8FB10014 */ lw $s1, 0x14($sp) /* 181410 80252B30 8FB00010 */ lw $s0, 0x10($sp) /* 181414 80252B34 03E00008 */ jr $ra /* 181418 80252B38 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus ItemSpookEnemy(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Bytecode* args = script->ptrReadPos; s32 hitResultVarOut = *args++; Actor* actor; HitResult hitResult; s32 flags; battleStatus->currentAttackElement = *args++; battleStatus->currentAttackEventSuppression = 0; battleStatus->currentAttackStatus = *args++; battleStatus->currentAttackStatus |= evt_get_variable(script, *args++); battleStatus->currentAttackDamage = evt_get_variable(script, *args++); flags = *args++; if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) { gBattleStatus.flags1 |= BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_10) { gBattleStatus.flags1 |= BS_FLAGS1_10; gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) { gBattleStatus.flags1 &= ~BS_FLAGS1_10; gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_10; gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE; } if (flags & BS_FLAGS1_40) { gBattleStatus.flags1 |= BS_FLAGS1_40; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_40; } if (flags & BS_FLAGS1_200) { gBattleStatus.flags1 |= BS_FLAGS1_200; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_200; } if (flags & BS_FLAGS1_80) { gBattleStatus.flags1 |= BS_FLAGS1_80; } else { gBattleStatus.flags1 &= ~BS_FLAGS1_80; } actor = get_actor(script->owner1.actorID); battleStatus->currentTargetID = actor->targetActorID; battleStatus->currentTargetPart = actor->targetPartIndex; battleStatus->statusChance = battleStatus->currentAttackStatus; if (battleStatus->statusChance == STATUS_KEY_NEVER) { battleStatus->statusChance = 0; } battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8; hitResult = calc_item_damage_enemy(); if (hitResult < 0) { return ApiStatus_FINISH; } evt_set_variable(script, hitResultVarOut, hitResult); if (!does_script_exist_by_ref(script)) { return ApiStatus_FINISH; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_8005DB00 /* 38F00 8005DB00 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 38F04 8005DB04 AFB20018 */ sw $s2, 0x18($sp) /* 38F08 8005DB08 0080902D */ daddu $s2, $a0, $zero /* 38F0C 8005DB0C AFBF0020 */ sw $ra, 0x20($sp) /* 38F10 8005DB10 AFB3001C */ sw $s3, 0x1C($sp) /* 38F14 8005DB14 AFB10014 */ sw $s1, 0x14($sp) /* 38F18 8005DB18 AFB00010 */ sw $s0, 0x10($sp) /* 38F1C 8005DB1C 8E420148 */ lw $v0, 0x148($s2) /* 38F20 8005DB20 84440008 */ lh $a0, 0x8($v0) /* 38F24 8005DB24 0C00EABB */ jal get_npc_unsafe /* 38F28 8005DB28 00A0802D */ daddu $s0, $a1, $zero /* 38F2C 8005DB2C 3C138011 */ lui $s3, %hi(gPlayerStatus) /* 38F30 8005DB30 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus) /* 38F34 8005DB34 12000002 */ beqz $s0, .L8005DB40 /* 38F38 8005DB38 0040882D */ daddu $s1, $v0, $zero /* 38F3C 8005DB3C AE400070 */ sw $zero, 0x70($s2) .L8005DB40: /* 38F40 8005DB40 8E440070 */ lw $a0, 0x70($s2) /* 38F44 8005DB44 10800005 */ beqz $a0, .L8005DB5C /* 38F48 8005DB48 24020001 */ addiu $v0, $zero, 0x1 /* 38F4C 8005DB4C 1082001F */ beq $a0, $v0, .L8005DBCC /* 38F50 8005DB50 0000102D */ daddu $v0, $zero, $zero /* 38F54 8005DB54 0801774E */ j .L8005DD38 /* 38F58 8005DB58 00000000 */ nop .L8005DB5C: /* 38F5C 8005DB5C 0240202D */ daddu $a0, $s2, $zero /* 38F60 8005DB60 3C05FE36 */ lui $a1, (0xFE363C80 >> 16) /* 38F64 8005DB64 0C0B210B */ jal evt_get_float_variable /* 38F68 8005DB68 34A53C80 */ ori $a1, $a1, (0xFE363C80 & 0xFFFF) /* 38F6C 8005DB6C 0240202D */ daddu $a0, $s2, $zero /* 38F70 8005DB70 3C05FE36 */ lui $a1, (0xFE363C81 >> 16) /* 38F74 8005DB74 34A53C81 */ ori $a1, $a1, (0xFE363C81 & 0xFFFF) /* 38F78 8005DB78 0C0B1EAF */ jal evt_get_variable /* 38F7C 8005DB7C E6200010 */ swc1 $f0, 0x10($s1) /* 38F80 8005DB80 0240202D */ daddu $a0, $s2, $zero /* 38F84 8005DB84 3C05FE36 */ lui $a1, (0xFE363C82 >> 16) /* 38F88 8005DB88 34A53C82 */ ori $a1, $a1, (0xFE363C82 & 0xFFFF) /* 38F8C 8005DB8C 0C0B1EAF */ jal evt_get_variable /* 38F90 8005DB90 A622008E */ sh $v0, 0x8E($s1) /* 38F94 8005DB94 0240202D */ daddu $a0, $s2, $zero /* 38F98 8005DB98 3C05FE36 */ lui $a1, (0xFE363C83 >> 16) /* 38F9C 8005DB9C 34A53C83 */ ori $a1, $a1, (0xFE363C83 & 0xFFFF) /* 38FA0 8005DBA0 0C0B1EAF */ jal evt_get_variable /* 38FA4 8005DBA4 AE420074 */ sw $v0, 0x74($s2) /* 38FA8 8005DBA8 00021FC2 */ srl $v1, $v0, 31 /* 38FAC 8005DBAC 00621821 */ addu $v1, $v1, $v0 /* 38FB0 8005DBB0 8E4200AC */ lw $v0, 0xAC($s2) /* 38FB4 8005DBB4 00031843 */ sra $v1, $v1, 1 /* 38FB8 8005DBB8 AE430078 */ sw $v1, 0x78($s2) /* 38FBC 8005DBBC AE220028 */ sw $v0, 0x28($s1) /* 38FC0 8005DBC0 24020001 */ addiu $v0, $zero, 0x1 /* 38FC4 8005DBC4 0801774D */ j .L8005DD34 /* 38FC8 8005DBC8 AE420070 */ sw $v0, 0x70($s2) .L8005DBCC: /* 38FCC 8005DBCC 3C028011 */ lui $v0, %hi(gPartnerStatus) /* 38FD0 8005DBD0 2442EBB0 */ addiu $v0, $v0, %lo(gPartnerStatus) /* 38FD4 8005DBD4 80430003 */ lb $v1, 0x3($v0) /* 38FD8 8005DBD8 24020009 */ addiu $v0, $zero, 0x9 /* 38FDC 8005DBDC 10620056 */ beq $v1, $v0, .L8005DD38 /* 38FE0 8005DBE0 0000102D */ daddu $v0, $zero, $zero /* 38FE4 8005DBE4 8622008E */ lh $v0, 0x8E($s1) /* 38FE8 8005DBE8 10400005 */ beqz $v0, .L8005DC00 /* 38FEC 8005DBEC 00000000 */ nop /* 38FF0 8005DBF0 1044002C */ beq $v0, $a0, .L8005DCA4 /* 38FF4 8005DBF4 0000102D */ daddu $v0, $zero, $zero /* 38FF8 8005DBF8 0801774E */ j .L8005DD38 /* 38FFC 8005DBFC 00000000 */ nop .L8005DC00: /* 39000 8005DC00 C6620028 */ lwc1 $f2, 0x28($s3) /* 39004 8005DC04 C6200038 */ lwc1 $f0, 0x38($s1) /* 39008 8005DC08 46001081 */ sub.s $f2, $f2, $f0 /* 3900C 8005DC0C 46021082 */ mul.s $f2, $f2, $f2 /* 39010 8005DC10 00000000 */ nop /* 39014 8005DC14 C666002C */ lwc1 $f6, 0x2C($s3) /* 39018 8005DC18 C620003C */ lwc1 $f0, 0x3C($s1) /* 3901C 8005DC1C 46003181 */ sub.s $f6, $f6, $f0 /* 39020 8005DC20 46063182 */ mul.s $f6, $f6, $f6 /* 39024 8005DC24 00000000 */ nop /* 39028 8005DC28 C6240040 */ lwc1 $f4, 0x40($s1) /* 3902C 8005DC2C C6600030 */ lwc1 $f0, 0x30($s3) /* 39030 8005DC30 46040001 */ sub.s $f0, $f0, $f4 /* 39034 8005DC34 46000002 */ mul.s $f0, $f0, $f0 /* 39038 8005DC38 00000000 */ nop /* 3903C 8005DC3C 46061080 */ add.s $f2, $f2, $f6 /* 39040 8005DC40 46001300 */ add.s $f12, $f2, $f0 /* 39044 8005DC44 46006104 */ sqrt.s $f4, $f12 /* 39048 8005DC48 46042032 */ c.eq.s $f4, $f4 /* 3904C 8005DC4C 00000000 */ nop /* 39050 8005DC50 45010004 */ bc1t .L8005DC64 /* 39054 8005DC54 00000000 */ nop /* 39058 8005DC58 0C0187BC */ jal sqrtf /* 3905C 8005DC5C 00000000 */ nop /* 39060 8005DC60 46000106 */ mov.s $f4, $f0 .L8005DC64: /* 39064 8005DC64 C6200010 */ lwc1 $f0, 0x10($s1) /* 39068 8005DC68 4600203E */ c.le.s $f4, $f0 /* 3906C 8005DC6C 00000000 */ nop /* 39070 8005DC70 45000031 */ bc1f .L8005DD38 /* 39074 8005DC74 0000102D */ daddu $v0, $zero, $zero /* 39078 8005DC78 C62C0038 */ lwc1 $f12, 0x38($s1) /* 3907C 8005DC7C C62E0040 */ lwc1 $f14, 0x40($s1) /* 39080 8005DC80 8E660028 */ lw $a2, 0x28($s3) /* 39084 8005DC84 0C00A720 */ jal atan2 /* 39088 8005DC88 8E670030 */ lw $a3, 0x30($s3) /* 3908C 8005DC8C 8E430074 */ lw $v1, 0x74($s2) /* 39090 8005DC90 2402FFFF */ addiu $v0, $zero, -0x1 /* 39094 8005DC94 10620016 */ beq $v1, $v0, .L8005DCF0 /* 39098 8005DC98 00000000 */ nop /* 3909C 8005DC9C 0801773E */ j .L8005DCF8 /* 390A0 8005DCA0 00000000 */ nop .L8005DCA4: /* 390A4 8005DCA4 C62C0038 */ lwc1 $f12, 0x38($s1) /* 390A8 8005DCA8 C62E0040 */ lwc1 $f14, 0x40($s1) /* 390AC 8005DCAC 8E660028 */ lw $a2, 0x28($s3) /* 390B0 8005DCB0 0C00A7B5 */ jal dist2D /* 390B4 8005DCB4 8E670030 */ lw $a3, 0x30($s3) /* 390B8 8005DCB8 C6220010 */ lwc1 $f2, 0x10($s1) /* 390BC 8005DCBC 4602003E */ c.le.s $f0, $f2 /* 390C0 8005DCC0 00000000 */ nop /* 390C4 8005DCC4 4500001C */ bc1f .L8005DD38 /* 390C8 8005DCC8 0000102D */ daddu $v0, $zero, $zero /* 390CC 8005DCCC C62C0038 */ lwc1 $f12, 0x38($s1) /* 390D0 8005DCD0 C62E0040 */ lwc1 $f14, 0x40($s1) /* 390D4 8005DCD4 8E660028 */ lw $a2, 0x28($s3) /* 390D8 8005DCD8 0C00A720 */ jal atan2 /* 390DC 8005DCDC 8E670030 */ lw $a3, 0x30($s3) /* 390E0 8005DCE0 8E430074 */ lw $v1, 0x74($s2) /* 390E4 8005DCE4 2402FFFF */ addiu $v0, $zero, -0x1 /* 390E8 8005DCE8 14620003 */ bne $v1, $v0, .L8005DCF8 /* 390EC 8005DCEC 00000000 */ nop .L8005DCF0: /* 390F0 8005DCF0 08017741 */ j .L8005DD04 /* 390F4 8005DCF4 C62C000C */ lwc1 $f12, 0xC($s1) .L8005DCF8: /* 390F8 8005DCF8 44836000 */ mtc1 $v1, $f12 /* 390FC 8005DCFC 00000000 */ nop /* 39100 8005DD00 46806320 */ cvt.s.w $f12, $f12 .L8005DD04: /* 39104 8005DD04 0C00A70A */ jal get_clamped_angle_diff /* 39108 8005DD08 46000386 */ mov.s $f14, $f0 /* 3910C 8005DD0C C6420078 */ lwc1 $f2, 0x78($s2) /* 39110 8005DD10 468010A0 */ cvt.s.w $f2, $f2 /* 39114 8005DD14 46000005 */ abs.s $f0, $f0 /* 39118 8005DD18 4602003C */ c.lt.s $f0, $f2 /* 3911C 8005DD1C 00000000 */ nop /* 39120 8005DD20 45000004 */ bc1f .L8005DD34 /* 39124 8005DD24 24020001 */ addiu $v0, $zero, 0x1 /* 39128 8005DD28 AE420084 */ sw $v0, 0x84($s2) /* 3912C 8005DD2C 0801774E */ j .L8005DD38 /* 39130 8005DD30 24020002 */ addiu $v0, $zero, 0x2 .L8005DD34: /* 39134 8005DD34 0000102D */ daddu $v0, $zero, $zero .L8005DD38: /* 39138 8005DD38 8FBF0020 */ lw $ra, 0x20($sp) /* 3913C 8005DD3C 8FB3001C */ lw $s3, 0x1C($sp) /* 39140 8005DD40 8FB20018 */ lw $s2, 0x18($sp) /* 39144 8005DD44 8FB10014 */ lw $s1, 0x14($sp) /* 39148 8005DD48 8FB00010 */ lw $s0, 0x10($sp) /* 3914C 8005DD4C 03E00008 */ jr $ra /* 39150 8005DD50 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus func_8005DB00(Evt* script, s32 isInitialCall) { Npc* npc; f32 targetDir, npcYaw; PlayerStatus* playerStatus; PartnerStatus* partnerStatus; npc = get_npc_unsafe(script->owner1.enemy->npcID); playerStatus = &gPlayerStatus; partnerStatus = &gPartnerStatus; if (isInitialCall) { script->functionTemp[0] = 0; } switch (script->functionTemp[0]) { case 0: npc->planarFlyDist = evt_get_float_variable(script, LVar0); npc->duration = evt_get_variable(script, LVar1); script->functionTemp[1] = evt_get_variable(script, LVar2); script->functionTemp[2] = evt_get_variable(script, LVar3) / 2; npc->currentAnim = script->varTable[10]; script->functionTemp[0] = 1; break; case 1: if (partnerStatus->actingPartner != PARTNER_BOW) { if (npc->duration != 0 && npc->duration != script->functionTemp[0]) { return ApiStatus_BLOCK; } if (npc->duration == 0) { if (sqrtf(SQ((playerStatus->position.x - npc->pos.x)) + SQ((playerStatus->position.y - npc->pos.y)) + SQ((playerStatus->position.z - npc->pos.z))) <= npc->planarFlyDist) { targetDir = atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z); npcYaw = script->functionTemp[1] == -1 ? npc->yaw : script->functionTemp[1]; if (fabsf(get_clamped_angle_diff(npcYaw, targetDir)) < script->functionTemp[2]) { script->varTable[0] = 1; return ApiStatus_DONE2; } } } else { if (dist2D(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z) <= npc->planarFlyDist) { targetDir = atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z); npcYaw = script->functionTemp[1] == -1 ? npc->yaw : script->functionTemp[1]; if (fabsf(get_clamped_angle_diff(npcYaw, targetDir)) < script->functionTemp[2]) { script->varTable[0] = 1; return ApiStatus_DONE2; } } } } break; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel phys_update_action_state /* 7EEDC 800E5A2C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 7EEE0 800E5A30 3C04800B */ lui $a0, %hi(gCameras) /* 7EEE4 800E5A34 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* 7EEE8 800E5A38 AFB40020 */ sw $s4, 0x20($sp) /* 7EEEC 800E5A3C 3C148011 */ lui $s4, %hi(gPartnerStatus) /* 7EEF0 800E5A40 2694EBB0 */ addiu $s4, $s4, %lo(gPartnerStatus) /* 7EEF4 800E5A44 AFB00010 */ sw $s0, 0x10($sp) /* 7EEF8 800E5A48 3C108011 */ lui $s0, %hi(gPlayerStatus) /* 7EEFC 800E5A4C 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) /* 7EF00 800E5A50 AFB10014 */ sw $s1, 0x14($sp) /* 7EF04 800E5A54 3C118011 */ lui $s1, %hi(gPlayerSpinState) /* 7EF08 800E5A58 2631F250 */ addiu $s1, $s1, %lo(gPlayerSpinState) /* 7EF0C 800E5A5C AFBF0024 */ sw $ra, 0x24($sp) /* 7EF10 800E5A60 AFB3001C */ sw $s3, 0x1C($sp) /* 7EF14 800E5A64 AFB20018 */ sw $s2, 0x18($sp) /* 7EF18 800E5A68 8E030000 */ lw $v1, 0x0($s0) /* 7EF1C 800E5A6C 3C020004 */ lui $v0, (0x40000 >> 16) /* 7EF20 800E5A70 00621024 */ and $v0, $v1, $v0 /* 7EF24 800E5A74 14400004 */ bnez $v0, .L800E5A88 /* 7EF28 800E5A78 3C02DFFF */ lui $v0, (0xDFFFFFFF >> 16) /* 7EF2C 800E5A7C 3442FFFF */ ori $v0, $v0, (0xDFFFFFFF & 0xFFFF) /* 7EF30 800E5A80 00621024 */ and $v0, $v1, $v0 /* 7EF34 800E5A84 AE020000 */ sw $v0, 0x0($s0) .L800E5A88: /* 7EF38 800E5A88 8E020004 */ lw $v0, 0x4($s0) /* 7EF3C 800E5A8C 30421000 */ andi $v0, $v0, 0x1000 /* 7EF40 800E5A90 10400005 */ beqz $v0, .L800E5AA8 /* 7EF44 800E5A94 00000000 */ nop /* 7EF48 800E5A98 0C03971E */ jal phys_peach_update /* 7EF4C 800E5A9C 00000000 */ nop /* 7EF50 800E5AA0 08039716 */ j .L800E5C58 /* 7EF54 800E5AA4 00000000 */ nop .L800E5AA8: /* 7EF58 800E5AA8 820200C5 */ lb $v0, 0xC5($s0) /* 7EF5C 800E5AAC 920300C5 */ lbu $v1, 0xC5($s0) /* 7EF60 800E5AB0 10400008 */ beqz $v0, .L800E5AD4 /* 7EF64 800E5AB4 2462FFFF */ addiu $v0, $v1, -0x1 /* 7EF68 800E5AB8 A20200C5 */ sb $v0, 0xC5($s0) /* 7EF6C 800E5ABC 00021600 */ sll $v0, $v0, 24 /* 7EF70 800E5AC0 14400004 */ bnez $v0, .L800E5AD4 /* 7EF74 800E5AC4 00000000 */ nop /* 7EF78 800E5AC8 94820002 */ lhu $v0, 0x2($a0) /* 7EF7C 800E5ACC 34420004 */ ori $v0, $v0, 0x4 /* 7EF80 800E5AD0 A4820002 */ sh $v0, 0x2($a0) .L800E5AD4: /* 7EF84 800E5AD4 860200C0 */ lh $v0, 0xC0($s0) /* 7EF88 800E5AD8 10400011 */ beqz $v0, .L800E5B20 /* 7EF8C 800E5ADC 960300C0 */ lhu $v1, 0xC0($s0) /* 7EF90 800E5AE0 C6000070 */ lwc1 $f0, 0x70($s0) /* 7EF94 800E5AE4 44801000 */ mtc1 $zero, $f2 /* 7EF98 800E5AE8 00000000 */ nop /* 7EF9C 800E5AEC 4602003E */ c.le.s $f0, $f2 /* 7EFA0 800E5AF0 00000000 */ nop /* 7EFA4 800E5AF4 45000008 */ bc1f .L800E5B18 /* 7EFA8 800E5AF8 00000000 */ nop /* 7EFAC 800E5AFC 3C01800F */ lui $at, %hi(D_800F7B90) /* 7EFB0 800E5B00 C4207B90 */ lwc1 $f0, %lo(D_800F7B90)($at) /* 7EFB4 800E5B04 4600103C */ c.lt.s $f2, $f0 /* 7EFB8 800E5B08 00000000 */ nop /* 7EFBC 800E5B0C 45030001 */ bc1tl .L800E5B14 /* 7EFC0 800E5B10 A60300C2 */ sh $v1, 0xC2($s0) .L800E5B14: /* 7EFC4 800E5B14 C6000070 */ lwc1 $f0, 0x70($s0) .L800E5B18: /* 7EFC8 800E5B18 3C01800F */ lui $at, %hi(D_800F7B90) /* 7EFCC 800E5B1C E4207B90 */ swc1 $f0, %lo(D_800F7B90)($at) .L800E5B20: /* 7EFD0 800E5B20 0C03893E */ jal func_800E24F8 /* 7EFD4 800E5B24 00000000 */ nop /* 7EFD8 800E5B28 82220000 */ lb $v0, 0x0($s1) /* 7EFDC 800E5B2C 92230000 */ lbu $v1, 0x0($s1) /* 7EFE0 800E5B30 1040000E */ beqz $v0, .L800E5B6C /* 7EFE4 800E5B34 2462FFFF */ addiu $v0, $v1, -0x1 /* 7EFE8 800E5B38 A2220000 */ sb $v0, 0x0($s1) /* 7EFEC 800E5B3C 00021600 */ sll $v0, $v0, 24 /* 7EFF0 800E5B40 1440000B */ bnez $v0, .L800E5B70 /* 7EFF4 800E5B44 3C138000 */ lui $s3, (0x80000000 >> 16) /* 7EFF8 800E5B48 3C03FFFE */ lui $v1, (0xFFFEFFFF >> 16) /* 7EFFC 800E5B4C 3463FFFF */ ori $v1, $v1, (0xFFFEFFFF & 0xFFFF) /* 7F000 800E5B50 8E020004 */ lw $v0, 0x4($s0) /* 7F004 800E5B54 8E240030 */ lw $a0, 0x30($s1) /* 7F008 800E5B58 00431024 */ and $v0, $v0, $v1 /* 7F00C 800E5B5C 10800004 */ beqz $a0, .L800E5B70 /* 7F010 800E5B60 AE020004 */ sw $v0, 0x4($s0) /* 7F014 800E5B64 0C05271B */ jal sfx_stop_sound /* 7F018 800E5B68 00000000 */ nop .L800E5B6C: /* 7F01C 800E5B6C 3C138000 */ lui $s3, (0x80000000 >> 16) .L800E5B70: /* 7F020 800E5B70 3C11800F */ lui $s1, %hi(PlayerActionsTable) /* 7F024 800E5B74 26317C8C */ addiu $s1, $s1, %lo(PlayerActionsTable) /* 7F028 800E5B78 3C128011 */ lui $s2, %hi(D_8010C924) /* 7F02C 800E5B7C 2652C924 */ addiu $s2, $s2, %lo(D_8010C924) .L800E5B80: /* 7F030 800E5B80 820200B4 */ lb $v0, 0xB4($s0) /* 7F034 800E5B84 2C420003 */ sltiu $v0, $v0, 0x3 /* 7F038 800E5B88 10400015 */ beqz $v0, .L800E5BE0 /* 7F03C 800E5B8C 00000000 */ nop /* 7F040 800E5B90 8E020000 */ lw $v0, 0x0($s0) /* 7F044 800E5B94 30422000 */ andi $v0, $v0, 0x2000 /* 7F048 800E5B98 14400004 */ bnez $v0, .L800E5BAC /* 7F04C 800E5B9C 0000182D */ daddu $v1, $zero, $zero /* 7F050 800E5BA0 0C010C77 */ jal check_conversation_trigger /* 7F054 800E5BA4 00000000 */ nop /* 7F058 800E5BA8 0040182D */ daddu $v1, $v0, $zero .L800E5BAC: /* 7F05C 800E5BAC 82820000 */ lb $v0, 0x0($s4) /* 7F060 800E5BB0 14400009 */ bnez $v0, .L800E5BD8 /* 7F064 800E5BB4 00000000 */ nop /* 7F068 800E5BB8 8E020000 */ lw $v0, 0x0($s0) /* 7F06C 800E5BBC 30420020 */ andi $v0, $v0, 0x20 /* 7F070 800E5BC0 14400005 */ bnez $v0, .L800E5BD8 /* 7F074 800E5BC4 00000000 */ nop /* 7F078 800E5BC8 10600003 */ beqz $v1, .L800E5BD8 /* 7F07C 800E5BCC 00000000 */ nop /* 7F080 800E5BD0 0C039769 */ jal set_action_state /* 7F084 800E5BD4 2404000C */ addiu $a0, $zero, 0xC .L800E5BD8: /* 7F088 800E5BD8 0C03989A */ jal check_input_spin /* 7F08C 800E5BDC 00000000 */ nop .L800E5BE0: /* 7F090 800E5BE0 8E020000 */ lw $v0, 0x0($s0) /* 7F094 800E5BE4 00531024 */ and $v0, $v0, $s3 /* 7F098 800E5BE8 10400011 */ beqz $v0, .L800E5C30 /* 7F09C 800E5BEC 00000000 */ nop /* 7F0A0 800E5BF0 820200B4 */ lb $v0, 0xB4($s0) /* 7F0A4 800E5BF4 00021100 */ sll $v0, $v0, 4 /* 7F0A8 800E5BF8 00511021 */ addu $v0, $v0, $s1 /* 7F0AC 800E5BFC 8C440004 */ lw $a0, 0x4($v0) /* 7F0B0 800E5C00 1080000B */ beqz $a0, .L800E5C30 /* 7F0B4 800E5C04 00000000 */ nop /* 7F0B8 800E5C08 8E420000 */ lw $v0, 0x0($s2) /* 7F0BC 800E5C0C 10820008 */ beq $a0, $v0, .L800E5C30 /* 7F0C0 800E5C10 3C06802B */ lui $a2, (0x802B6000 >> 16) /* 7F0C4 800E5C14 820200B4 */ lb $v0, 0xB4($s0) /* 7F0C8 800E5C18 00021100 */ sll $v0, $v0, 4 /* 7F0CC 800E5C1C 00511021 */ addu $v0, $v0, $s1 /* 7F0D0 800E5C20 8C450008 */ lw $a1, 0x8($v0) /* 7F0D4 800E5C24 34C66000 */ ori $a2, $a2, (0x802B6000 & 0xFFFF) /* 7F0D8 800E5C28 0C00A5CF */ jal dma_copy /* 7F0DC 800E5C2C AE440000 */ sw $a0, 0x0($s2) .L800E5C30: /* 7F0E0 800E5C30 820200B4 */ lb $v0, 0xB4($s0) /* 7F0E4 800E5C34 00021100 */ sll $v0, $v0, 4 /* 7F0E8 800E5C38 00511021 */ addu $v0, $v0, $s1 /* 7F0EC 800E5C3C 8C420000 */ lw $v0, 0x0($v0) /* 7F0F0 800E5C40 0040F809 */ jalr $v0 /* 7F0F4 800E5C44 00000000 */ nop /* 7F0F8 800E5C48 8E020000 */ lw $v0, 0x0($s0) /* 7F0FC 800E5C4C 00531024 */ and $v0, $v0, $s3 /* 7F100 800E5C50 1440FFCB */ bnez $v0, .L800E5B80 /* 7F104 800E5C54 00000000 */ nop .L800E5C58: /* 7F108 800E5C58 8FBF0024 */ lw $ra, 0x24($sp) /* 7F10C 800E5C5C 8FB40020 */ lw $s4, 0x20($sp) /* 7F110 800E5C60 8FB3001C */ lw $s3, 0x1C($sp) /* 7F114 800E5C64 8FB20018 */ lw $s2, 0x18($sp) /* 7F118 800E5C68 8FB10014 */ lw $s1, 0x14($sp) /* 7F11C 800E5C6C 8FB00010 */ lw $s0, 0x10($sp) /* 7F120 800E5C70 03E00008 */ jr $ra /* 7F124 800E5C74 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void phys_update_action_state(void) { Camera* cameras = gCameras; PartnerStatus* partnerStatus = &gPartnerStatus; PlayerStatus* playerStatus = &gPlayerStatus; PlayerSpinState* playerSpinState = &gPlayerSpinState; if (!(playerStatus->flags & PS_FLAG_ENTERING_BATTLE)) { playerStatus->flags &= ~PS_FLAG_TIME_STOPPED; } if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) { phys_peach_update(); return; } if (playerStatus->camResetDelay != 0) { playerStatus->camResetDelay--; if (playerStatus->camResetDelay == 0) { gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAG_4; } } // if midair, look for velocity inflection if (playerStatus->timeInAir != 0) { if (playerStatus->gravityIntegrator[0] <= 0.0f && LastMidairPlayerVelY > 0.0f) { playerStatus->peakJumpTime = playerStatus->timeInAir; } LastMidairPlayerVelY = playerStatus->gravityIntegrator[0]; } func_800E24F8(); if (playerSpinState->stopSoundTimer != 0) { playerSpinState->stopSoundTimer--; if (playerSpinState->stopSoundTimer == 0) { playerStatus->animFlags &= ~PA_FLAG_SPINNING; if (playerSpinState->spinSoundID != 0) { sfx_stop_sound(playerSpinState->spinSoundID); } } } do { s32 actionState = playerStatus->actionState; if (actionState == ACTION_STATE_IDLE || actionState == ACTION_STATE_WALK || actionState == ACTION_STATE_RUN) { s32 cond; if (!(playerStatus->flags & PS_FLAG_INPUT_DISABLED)) { cond = check_conversation_trigger(); } else { cond = FALSE; } if ((partnerStatus->partnerActionState == PARTNER_ACTION_NONE) && !(playerStatus->flags & PS_FLAG_PAUSED) && cond) { set_action_state(ACTION_STATE_TALK); } check_input_spin(); } if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) { void* dmaStart = PlayerActionsTable[playerStatus->actionState].dmaStart; if (dmaStart != NULL && dmaStart != D_8010C924) { D_8010C924 = dmaStart; dma_copy(dmaStart, PlayerActionsTable[playerStatus->actionState].dmaEnd, PLAYER_ACTION_VRAM_DEF); } } PlayerActionsTable[playerStatus->actionState].update(); } while (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED); }
### RAW ASSEMBLY INSTRUCTIONS: glabel ShowConsumableChoicePopup /* FAFEC 802D663C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* FAFF0 802D6640 AFB00010 */ sw $s0, 0x10($sp) /* FAFF4 802D6644 0080802D */ daddu $s0, $a0, $zero /* FAFF8 802D6648 AFB3001C */ sw $s3, 0x1C($sp) /* FAFFC 802D664C 3C138011 */ lui $s3, %hi(gPlayerData) /* FB000 802D6650 2673F290 */ addiu $s3, $s3, %lo(gPlayerData) /* FB004 802D6654 AFB10014 */ sw $s1, 0x14($sp) /* FB008 802D6658 3C11802E */ lui $s1, %hi(D_802DB830) /* FB00C 802D665C 2631B830 */ addiu $s1, $s1, %lo(D_802DB830) /* FB010 802D6660 AFBF0020 */ sw $ra, 0x20($sp) /* FB014 802D6664 AFB20018 */ sw $s2, 0x18($sp) /* FB018 802D6668 8E12014C */ lw $s2, 0x14C($s0) /* FB01C 802D666C 54A00001 */ bnel $a1, $zero, .L802D6674 /* FB020 802D6670 AE000070 */ sw $zero, 0x70($s0) .L802D6674: /* FB024 802D6674 8E030070 */ lw $v1, 0x70($s0) /* FB028 802D6678 10600005 */ beqz $v1, .L802D6690 /* FB02C 802D667C 24020001 */ addiu $v0, $zero, 0x1 /* FB030 802D6680 1062004B */ beq $v1, $v0, .L802D67B0 /* FB034 802D6684 0000102D */ daddu $v0, $zero, $zero /* FB038 802D6688 080B5A0F */ j .L802D683C /* FB03C 802D668C 00000000 */ nop .L802D6690: /* FB040 802D6690 0C03805E */ jal disable_player_input /* FB044 802D6694 00000000 */ nop /* FB048 802D6698 0C038045 */ jal disable_player_static_collisions /* FB04C 802D669C 00000000 */ nop /* FB050 802D66A0 0C03BD8A */ jal partner_disable_input /* FB054 802D66A4 00000000 */ nop /* FB058 802D66A8 0C03A5EE */ jal close_status_bar /* FB05C 802D66AC 00000000 */ nop /* FB060 802D66B0 0000482D */ daddu $t1, $zero, $zero /* FB064 802D66B4 0120402D */ daddu $t0, $t1, $zero /* FB068 802D66B8 3C0C8008 */ lui $t4, %hi(gItemTable) /* FB06C 802D66BC 258C78E0 */ addiu $t4, $t4, %lo(gItemTable) /* FB070 802D66C0 3C0B8009 */ lui $t3, %hi(gItemHudScripts) /* FB074 802D66C4 256BA680 */ addiu $t3, $t3, %lo(gItemHudScripts) /* FB078 802D66C8 240A0001 */ addiu $t2, $zero, 0x1 /* FB07C 802D66CC 0260382D */ daddu $a3, $s3, $zero /* FB080 802D66D0 3C03800A */ lui $v1, %hi(gOverrideFlags) /* FB084 802D66D4 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* FB088 802D66D8 8C620000 */ lw $v0, 0x0($v1) /* FB08C 802D66DC 0220302D */ daddu $a2, $s1, $zero /* FB090 802D66E0 34420040 */ ori $v0, $v0, 0x40 /* FB094 802D66E4 AC620000 */ sw $v0, 0x0($v1) .L802D66E8: /* FB098 802D66E8 84E401B4 */ lh $a0, 0x1B4($a3) /* FB09C 802D66EC 5080001F */ beql $a0, $zero, .L802D676C /* FB0A0 802D66F0 25080001 */ addiu $t0, $t0, 0x1 /* FB0A4 802D66F4 8E430028 */ lw $v1, 0x28($s2) /* FB0A8 802D66F8 8C620000 */ lw $v0, 0x0($v1) /* FB0AC 802D66FC 18400008 */ blez $v0, .L802D6720 /* FB0B0 802D6700 0000282D */ daddu $a1, $zero, $zero .L802D6704: /* FB0B4 802D6704 54820003 */ bnel $a0, $v0, .L802D6714 /* FB0B8 802D6708 24630004 */ addiu $v1, $v1, 0x4 /* FB0BC 802D670C 080B59C8 */ j .L802D6720 /* FB0C0 802D6710 24050001 */ addiu $a1, $zero, 0x1 .L802D6714: /* FB0C4 802D6714 8C620000 */ lw $v0, 0x0($v1) /* FB0C8 802D6718 1C40FFFA */ bgtz $v0, .L802D6704 /* FB0CC 802D671C 00000000 */ nop .L802D6720: /* FB0D0 802D6720 50A00012 */ beql $a1, $zero, .L802D676C /* FB0D4 802D6724 25080001 */ addiu $t0, $t0, 0x1 /* FB0D8 802D6728 84E301B4 */ lh $v1, 0x1B4($a3) /* FB0DC 802D672C 00031940 */ sll $v1, $v1, 5 /* FB0E0 802D6730 006C1821 */ addu $v1, $v1, $t4 /* FB0E4 802D6734 84620004 */ lh $v0, 0x4($v1) /* FB0E8 802D6738 000210C0 */ sll $v0, $v0, 3 /* FB0EC 802D673C 004B1021 */ addu $v0, $v0, $t3 /* FB0F0 802D6740 8C420000 */ lw $v0, 0x0($v0) /* FB0F4 802D6744 ACC80108 */ sw $t0, 0x108($a2) /* FB0F8 802D6748 ACCA018C */ sw $t2, 0x18C($a2) /* FB0FC 802D674C ACC20000 */ sw $v0, 0x0($a2) /* FB100 802D6750 8C620000 */ lw $v0, 0x0($v1) /* FB104 802D6754 ACC20084 */ sw $v0, 0x84($a2) /* FB108 802D6758 8C620014 */ lw $v0, 0x14($v1) /* FB10C 802D675C 25290001 */ addiu $t1, $t1, 0x1 /* FB110 802D6760 ACC20294 */ sw $v0, 0x294($a2) /* FB114 802D6764 24C60004 */ addiu $a2, $a2, 0x4 /* FB118 802D6768 25080001 */ addiu $t0, $t0, 0x1 .L802D676C: /* FB11C 802D676C 2902000A */ slti $v0, $t0, 0xA /* FB120 802D6770 1440FFDD */ bnez $v0, .L802D66E8 /* FB124 802D6774 24E70002 */ addiu $a3, $a3, 0x2 /* FB128 802D6778 15200004 */ bnez $t1, .L802D678C /* FB12C 802D677C 2402000C */ addiu $v0, $zero, 0xC /* FB130 802D6780 AE000084 */ sw $zero, 0x84($s0) /* FB134 802D6784 080B5A0F */ j .L802D683C /* FB138 802D6788 24020001 */ addiu $v0, $zero, 0x1 .L802D678C: /* FB13C 802D678C 0220202D */ daddu $a0, $s1, $zero /* FB140 802D6790 AE220318 */ sw $v0, 0x318($s1) /* FB144 802D6794 AE290324 */ sw $t1, 0x324($s1) /* FB148 802D6798 0C03D390 */ jal create_standard_popup_menu /* FB14C 802D679C AE200328 */ sw $zero, 0x328($s1) /* FB150 802D67A0 24020001 */ addiu $v0, $zero, 0x1 /* FB154 802D67A4 AE000074 */ sw $zero, 0x74($s0) /* FB158 802D67A8 080B5A0E */ j .L802D6838 /* FB15C 802D67AC AE020070 */ sw $v0, 0x70($s0) .L802D67B0: /* FB160 802D67B0 8E020074 */ lw $v0, 0x74($s0) /* FB164 802D67B4 14400008 */ bnez $v0, .L802D67D8 /* FB168 802D67B8 24420001 */ addiu $v0, $v0, 0x1 /* FB16C 802D67BC 8622032C */ lh $v0, 0x32C($s1) /* FB170 802D67C0 1040001D */ beqz $v0, .L802D6838 /* FB174 802D67C4 AE020078 */ sw $v0, 0x78($s0) /* FB178 802D67C8 0C03C4EC */ jal hide_popup_menu /* FB17C 802D67CC 00000000 */ nop /* FB180 802D67D0 8E020074 */ lw $v0, 0x74($s0) /* FB184 802D67D4 24420001 */ addiu $v0, $v0, 0x1 .L802D67D8: /* FB188 802D67D8 AE020074 */ sw $v0, 0x74($s0) /* FB18C 802D67DC 2842000F */ slti $v0, $v0, 0xF /* FB190 802D67E0 14400016 */ bnez $v0, .L802D683C /* FB194 802D67E4 0000102D */ daddu $v0, $zero, $zero /* FB198 802D67E8 0C03C54E */ jal destroy_popup_menu /* FB19C 802D67EC 00000000 */ nop /* FB1A0 802D67F0 8E030078 */ lw $v1, 0x78($s0) /* FB1A4 802D67F4 240200FF */ addiu $v0, $zero, 0xFF /* FB1A8 802D67F8 54620005 */ bnel $v1, $v0, .L802D6810 /* FB1AC 802D67FC 2462FFFF */ addiu $v0, $v1, -0x1 /* FB1B0 802D6800 2402FFFF */ addiu $v0, $zero, -0x1 /* FB1B4 802D6804 AE020084 */ sw $v0, 0x84($s0) /* FB1B8 802D6808 080B5A0F */ j .L802D683C /* FB1BC 802D680C 24020001 */ addiu $v0, $zero, 0x1 .L802D6810: /* FB1C0 802D6810 00021080 */ sll $v0, $v0, 2 /* FB1C4 802D6814 00511021 */ addu $v0, $v0, $s1 /* FB1C8 802D6818 8C430108 */ lw $v1, 0x108($v0) /* FB1CC 802D681C 00031040 */ sll $v0, $v1, 1 /* FB1D0 802D6820 00531021 */ addu $v0, $v0, $s3 /* FB1D4 802D6824 AE030088 */ sw $v1, 0x88($s0) /* FB1D8 802D6828 844301B4 */ lh $v1, 0x1B4($v0) /* FB1DC 802D682C 24020001 */ addiu $v0, $zero, 0x1 /* FB1E0 802D6830 080B5A0F */ j .L802D683C /* FB1E4 802D6834 AE030084 */ sw $v1, 0x84($s0) .L802D6838: /* FB1E8 802D6838 0000102D */ daddu $v0, $zero, $zero .L802D683C: /* FB1EC 802D683C 8FBF0020 */ lw $ra, 0x20($sp) /* FB1F0 802D6840 8FB3001C */ lw $s3, 0x1C($sp) /* FB1F4 802D6844 8FB20018 */ lw $s2, 0x18($sp) /* FB1F8 802D6848 8FB10014 */ lw $s1, 0x14($sp) /* FB1FC 802D684C 8FB00010 */ lw $s0, 0x10($sp) /* FB200 802D6850 03E00008 */ jr $ra /* FB204 802D6854 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus ShowConsumableChoicePopup(Evt* script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; PopupMenu* menu = &D_802DB830; Trigger* trigger = script->owner2.trigger; s32 numEntries; s32 t; // TODO required in both places to match s32 i; if (isInitialCall) { script->functionTemp[0] = 0; } t = script->functionTemp[0]; switch (t) { case 0: disable_player_input(); disable_player_static_collisions(); partner_disable_input(); close_status_bar(); numEntries = 0; gOverrideFlags |= GLOBAL_OVERRIDES_40; for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) { s16 invItem = playerData->invItems[i]; if (invItem != ITEM_NONE) { s32 found = FALSE; s32* itemIt = trigger->itemList; while (*itemIt > 0) { if (invItem == *itemIt) { found = TRUE; break; } itemIt++; } if (found) { ItemData* item = &gItemTable[playerData->invItems[i]]; menu->ptrIcon[numEntries] = gItemHudScripts[item->hudElemID].enabled; menu->userIndex[numEntries] = i; menu->enabled[numEntries] = TRUE; menu->nameMsg[numEntries] = item->nameMsg; menu->descMsg[numEntries] = item->shortDescMsg; numEntries++; } } } if (numEntries == 0) { script->varTable[0] = 0; return ApiStatus_DONE1; } menu->popupType = POPUP_MENU_USEKEY; menu->numEntries = numEntries; menu->initialPos = 0; create_standard_popup_menu(menu); script->functionTemp[1] = 0; script->functionTemp[0] = 1; break; case 1: if (script->functionTemp[1] == 0) { script->functionTemp[2] = menu->result; if (script->functionTemp[2] == 0) { break; } hide_popup_menu(); } script->functionTemp[1]++; if (script->functionTemp[1] >= 15) { destroy_popup_menu(); if (script->functionTemp[2] == 0xFF) { script->varTable[0] = -1; return ApiStatus_DONE1; } else { t = menu->userIndex[script->functionTemp[2] - 1]; script->varTable[1] = t; script->varTable[0] = playerData->invItems[t]; return ApiStatus_DONE1; } } break; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel set_goal_pos_to_part /* 198034 80269754 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 198038 80269758 AFB20018 */ sw $s2, 0x18($sp) /* 19803C 8026975C 0080902D */ daddu $s2, $a0, $zero /* 198040 80269760 00A0202D */ daddu $a0, $a1, $zero /* 198044 80269764 AFB3001C */ sw $s3, 0x1C($sp) /* 198048 80269768 00C0982D */ daddu $s3, $a2, $zero /* 19804C 8026976C AFB00010 */ sw $s0, 0x10($sp) /* 198050 80269770 30900700 */ andi $s0, $a0, 0x700 /* 198054 80269774 AFBF0020 */ sw $ra, 0x20($sp) /* 198058 80269778 0C09A75B */ jal get_actor /* 19805C 8026977C AFB10014 */ sw $s1, 0x14($sp) /* 198060 80269780 0040882D */ daddu $s1, $v0, $zero /* 198064 80269784 24020100 */ addiu $v0, $zero, 0x100 /* 198068 80269788 12020035 */ beq $s0, $v0, .L80269860 /* 19806C 8026978C 2A020101 */ slti $v0, $s0, 0x101 /* 198070 80269790 50400005 */ beql $v0, $zero, .L802697A8 /* 198074 80269794 24020200 */ addiu $v0, $zero, 0x200 /* 198078 80269798 12000007 */ beqz $s0, .L802697B8 /* 19807C 8026979C 0220202D */ daddu $a0, $s1, $zero /* 198080 802697A0 0809A66F */ j .L802699BC /* 198084 802697A4 00000000 */ nop .L802697A8: /* 198088 802697A8 1202002E */ beq $s0, $v0, .L80269864 /* 19808C 802697AC 0220202D */ daddu $a0, $s1, $zero /* 198090 802697B0 0809A66F */ j .L802699BC /* 198094 802697B4 00000000 */ nop .L802697B8: /* 198098 802697B8 0C099117 */ jal get_actor_part /* 19809C 802697BC 0000282D */ daddu $a1, $zero, $zero /* 1980A0 802697C0 0040202D */ daddu $a0, $v0, $zero /* 1980A4 802697C4 84820014 */ lh $v0, 0x14($a0) /* 1980A8 802697C8 C6200188 */ lwc1 $f0, 0x188($s1) /* 1980AC 802697CC 44821000 */ mtc1 $v0, $f2 /* 1980B0 802697D0 00000000 */ nop /* 1980B4 802697D4 468010A0 */ cvt.s.w $f2, $f2 /* 1980B8 802697D8 46001082 */ mul.s $f2, $f2, $f0 /* 1980BC 802697DC 00000000 */ nop /* 1980C0 802697E0 C6200144 */ lwc1 $f0, 0x144($s1) /* 1980C4 802697E4 46020000 */ add.s $f0, $f0, $f2 /* 1980C8 802697E8 E640000C */ swc1 $f0, 0xC($s2) /* 1980CC 802697EC 84820016 */ lh $v0, 0x16($a0) /* 1980D0 802697F0 C6200188 */ lwc1 $f0, 0x188($s1) /* 1980D4 802697F4 44821000 */ mtc1 $v0, $f2 /* 1980D8 802697F8 00000000 */ nop /* 1980DC 802697FC 468010A0 */ cvt.s.w $f2, $f2 /* 1980E0 80269800 46001082 */ mul.s $f2, $f2, $f0 /* 1980E4 80269804 00000000 */ nop /* 1980E8 80269808 C6200148 */ lwc1 $f0, 0x148($s1) /* 1980EC 8026980C 46020000 */ add.s $f0, $f0, $f2 /* 1980F0 80269810 3C014120 */ lui $at, (0x41200000 >> 16) /* 1980F4 80269814 44811000 */ mtc1 $at, $f2 /* 1980F8 80269818 E6400010 */ swc1 $f0, 0x10($s2) /* 1980FC 8026981C C620014C */ lwc1 $f0, 0x14C($s1) /* 198100 80269820 46020000 */ add.s $f0, $f0, $f2 /* 198104 80269824 E6400014 */ swc1 $f0, 0x14($s2) /* 198108 80269828 82230214 */ lb $v1, 0x214($s1) /* 19810C 8026982C 2402000C */ addiu $v0, $zero, 0xC /* 198110 80269830 14620062 */ bne $v1, $v0, .L802699BC /* 198114 80269834 00000000 */ nop /* 198118 80269838 C6200188 */ lwc1 $f0, 0x188($s1) /* 19811C 8026983C 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 198120 80269840 44811000 */ mtc1 $at, $f2 /* 198124 80269844 00000000 */ nop /* 198128 80269848 46020002 */ mul.s $f0, $f0, $f2 /* 19812C 8026984C 00000000 */ nop /* 198130 80269850 C6420010 */ lwc1 $f2, 0x10($s2) /* 198134 80269854 46001081 */ sub.s $f2, $f2, $f0 /* 198138 80269858 0809A66F */ j .L802699BC /* 19813C 8026985C E6420010 */ swc1 $f2, 0x10($s2) .L80269860: /* 198140 80269860 0220202D */ daddu $a0, $s1, $zero .L80269864: /* 198144 80269864 0C099117 */ jal get_actor_part /* 198148 80269868 0260282D */ daddu $a1, $s3, $zero /* 19814C 8026986C 0040202D */ daddu $a0, $v0, $zero /* 198150 80269870 8C820000 */ lw $v0, 0x0($a0) /* 198154 80269874 3C030010 */ lui $v1, (0x100000 >> 16) /* 198158 80269878 00431024 */ and $v0, $v0, $v1 /* 19815C 8026987C 1440002A */ bnez $v0, .L80269928 /* 198160 80269880 00000000 */ nop /* 198164 80269884 84820014 */ lh $v0, 0x14($a0) /* 198168 80269888 8483006C */ lh $v1, 0x6C($a0) /* 19816C 8026988C C6200188 */ lwc1 $f0, 0x188($s1) /* 198170 80269890 00431021 */ addu $v0, $v0, $v1 /* 198174 80269894 44821000 */ mtc1 $v0, $f2 /* 198178 80269898 00000000 */ nop /* 19817C 8026989C 468010A0 */ cvt.s.w $f2, $f2 /* 198180 802698A0 46001082 */ mul.s $f2, $f2, $f0 /* 198184 802698A4 00000000 */ nop /* 198188 802698A8 C6200144 */ lwc1 $f0, 0x144($s1) /* 19818C 802698AC 46020000 */ add.s $f0, $f0, $f2 /* 198190 802698B0 E640000C */ swc1 $f0, 0xC($s2) /* 198194 802698B4 8E220000 */ lw $v0, 0x0($s1) /* 198198 802698B8 30420800 */ andi $v0, $v0, 0x800 /* 19819C 802698BC 14400006 */ bnez $v0, .L802698D8 /* 1981A0 802698C0 00000000 */ nop /* 1981A4 802698C4 84820016 */ lh $v0, 0x16($a0) /* 1981A8 802698C8 8483006E */ lh $v1, 0x6E($a0) /* 1981AC 802698CC C6200188 */ lwc1 $f0, 0x188($s1) /* 1981B0 802698D0 0809A63B */ j .L802698EC /* 1981B4 802698D4 00431021 */ addu $v0, $v0, $v1 .L802698D8: /* 1981B8 802698D8 84820016 */ lh $v0, 0x16($a0) /* 1981BC 802698DC 8483006E */ lh $v1, 0x6E($a0) /* 1981C0 802698E0 C6200188 */ lwc1 $f0, 0x188($s1) /* 1981C4 802698E4 00021023 */ negu $v0, $v0 /* 1981C8 802698E8 00431023 */ subu $v0, $v0, $v1 .L802698EC: /* 1981CC 802698EC 44821000 */ mtc1 $v0, $f2 /* 1981D0 802698F0 00000000 */ nop /* 1981D4 802698F4 468010A0 */ cvt.s.w $f2, $f2 /* 1981D8 802698F8 46001082 */ mul.s $f2, $f2, $f0 /* 1981DC 802698FC 00000000 */ nop /* 1981E0 80269900 C6200148 */ lwc1 $f0, 0x148($s1) /* 1981E4 80269904 46020000 */ add.s $f0, $f0, $f2 /* 1981E8 80269908 E6400010 */ swc1 $f0, 0x10($s2) /* 1981EC 8026990C 84820018 */ lh $v0, 0x18($a0) /* 1981F0 80269910 C620014C */ lwc1 $f0, 0x14C($s1) /* 1981F4 80269914 44821000 */ mtc1 $v0, $f2 /* 1981F8 80269918 00000000 */ nop /* 1981FC 8026991C 468010A0 */ cvt.s.w $f2, $f2 /* 198200 80269920 0809A66A */ j .L802699A8 /* 198204 80269924 46020000 */ add.s $f0, $f0, $f2 .L80269928: /* 198208 80269928 8482006C */ lh $v0, 0x6C($a0) /* 19820C 8026992C C480002C */ lwc1 $f0, 0x2C($a0) /* 198210 80269930 44821000 */ mtc1 $v0, $f2 /* 198214 80269934 00000000 */ nop /* 198218 80269938 468010A0 */ cvt.s.w $f2, $f2 /* 19821C 8026993C 46020000 */ add.s $f0, $f0, $f2 /* 198220 80269940 E640000C */ swc1 $f0, 0xC($s2) /* 198224 80269944 8E220000 */ lw $v0, 0x0($s1) /* 198228 80269948 30420800 */ andi $v0, $v0, 0x800 /* 19822C 8026994C 1440000B */ bnez $v0, .L8026997C /* 198230 80269950 00000000 */ nop /* 198234 80269954 8482006E */ lh $v0, 0x6E($a0) /* 198238 80269958 C6200188 */ lwc1 $f0, 0x188($s1) /* 19823C 8026995C 44821000 */ mtc1 $v0, $f2 /* 198240 80269960 00000000 */ nop /* 198244 80269964 468010A0 */ cvt.s.w $f2, $f2 /* 198248 80269968 46001082 */ mul.s $f2, $f2, $f0 /* 19824C 8026996C 00000000 */ nop /* 198250 80269970 C4800030 */ lwc1 $f0, 0x30($a0) /* 198254 80269974 0809A668 */ j .L802699A0 /* 198258 80269978 46020000 */ add.s $f0, $f0, $f2 .L8026997C: /* 19825C 8026997C 8482006E */ lh $v0, 0x6E($a0) /* 198260 80269980 C6200188 */ lwc1 $f0, 0x188($s1) /* 198264 80269984 44821000 */ mtc1 $v0, $f2 /* 198268 80269988 00000000 */ nop /* 19826C 8026998C 468010A0 */ cvt.s.w $f2, $f2 /* 198270 80269990 46001082 */ mul.s $f2, $f2, $f0 /* 198274 80269994 00000000 */ nop /* 198278 80269998 C4800030 */ lwc1 $f0, 0x30($a0) /* 19827C 8026999C 46020001 */ sub.s $f0, $f0, $f2 .L802699A0: /* 198280 802699A0 E6400010 */ swc1 $f0, 0x10($s2) /* 198284 802699A4 C4800034 */ lwc1 $f0, 0x34($a0) .L802699A8: /* 198288 802699A8 3C014120 */ lui $at, (0x41200000 >> 16) /* 19828C 802699AC 44811000 */ mtc1 $at, $f2 /* 198290 802699B0 00000000 */ nop /* 198294 802699B4 46020000 */ add.s $f0, $f0, $f2 /* 198298 802699B8 E6400014 */ swc1 $f0, 0x14($s2) .L802699BC: /* 19829C 802699BC 8FBF0020 */ lw $ra, 0x20($sp) /* 1982A0 802699C0 8FB3001C */ lw $s3, 0x1C($sp) /* 1982A4 802699C4 8FB20018 */ lw $s2, 0x18($sp) /* 1982A8 802699C8 8FB10014 */ lw $s1, 0x14($sp) /* 1982AC 802699CC 8FB00010 */ lw $s0, 0x10($sp) /* 1982B0 802699D0 03E00008 */ jr $ra /* 1982B4 802699D4 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void set_goal_pos_to_part(ActorState* state, s32 actorID, s32 partID) { s32 actorClass = actorID & ACTOR_CLASS_MASK; Actor* actor = get_actor(actorID); ActorPart* part; switch (actorClass) { case ACTOR_CLASS_PLAYER: part = get_actor_part(actor, 0); state->goalPos.x = actor->currentPos.x + part->partOffset.x * actor->scalingFactor; state->goalPos.y = actor->currentPos.y + part->partOffset.y * actor->scalingFactor; state->goalPos.z = actor->currentPos.z + 10.0f; if (actor->stoneStatus == STATUS_KEY_STONE) { state->goalPos.y -= actor->scalingFactor * 5.0f; } break; case ACTOR_CLASS_PARTNER: case ACTOR_CLASS_ENEMY: part = get_actor_part(actor, partID); if (!(part->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) { state->goalPos.x = actor->currentPos.x + (part->partOffset.x + part->targetOffset.x) * actor->scalingFactor; if (!(actor->flags & ACTOR_PART_FLAG_800)) { state->goalPos.y = actor->currentPos.y + (part->partOffset.y + part->targetOffset.y) * actor->scalingFactor; } else { state->goalPos.y = actor->currentPos.y + (-part->partOffset.y - part->targetOffset.y) * actor->scalingFactor; } state->goalPos.z = actor->currentPos.z + part->partOffset.z + 10.0f; } else { state->goalPos.x = part->absolutePosition.x + part->targetOffset.x; if (!(actor->flags & ACTOR_PART_FLAG_800)) { state->goalPos.y = part->absolutePosition.y + part->targetOffset.y * actor->scalingFactor; } else { state->goalPos.y = part->absolutePosition.y - part->targetOffset.y * actor->scalingFactor; } state->goalPos.z = part->absolutePosition.z + 10.0f; } break; } }